chiark / gitweb /
sd-bus: allow setting a per-connection default value for the "allow-interactive-authe...
[elogind.git] / src / libsystemd / sd-bus / bus-internal.h
index 618e82c98f8bef1d934026009c72dd970b8c0fdc..bebb2c2fac37ec2aee4c96b8605d1a1381670959 100644 (file)
@@ -31,6 +31,7 @@
 #include "list.h"
 #include "util.h"
 #include "refcnt.h"
+#include "socket-util.h"
 
 #include "sd-bus.h"
 #include "bus-error.h"
@@ -142,6 +143,7 @@ struct sd_bus_slot {
         void *userdata;
         BusSlotType type:5;
         bool floating:1;
+        char *description;
 
         LIST_FIELDS(sd_bus_slot, slots);
 
@@ -205,9 +207,11 @@ struct sd_bus {
         bool nodes_modified:1;
         bool trusted:1;
         bool fake_creds_valid:1;
+        bool fake_pids_valid:1;
         bool manual_peer_interface:1;
         bool is_system:1;
         bool is_user:1;
+        bool allow_interactive_authorization:1;
 
         int use_memfd;
 
@@ -230,7 +234,7 @@ struct sd_bus {
 
         struct bus_match_node match_callbacks;
         Prioq *reply_callbacks_prioq;
-        Hashmap *reply_callbacks;
+        OrderedHashmap *reply_callbacks;
         LIST_HEAD(struct filter_callback, filter_callbacks);
 
         Hashmap *nodes;
@@ -242,6 +246,7 @@ struct sd_bus {
 
         char *kernel;
         char *machine;
+        pid_t nspid;
 
         sd_id128_t server_id;
 
@@ -298,16 +303,19 @@ struct sd_bus {
 
         sd_bus_message *current_message;
         sd_bus_slot *current_slot;
+        sd_bus_message_handler_t current_handler;
+        void *current_userdata;
 
         sd_bus **default_bus_ptr;
         pid_t tid;
 
         struct kdbus_creds fake_creds;
+        struct kdbus_pids fake_pids;
         char *fake_label;
 
         char *cgroup_root;
 
-        char *connection_name;
+        char *description;
 
         size_t bloom_size;
         unsigned bloom_n_hash;
@@ -337,6 +345,7 @@ struct sd_bus {
 
 bool interface_name_is_valid(const char *p) _pure_;
 bool service_name_is_valid(const char *p) _pure_;
+char* service_name_startswith(const char *a, const char *b);
 bool member_name_is_valid(const char *p) _pure_;
 bool object_path_is_valid(const char *p) _pure_;
 char *object_path_startswith(const char *a, const char *b) _pure_;
@@ -378,6 +387,8 @@ char *bus_address_escape(const char *v);
 int bus_set_address_system(sd_bus *bus);
 int bus_set_address_user(sd_bus *bus);
 int bus_set_address_system_remote(sd_bus *b, const char *host);
-int bus_set_address_system_container(sd_bus *b, const char *machine);
+int bus_set_address_system_machine(sd_bus *b, const char *machine);
 
 int bus_remove_match_by_string(sd_bus *bus, const char *match, sd_bus_message_handler_t callback, void *userdata);
+
+int bus_get_root_path(sd_bus *bus);