chiark / gitweb /
sysv-generator: don't check first if hashmap contains the service name
[elogind.git] / src / bus-proxyd / bus-policy.c
index 3f1d7557c178a53493ad4f3755612cd433ec97b7..d2eace940512645089192da8ae460fcddb197c6f 100644 (file)
@@ -338,7 +338,7 @@ static int file_load(Policy *p, const char *path) {
 
                                         assert_cc(sizeof(uid_t) == sizeof(uint32_t));
 
-                                        r = hashmap_ensure_allocated(&p->user_items, trivial_hash_func, trivial_compare_func);
+                                        r = hashmap_ensure_allocated(&p->user_items, NULL);
                                         if (r < 0)
                                                 return log_oom();
 
@@ -369,7 +369,7 @@ static int file_load(Policy *p, const char *path) {
 
                                         assert_cc(sizeof(gid_t) == sizeof(uint32_t));
 
-                                        r = hashmap_ensure_allocated(&p->group_items, trivial_hash_func, trivial_compare_func);
+                                        r = hashmap_ensure_allocated(&p->group_items, NULL);
                                         if (r < 0)
                                                 return log_oom();
 
@@ -724,5 +724,6 @@ static const char* const policy_item_class_table[_POLICY_ITEM_CLASS_MAX] = {
         [POLICY_ITEM_OWN_PREFIX] = "own-prefix",
         [POLICY_ITEM_USER] = "user",
         [POLICY_ITEM_GROUP] = "group",
+        [POLICY_ITEM_IGNORE] = "ignore",
 };
 DEFINE_STRING_TABLE_LOOKUP(policy_item_class, PolicyItemClass);