chiark / gitweb /
bus-policy: split API for bus-proxyd
[elogind.git] / src / bus-proxyd / bus-policy.h
index cff2613e50322bac0b660ca4c797efa2774d5290..5b4d9d0c1065bf9d6c8a673df329a7faa0dcf081 100644 (file)
@@ -42,6 +42,7 @@ typedef enum PolicyItemClass {
         POLICY_ITEM_OWN_PREFIX,
         POLICY_ITEM_USER,
         POLICY_ITEM_GROUP,
+        POLICY_ITEM_IGNORE,
         _POLICY_ITEM_CLASS_MAX,
         _POLICY_ITEM_CLASS_INVALID = -1,
 } PolicyItemClass;
@@ -72,9 +73,26 @@ typedef struct Policy {
         Hashmap *group_items;
 } Policy;
 
-int policy_load(Policy *p);
+int policy_load(Policy *p, char **files);
 void policy_free(Policy *p);
 
+bool policy_check_own(Policy *p, const struct ucred *ucred, const char *name);
+bool policy_check_hello(Policy *p, const struct ucred *ucred);
+bool policy_check_recv(Policy *p,
+                       const struct ucred *ucred,
+                       Hashmap *names,
+                       int message_type,
+                       const char *path,
+                       const char *interface,
+                       const char *member);
+bool policy_check_send(Policy *p,
+                       const struct ucred *ucred,
+                       char **names,
+                       int message_type,
+                       const char *path,
+                       const char *interface,
+                       const char *member);
+
 void policy_dump(Policy *p);
 
 const char* policy_item_type_to_string(PolicyItemType t) _const_;