chiark / gitweb /
sd-bus: get rid of PID starttime concept
[elogind.git] / src / libsystemd / sd-bus / kdbus.h
index 3e841f4003d55a4976858a94820a7b9445ec6e43..e2262de6ba3fb899c0e0e43f8c700668a0568d66 100644 (file)
@@ -70,26 +70,22 @@ struct kdbus_notify_name_change {
  *   KDBUS_ITEM_CREDS
  */
 struct kdbus_creds {
-       __u64 uid;
-       __u64 euid;
-       __u64 suid;
-       __u64 fsuid;
-       __u64 gid;
-       __u64 egid;
-       __u64 sgid;
-       __u64 fsgid;
+       __u32 uid;
+       __u32 euid;
+       __u32 suid;
+       __u32 fsuid;
+       __u32 gid;
+       __u32 egid;
+       __u32 sgid;
+       __u32 fsgid;
 };
 
 /**
  * struct kdbus_pids - process identifiers
  * @pid:               Process ID
  * @tid:               Thread ID
- * @starttime:         Starttime of the process
  *
- * The PID, TID and starttime of a process. The start tmie is useful to detect
- * PID overruns from the client side. i.e. if you use the PID to look something
- * up in /proc/$PID/ you can afterwards check the starttime field of it, to
- * ensure you didn't run into a PID overrun.
+ * The PID and TID of a process.
  *
  * Attached to:
  *   KDBUS_ITEM_PIDS
@@ -97,7 +93,6 @@ struct kdbus_creds {
 struct kdbus_pids {
        __u64 pid;
        __u64 tid;
-       __u64 starttime;
 };
 
 /**
@@ -124,8 +119,8 @@ struct kdbus_caps {
  *   KDBUS_ITEM_AUDIT
  */
 struct kdbus_audit {
-       __u64 sessionid;
-       __u64 loginuid;
+       __u32 sessionid;
+       __u32 loginuid;
 };
 
 /**
@@ -183,7 +178,8 @@ struct kdbus_bloom_filter {
 
 /**
  * struct kdbus_memfd - a kdbus memfd
- * @size:              The memfd's size
+ * @start:             The offset into the memfd where the segment starts
+ * @size:              The size of the memfd segment
  * @fd:                        The file descriptor number
  * @__pad:             Padding to ensure proper alignment and size
  *
@@ -191,6 +187,7 @@ struct kdbus_bloom_filter {
  *   KDBUS_ITEM_PAYLOAD_MEMFD
  */
 struct kdbus_memfd {
+       __u64 start;
        __u64 size;
        int fd;
        __u32 __pad;
@@ -583,12 +580,15 @@ enum kdbus_policy_type {
  *                             a service
  * @KDBUS_HELLO_MONITOR:       Special-purpose connection to monitor
  *                             bus traffic
+ * @KDBUS_HELLO_UNPRIVILEGED:  Don't treat this connection as privileged once
+ *                             the bus connection was established.
  */
 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_UNPRIVILEGED        =  1ULL <<  4,
 };
 
 /**
@@ -768,6 +768,7 @@ enum kdbus_name_list_flags {
  * @offset:            The returned offset in the caller's pool buffer.
  *                     The user must use KDBUS_CMD_FREE to free the
  *                     allocated memory.
+ * @size:              Output buffer to report size of data at @offset.
  *
  * This structure is used with the KDBUS_CMD_NAME_LIST ioctl.
  */
@@ -775,6 +776,7 @@ struct kdbus_cmd_name_list {
        __u64 flags;
        __u64 kernel_flags;
        __u64 offset;
+       __u64 size;
 } __attribute__((aligned(8)));
 
 /**
@@ -801,6 +803,7 @@ struct kdbus_name_list {
  * @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.
+ * @info_size:         Output buffer to report size of data at @offset.
  * @items:             The optional item list, containing the
  *                     well-known name to look up as a KDBUS_ITEM_NAME.
  *                     Only needed in case @id is zero.
@@ -815,6 +818,7 @@ struct kdbus_cmd_info {
        __u64 kernel_flags;
        __u64 id;
        __u64 offset;
+       __u64 info_size;
        struct kdbus_item items[0];
 } __attribute__((aligned(8)));