[systemd-commits] src/libsystemd-bus
Kay Sievers
kay at kemper.freedesktop.org
Sun Apr 14 07:29:29 PDT 2013
src/libsystemd-bus/bus-kernel.c | 1 +
src/libsystemd-bus/test-bus-kernel.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 01f6c9d4685edbc38c8df9175286f0e312dc1938
Author: Kay Sievers <kay at vrfy.org>
Date: Sun Apr 14 16:28:34 2013 +0200
bus: zero data structure and catch up with error value change
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index 6105a02..b2d98c0 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -475,6 +475,7 @@ int bus_kernel_create(const char *name, char **s) {
l = strlen(name);
make = alloca(offsetof(struct kdbus_cmd_bus_make, name) + DECIMAL_STR_MAX(uid_t) + 1 + l + 1);
+ memset(make, 0, offsetof(struct kdbus_cmd_bus_make, name));
sprintf(make->name, "%lu-%s", (unsigned long) getuid(), name);
make->size = offsetof(struct kdbus_cmd_bus_make, name) + strlen(make->name) + 1;
make->flags = KDBUS_ACCESS_WORLD | KDBUS_POLICY_OPEN;
diff --git a/src/libsystemd-bus/test-bus-kernel.c b/src/libsystemd-bus/test-bus-kernel.c
index af82466..2164daf 100644
--- a/src/libsystemd-bus/test-bus-kernel.c
+++ b/src/libsystemd-bus/test-bus-kernel.c
@@ -115,7 +115,7 @@ int main(int argc, char *argv[]) {
assert_se(r >= 0);
r = sd_bus_release_name(a, "net.x0pointer.foobar");
- assert_se(r == -ENXIO);
+ assert_se(r == -ESRCH);
sd_bus_unref(a);
sd_bus_unref(b);
More information about the systemd-commits
mailing list