chiark / gitweb /
bus: sync with kdbus.git (ABI break)
authorDavid Herrmann <dh.herrmann@gmail.com>
Thu, 19 Feb 2015 19:02:40 +0000 (20:02 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 19 Feb 2015 19:02:40 +0000 (20:02 +0100)
This syncs up the new KDBUS_CMD_CONN_INFO behavior:
 - attach-flags are passed in .attach_flags, instead of directly merged
   with the command flags.

src/libsystemd/sd-bus/bus-control.c
src/libsystemd/sd-bus/kdbus.h

index 06e5b4fd9a5c0c7fb32c9ab02cffbb698e1259f9..bd439a95ddf625919be37ef48f6391f0e370783a 100644 (file)
@@ -654,7 +654,7 @@ int bus_get_name_creds_kdbus(
                 mask |= SD_BUS_CREDS_PID;
 
         cmd->size = size;
-        cmd->flags = attach_flags_to_kdbus(mask);
+        cmd->attach_flags = attach_flags_to_kdbus(mask);
 
         r = ioctl(bus->input_fd, KDBUS_CMD_CONN_INFO, cmd);
         if (r < 0)
@@ -919,7 +919,7 @@ static int bus_get_owner_creds_kdbus(sd_bus *bus, uint64_t mask, sd_bus_creds **
                      SD_BUS_CREDS_AUDIT_SESSION_ID|SD_BUS_CREDS_AUDIT_LOGIN_UID)))
                 mask |= SD_BUS_CREDS_PID;
 
-        cmd.flags = attach_flags_to_kdbus(mask);
+        cmd.attach_flags = attach_flags_to_kdbus(mask);
 
         r = ioctl(bus->input_fd, KDBUS_CMD_BUS_CREATOR_INFO, &cmd);
         if (r < 0)
index f7fbfd9929f600934b630b958583dfbd2b6d0cdf..4f321eb3ebebc707ec698d47fb44305d4159f392 100644 (file)
@@ -780,11 +780,13 @@ struct kdbus_cmd_list {
 /**
  * struct kdbus_cmd_info - struct used for KDBUS_CMD_CONN_INFO ioctl
  * @size:              The total size of the struct
- * @flags:             KDBUS_ATTACH_* flags, userspace → kernel
+ * @flags:             Flags for this ioctl, userspace → kernel
  * @return_flags:      Command return flags, kernel → userspace
  * @id:                        The 64-bit ID of the connection. If set to zero, passing
  *                     @name is required. kdbus will look up the name to
  *                     determine the ID in this case.
+ * @attach_flags:      Set of attach flags to specify the set of information
+ *                     to receive, userspace → kernel
  * @offset:            Returned offset in the caller's pool buffer where the
  *                     kdbus_info struct result is stored. The user must
  *                     use KDBUS_CMD_FREE to free the allocated memory.
@@ -802,6 +804,7 @@ struct kdbus_cmd_info {
        __u64 flags;
        __u64 return_flags;
        __u64 id;
+       __u64 attach_flags;
        __u64 offset;
        __u64 info_size;
        struct kdbus_item items[0];