chiark / gitweb /
bus: fake client side creds in the proxy to the caller's creds
[elogind.git] / src / libsystemd-bus / bus-internal.h
index 1be7488..673f30e 100644 (file)
@@ -36,6 +36,7 @@
 #include "bus-error.h"
 #include "bus-match.h"
 #include "bus-kernel.h"
+#include "kdbus.h"
 
 struct reply_callback {
         sd_bus_message_handler_t callback;
@@ -147,6 +148,7 @@ struct sd_bus {
         enum bus_state state;
         int input_fd, output_fd;
         int message_version;
+        int message_endian;
 
         bool is_kernel:1;
         bool can_fds:1;
@@ -160,6 +162,7 @@ struct sd_bus {
         bool filter_callbacks_modified:1;
         bool nodes_modified:1;
         bool trusted:1;
+        bool fake_creds_valid:1;
 
         int use_memfd;
 
@@ -167,11 +170,13 @@ struct sd_bus {
         size_t rbuffer_size;
 
         sd_bus_message **rqueue;
-        unsigned rqueue_size, rqueue_allocated;
+        unsigned rqueue_size;
+        size_t rqueue_allocated;
 
         sd_bus_message **wqueue;
         unsigned wqueue_size;
         size_t windex;
+        size_t wqueue_allocated;
 
         uint64_t serial;
 
@@ -250,11 +255,15 @@ struct sd_bus {
         sd_event_source *time_event_source;
         sd_event_source *quit_event_source;
         sd_event *event;
+        int event_priority;
 
         sd_bus_message *current;
 
         sd_bus **default_bus_ptr;
         pid_t tid;
+
+        struct kdbus_creds fake_creds;
+        char *fake_label;
 };
 
 #define BUS_DEFAULT_TIMEOUT ((usec_t) (25 * USEC_PER_SEC))