chiark / gitweb /
bus: add new sd_bus_creds object to encapsulate process credentials
[elogind.git] / src / libsystemd-bus / bus-internal.h
index 4f9d941c6331bd4048352b875a01d2f3ed6754ba..accb83849b32ae3be3005cf90f1fce3daba53cda 100644 (file)
@@ -119,11 +119,12 @@ enum bus_state {
         BUS_AUTHENTICATING,
         BUS_HELLO,
         BUS_RUNNING,
+        BUS_CLOSING,
         BUS_CLOSED
 };
 
 static inline bool BUS_IS_OPEN(enum bus_state state) {
-        return state > BUS_UNSET && state < BUS_CLOSED;
+        return state > BUS_UNSET && state < BUS_CLOSING;
 }
 
 enum bus_auth {
@@ -155,7 +156,6 @@ struct sd_bus {
         bool anonymous_auth:1;
         bool prefer_readv:1;
         bool prefer_writev:1;
-        bool processing:1;
         bool match_callbacks_modified:1;
         bool filter_callbacks_modified:1;
         bool nodes_modified:1;
@@ -182,8 +182,6 @@ struct sd_bus {
         LIST_HEAD(struct filter_callback, filter_callbacks);
 
         Hashmap *nodes;
-
-
         Hashmap *vtable_methods;
         Hashmap *vtable_properties;
 
@@ -215,6 +213,8 @@ struct sd_bus {
         struct ucred ucred;
         char label[NAME_MAX];
 
+        uint64_t creds_mask;
+
         int *fds;
         unsigned n_fds;
 
@@ -274,7 +274,6 @@ struct sd_bus {
 
 bool interface_name_is_valid(const char *p);
 bool service_name_is_valid(const char *p);
-bool sender_name_is_valid(const char *p);
 bool member_name_is_valid(const char *p);
 bool object_path_is_valid(const char *p);
 char *object_path_startswith(const char *a, const char *b);
@@ -307,4 +306,4 @@ char *bus_address_escape(const char *v);
  * bus from the callback doesn't destroy the object we are working
  * on */
 #define BUS_DONT_DESTROY(bus) \
-        _cleanup_bus_unref_ sd_bus *_dont_destroy_##bus = sd_bus_ref(bus)
+        _cleanup_bus_unref_ _unused_ sd_bus *_dont_destroy_##bus = sd_bus_ref(bus)