unsigned int fork : 1; /**< TRUE to fork into daemon mode */
+ unsigned int keep_umask : 1; /**< TRUE to keep original umask when forking */
+
unsigned int is_toplevel : 1; /**< FALSE if we are a sub-config-file inside another one */
};
if (included->fork)
parser->fork = TRUE;
+ if (included->keep_umask)
+ parser->keep_umask = TRUE;
+
if (included->pidfile != NULL)
{
dbus_free (parser->pidfile);
return TRUE;
}
+ else if (element_type == ELEMENT_KEEP_UMASK)
+ {
+ if (!check_no_attributes (parser, "keep_umask", attribute_names, attribute_values, error))
+ return FALSE;
+
+ if (push_element (parser, ELEMENT_KEEP_UMASK) == NULL)
+ {
+ BUS_SET_OOM (error);
+ return FALSE;
+ }
+
+ parser->keep_umask = TRUE;
+
+ return TRUE;
+ }
else if (element_type == ELEMENT_PIDFILE)
{
if (!check_no_attributes (parser, "pidfile", attribute_names, attribute_values, error))
case ELEMENT_ALLOW:
case ELEMENT_DENY:
case ELEMENT_FORK:
+ case ELEMENT_KEEP_UMASK:
case ELEMENT_SELINUX:
case ELEMENT_ASSOCIATE:
case ELEMENT_STANDARD_SESSION_SERVICEDIRS:
case ELEMENT_ALLOW:
case ELEMENT_DENY:
case ELEMENT_FORK:
+ case ELEMENT_KEEP_UMASK:
case ELEMENT_STANDARD_SESSION_SERVICEDIRS:
case ELEMENT_STANDARD_SYSTEM_SERVICEDIRS:
case ELEMENT_SELINUX:
return parser->fork;
}
+dbus_bool_t
+bus_config_parser_get_keep_umask (BusConfigParser *parser)
+{
+ return parser->keep_umask;
+}
+
const char *
bus_config_parser_get_pidfile (BusConfigParser *parser)
{
if (! bools_equal (a->fork, b->fork))
return FALSE;
+ if (! bools_equal (a->keep_umask, b->keep_umask))
+ return FALSE;
+
if (! bools_equal (a->is_toplevel, b->is_toplevel))
return FALSE;