summaryrefslogtreecommitdiff
path: root/bus/policy.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-03-23 07:41:54 +0000
committerHavoc Pennington <hp@redhat.com>2003-03-23 07:41:54 +0000
commita26607ab68bf0878f23d2dbddec781b4b760d034 (patch)
treefe9153c14712ce893b605a7b23b47e4e7e8d17d8 /bus/policy.h
parentb6ffea177fccb6cc4e65992da7d8b390054277f7 (diff)
downloaddbus-a26607ab68bf0878f23d2dbddec781b4b760d034.tar.gz
2003-03-23 Havoc Pennington <hp@pobox.com>
* bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny policies code * dbus/dbus-hash.h: add ULONG hash keys * dbus/dbus-sysdeps.c (_dbus_get_groups): new (_dbus_get_group_id): new function
Diffstat (limited to 'bus/policy.h')
-rw-r--r--bus/policy.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/bus/policy.h b/bus/policy.h
index 00d60baa..680ad581 100644
--- a/bus/policy.h
+++ b/bus/policy.h
@@ -28,14 +28,13 @@
#include <dbus/dbus-string.h>
#include "bus.h"
-typedef struct BusPolicy BusPolicy;
-typedef struct BusPolicyRule BusPolicyRule;
-
typedef enum
{
BUS_POLICY_RULE_SEND,
BUS_POLICY_RULE_RECEIVE,
- BUS_POLICY_RULE_OWN
+ BUS_POLICY_RULE_OWN,
+ BUS_POLICY_RULE_USER,
+ BUS_POLICY_RULE_GROUP
} BusPolicyRuleType;
struct BusPolicyRule
@@ -68,6 +67,18 @@ struct BusPolicyRule
char *service_name;
} own;
+ struct
+ {
+ char *user;
+ unsigned long uid;
+ } user;
+
+ struct
+ {
+ char *group;
+ unsigned long gid;
+ } group;
+
} d;
};
@@ -90,7 +101,8 @@ dbus_bool_t bus_policy_check_can_receive (BusPolicy *policy,
dbus_bool_t bus_policy_check_can_own (BusPolicy *policy,
DBusConnection *connection,
const DBusString *service_name);
-
-
+dbus_bool_t bus_policy_append_rule (BusPolicy *policy,
+ BusPolicyRule *rule);
+void bus_policy_optimize (BusPolicy *policy);
#endif /* BUS_POLICY_H */