summaryrefslogtreecommitdiff
path: root/src/core/busname.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2014-03-06 22:42:42 +0100
committerDaniel Mack <zonque@gmail.com>2014-03-07 19:14:05 +0100
commit54d76c92868838e17d6aad0a3bb0cc7a5b11e35f (patch)
treec094188e6eb2ac57b19bc64acc295654c160185d /src/core/busname.c
parentfb255b31c5f4eca821d60a2c9b1235a513f15732 (diff)
busname: add parser for bus name policies
There are three directives to specify bus name polices in .busname files: * AllowUser [username] [access] * AllowGroup [groupname] [access] * AllowWorld [access] Where [access] is one of * 'see': The user/group/world is allowed to see a name on the bus * 'talk': The user/group/world is allowed to talk to a name * 'own': The user/group/world is allowed to own a name There is no user added yet in this commit.
Diffstat (limited to 'src/core/busname.c')
-rw-r--r--src/core/busname.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/busname.c b/src/core/busname.c
index bca214502..4806e741c 100644
--- a/src/core/busname.c
+++ b/src/core/busname.c
@@ -553,6 +553,14 @@ static const char* const busname_result_table[_BUSNAME_RESULT_MAX] = {
DEFINE_STRING_TABLE_LOOKUP(busname_result, BusNameResult);
+static const char* const busname_policy_access_table[_BUSNAME_POLICY_ACCESS_MAX] = {
+ [BUSNAME_POLICY_ACCESS_SEE] = "see",
+ [BUSNAME_POLICY_ACCESS_TALK] = "talk",
+ [BUSNAME_POLICY_ACCESS_OWN] = "own",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(busname_policy_access, BusNamePolicyAccess);
+
const UnitVTable busname_vtable = {
.object_size = sizeof(BusName),