[systemd-commits] src/bus-proxyd

Lennart Poettering lennart at kemper.freedesktop.org
Fri Jun 6 10:52:55 PDT 2014


 src/bus-proxyd/bus-policy.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 445743035336bf9691d200b8417685186ef9b5f9
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jun 6 19:52:50 2014 +0200

    bus-proxy: properly read user/group policy items

diff --git a/src/bus-proxyd/bus-policy.c b/src/bus-proxyd/bus-policy.c
index c592f50..af3b3ab 100644
--- a/src/bus-proxyd/bus-policy.c
+++ b/src/bus-proxyd/bus-policy.c
@@ -212,6 +212,7 @@ static int file_load(Policy *p, const char *path) {
                                 free(policy_user);
                                 policy_user = name;
                                 name = NULL;
+                                policy_category = POLICY_CATEGORY_USER;
                                 state = STATE_POLICY;
                         } else {
                                 log_error("Unexpected token (5) in %s:%u.", path, line);
@@ -226,6 +227,7 @@ static int file_load(Policy *p, const char *path) {
                                 free(policy_group);
                                 policy_group = name;
                                 name = NULL;
+                                policy_category = POLICY_CATEGORY_GROUP;
                                 state = STATE_POLICY;
                         } else {
                                 log_error("Unexpected token (6) at %s:%u.", path, line);
@@ -636,10 +638,10 @@ static void dump_items(PolicyItem *i) {
 static void dump_hashmap_items(Hashmap *h) {
         PolicyItem *i;
         Iterator j;
-        char *k;
+        void *k;
 
         HASHMAP_FOREACH_KEY(i, k, h, j) {
-                printf("Item for %s", k);
+                printf("Item for %u:\n", PTR_TO_UINT(k));
                 dump_items(i);
         }
 }



More information about the systemd-commits mailing list