summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-04-12 16:45:37 +0200
committerKay Sievers <kay@vrfy.org>2013-04-12 16:45:37 +0200
commit1b9abbf0d834bbd61bde1d97eaf7d59776144077 (patch)
treebc862fd5e3986c32e4aa2a37b8769eb182607845
parentf08838da225678269945868a71bbdc79de967e1d (diff)
bus: create kdbus bus without an active policy
-rw-r--r--src/libsystemd-bus/bus-kernel.c2
-rw-r--r--src/libsystemd-bus/kdbus.h1
-rw-r--r--src/libsystemd-bus/test-bus-kernel.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index 9d0be7a190..2b3f46a64b 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -408,7 +408,7 @@ int bus_kernel_create(const char *name, char **s) {
fname = alloca(offsetof(struct kdbus_cmd_fname, name) + DECIMAL_STR_MAX(uid_t) + 1 + l + 1);
sprintf(fname->name, "%lu-%s", (unsigned long) getuid(), name);
fname->size = offsetof(struct kdbus_cmd_fname, name) + strlen(fname->name) + 1;
- fname->kernel_flags = KDBUS_CMD_FNAME_ACCESS_WORLD;
+ fname->kernel_flags = KDBUS_CMD_FNAME_ACCESS_WORLD | KDBUS_CMD_FNAME_POLICY_NONE;
fname->user_flags = 0;
p = strjoin("/dev/kdbus/", fname->name, "/bus", NULL);
diff --git a/src/libsystemd-bus/kdbus.h b/src/libsystemd-bus/kdbus.h
index ba59fd0d37..16d2d1adbf 100644
--- a/src/libsystemd-bus/kdbus.h
+++ b/src/libsystemd-bus/kdbus.h
@@ -201,6 +201,7 @@ enum {
enum {
KDBUS_CMD_FNAME_ACCESS_GROUP = 1,
KDBUS_CMD_FNAME_ACCESS_WORLD = 2,
+ KDBUS_CMD_FNAME_POLICY_NONE = 4,
};
struct kdbus_cmd_hello {
diff --git a/src/libsystemd-bus/test-bus-kernel.c b/src/libsystemd-bus/test-bus-kernel.c
index f519bf61cb..14029ff561 100644
--- a/src/libsystemd-bus/test-bus-kernel.c
+++ b/src/libsystemd-bus/test-bus-kernel.c
@@ -92,7 +92,7 @@ int main(int argc, char *argv[]) {
assert_se(r >= 0);
r = sd_bus_release_name(a, "net.0pointer.foobar");
- assert_se(r < 0);
+ assert_se(r >= 0);
sd_bus_unref(a);
sd_bus_unref(b);