[systemd-commits] src/libsystemd

Daniel Mack zonque at kemper.freedesktop.org
Tue Oct 14 11:05:57 PDT 2014


 src/libsystemd/sd-bus/bus-kernel.c |    1 +
 src/libsystemd/sd-bus/kdbus.h      |    9 ++++++---
 src/libsystemd/sd-bus/sd-bus.c     |    2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 1a2409e262da65a4b0ca8ab18fcf5eabd2d404ca
Author: Daniel Mack <daniel at zonque.org>
Date:   Tue Oct 14 20:03:06 2014 +0200

    sd-bus: sync kdbus.h (ABI break)
    
    kdbus learned KDBUS_HELLO_ACCEPT_MEMFD as new connection negotiation
    flag. Set it by default in systemd for now.

diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index c3dbc83..27899c1 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -1566,6 +1566,7 @@ int bus_kernel_make_starter(
 
         hello->size = size;
         hello->conn_flags =
+                KDBUS_HELLO_ACCEPT_MEMFD |
                 (activating ? KDBUS_HELLO_ACTIVATOR : KDBUS_HELLO_POLICY_HOLDER) |
                 (accept_fd ? KDBUS_HELLO_ACCEPT_FD : 0);
         hello->pool_size = KDBUS_POOL_SIZE;
diff --git a/src/libsystemd/sd-bus/kdbus.h b/src/libsystemd/sd-bus/kdbus.h
index 79a17f3..1ea4329 100644
--- a/src/libsystemd/sd-bus/kdbus.h
+++ b/src/libsystemd/sd-bus/kdbus.h
@@ -500,6 +500,8 @@ enum kdbus_policy_type {
  * enum kdbus_hello_flags - flags for struct kdbus_cmd_hello
  * @KDBUS_HELLO_ACCEPT_FD:	The connection allows the reception of
  *				any passed file descriptors
+ * @KDBUS_HELLO_ACCEPT_MEMFD:	The connection allows the reception of
+ *				any passed memfd file descriptors
  * @KDBUS_HELLO_ACTIVATOR:	Special-purpose connection which registers
  *				a well-know name for a process to be started
  *				when traffic arrives
@@ -514,9 +516,10 @@ enum kdbus_policy_type {
  */
 enum kdbus_hello_flags {
 	KDBUS_HELLO_ACCEPT_FD		=  1ULL <<  0,
-	KDBUS_HELLO_ACTIVATOR		=  1ULL <<  1,
-	KDBUS_HELLO_POLICY_HOLDER	=  1ULL <<  2,
-	KDBUS_HELLO_MONITOR		=  1ULL <<  3,
+	KDBUS_HELLO_ACCEPT_MEMFD	=  1ULL <<  1,
+	KDBUS_HELLO_ACTIVATOR		=  1ULL <<  2,
+	KDBUS_HELLO_POLICY_HOLDER	=  1ULL <<  3,
+	KDBUS_HELLO_MONITOR		=  1ULL <<  4,
 };
 
 /**
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index 549f9e0..e34a6bb 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -171,7 +171,7 @@ _public_ int sd_bus_new(sd_bus **ret) {
         r->input_fd = r->output_fd = -1;
         r->message_version = 1;
         r->creds_mask |= SD_BUS_CREDS_WELL_KNOWN_NAMES|SD_BUS_CREDS_UNIQUE_NAME;
-        r->hello_flags |= KDBUS_HELLO_ACCEPT_FD;
+        r->hello_flags |= KDBUS_HELLO_ACCEPT_FD | KDBUS_HELLO_ACCEPT_MEMFD;
         r->attach_flags |= KDBUS_ATTACH_NAMES;
         r->original_pid = getpid();
 



More information about the systemd-commits mailing list