From 777707ed8dff6958972a93894a87ec1945c65c14 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Mon, 14 Apr 2003 02:29:21 +0000 Subject: 2003-04-13 Havoc Pennington * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting callbacks * test/data/valid-config-files/debug-allow-all.conf.in: allow all users * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status): fix to only recover unused bytes if we're already authenticated (_dbus_transport_get_is_authenticated): fix to still mark us authenticated if there are unused bytes. * bus/dispatch.c: implement security policy checking * bus/connection.c (bus_transaction_send_from_driver): new * bus/bus.c (bus_context_check_security_policy): new * bus/dispatch.c (send_service_nonexistent_error): delete this, now we just set the DBusError and it gets converted to an error reply. * bus/connection.c (allow_user_function): enable code using actual data from the config file * bus/policy.c (list_allows_user): handle wildcard rules for user/group connection perms --- bus/config-parser.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'bus/config-parser.c') diff --git a/bus/config-parser.c b/bus/config-parser.c index 85c367b3..bf959ae2 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -859,7 +859,7 @@ append_rule_from_element (BusConfigParser *parser, if (rule == NULL) goto nomem; - /* FIXME the wildcard needs storing in the rule somehow */ + rule->d.user.uid = DBUS_UID_UNSET; } else { @@ -873,10 +873,7 @@ append_rule_from_element (BusConfigParser *parser, rule = bus_policy_rule_new (BUS_POLICY_RULE_USER, allow); if (rule == NULL) goto nomem; - - rule->d.user.user = _dbus_strdup (user); - if (rule->d.user.user == NULL) - goto nomem; + rule->d.user.uid = uid; } else @@ -894,7 +891,7 @@ append_rule_from_element (BusConfigParser *parser, if (rule == NULL) goto nomem; - /* FIXME the wildcard needs storing in the rule somehow */ + rule->d.group.gid = DBUS_GID_UNSET; } else { @@ -908,10 +905,7 @@ append_rule_from_element (BusConfigParser *parser, rule = bus_policy_rule_new (BUS_POLICY_RULE_GROUP, allow); if (rule == NULL) goto nomem; - - rule->d.group.group = _dbus_strdup (group); - if (rule->d.group.group == NULL) - goto nomem; + rule->d.group.gid = gid; } else -- cgit