chiark / gitweb /
bus: update kdbus.h (ABI break)
authorKay Sievers <kay@vrfy.org>
Sat, 1 Feb 2014 13:41:13 +0000 (14:41 +0100)
committerKay Sievers <kay@vrfy.org>
Sat, 1 Feb 2014 16:21:36 +0000 (17:21 +0100)
src/core/manager.c
src/libsystemd/sd-bus/PORTING-DBUS1
src/libsystemd/sd-bus/bus-kernel.c
src/libsystemd/sd-bus/bus-kernel.h
src/libsystemd/sd-bus/kdbus.h
src/nspawn/nspawn.c

index b181aa0453eb9a7b593d20d10f5cfa428bc8316a..3f8bf58be202f4bf2b92f77df98d4458b140327c 100644 (file)
@@ -599,7 +599,7 @@ static int manager_setup_kdbus(Manager *m) {
          * necessary to ensure that users cannot get access to busses
          * of virtualized users when no UID namespacing is used. */
         if (m->running_as == SYSTEMD_SYSTEM)
-                mkdir_p_label("/dev/kdbus/ns", 0700);
+                mkdir_p_label("/dev/kdbus/domain", 0700);
 #endif
 
         return 0;
index 492f55b4b1ebf367475b858d1d68b9b27fd08095..90d184b78622bad9cc590b1a796b00ea242e068d 100644 (file)
@@ -508,7 +508,7 @@ have attached. Note that when issuing the ioctl, you can select a
 different set of credentials to gather, than what was originally requested
 for being attached to incoming messages.
 
-Credentials are always specific to the sender namespace that was
+Credentials are always specific to the sender's domain that was
 current at the time of sending, and of the process that opened the
 bus connection at the time of opening it. Note that this latter data
 is cached!
index 26cd806b55e4cb015ebc1c8e08379e171e0faba1..712ef00fcb8c69d899923cb6b13954bd4368855e 100644 (file)
@@ -1388,7 +1388,7 @@ int bus_kernel_create_starter(const char *bus, const char *name) {
         return fd;
 }
 
-int bus_kernel_create_namespace(const char *name, char **s) {
+int bus_kernel_create_domain(const char *name, char **s) {
         struct kdbus_cmd_make *make;
         struct kdbus_item *n;
         int fd;
@@ -1412,7 +1412,7 @@ int bus_kernel_create_namespace(const char *name, char **s) {
         make->size = ALIGN8(offsetof(struct kdbus_cmd_make, items) + n->size);
         make->flags = KDBUS_MAKE_POLICY_OPEN | KDBUS_MAKE_ACCESS_WORLD;
 
-        if (ioctl(fd, KDBUS_CMD_NS_MAKE, make) < 0) {
+        if (ioctl(fd, KDBUS_CMD_DOMAIN_MAKE, make) < 0) {
                 close_nointr_nofail(fd);
                 return -errno;
         }
@@ -1427,7 +1427,7 @@ int bus_kernel_create_namespace(const char *name, char **s) {
         if (s) {
                 char *p;
 
-                p = strappend("/dev/kdbus/ns/", name);
+                p = strappend("/dev/kdbus/domain/", name);
                 if (!p) {
                         close_nointr_nofail(fd);
                         return -ENOMEM;
index de02b84f882a6fc5912f209adabadca800cfd6aa..8db418a14d95dabfa3911ec4f5d1961b976beaea 100644 (file)
@@ -64,7 +64,7 @@ int bus_kernel_write_message(sd_bus *bus, sd_bus_message *m, bool hint_sync_call
 int bus_kernel_read_message(sd_bus *bus, bool hint_priority, int64_t priority);
 
 int bus_kernel_create_bus(const char *name, bool world, char **s);
-int bus_kernel_create_namespace(const char *name, char **s);
+int bus_kernel_create_domain(const char *name, char **s);
 int bus_kernel_create_starter(const char *bus, const char *name);
 int bus_kernel_create_monitor(const char *bus);
 
index bdaf25e6ed8ce01cc0f21c8016fce4bcd1b6539c..c9a894015975110d9b10e234d52ea71cb49731c7 100644 (file)
@@ -105,7 +105,7 @@ struct kdbus_audit {
 
 /**
  * struct kdbus_timestamp
- * @seqnum:            Global per-namespace message sequence number
+ * @seqnum:            Global per-domain message sequence number
  * @monotonic_ns:      Monotonic timestamp, in nanoseconds
  * @realtime_ns:       Realtime timestamp, in nanoseconds
  *
@@ -233,7 +233,7 @@ struct kdbus_policy {
  * @KDBUS_ITEM_BLOOM_MASK:     Bloom mask used to match against a message's
  *                             bloom filter
  * @KDBUS_ITEM_DST_NAME:       Destination's well-known name
- * @KDBUS_ITEM_MAKE_NAME:      Name of namespace, bus, endpoint
+ * @KDBUS_ITEM_MAKE_NAME:      Name of domain, bus, endpoint
  * @KDBUS_ITEM_MEMFD_NAME:     The human readable name of a memfd (debugging)
  * @KDBUS_ITEM_ATTACH_FLAGS:   Attach-flags, used for updating which metadata
  *                             a connection subscribes to
@@ -592,13 +592,13 @@ enum kdbus_make_flags {
 };
 
 /**
- * struct kdbus_cmd_make - struct to make a bus, an endpoint or a namespace
+ * struct kdbus_cmd_make - struct to make a bus, an endpoint or a domain
  * @size:              The total size of the struct
- * @flags:             Properties for the bus/ep/ns to create
+ * @flags:             Properties for the bus/ep/domain to create
  * @items:             Items describing details
  *
  * This structure is used with the KDBUS_CMD_BUS_MAKE, KDBUS_CMD_EP_MAKE and
- * KDBUS_CMD_NS_MAKE ioctls.
+ * KDBUS_CMD_DOMAIN_MAKE ioctls.
  */
 struct kdbus_cmd_make {
        __u64 size;
@@ -781,8 +781,8 @@ struct kdbus_cmd_memfd_make {
  *                             name. The bus is immediately shut down and
  *                             cleaned up when the opened "control" device node
  *                             is closed.
- * @KDBUS_CMD_NS_MAKE:         Similar to KDBUS_CMD_BUS_MAKE, but it creates a
- *                             new kdbus namespace.
+ * @KDBUS_CMD_DOMAIN_MAKE:             Similar to KDBUS_CMD_BUS_MAKE, but it creates a
+ *                             new kdbus domain.
  * @KDBUS_CMD_EP_MAKE:         Creates a new named special endpoint to talk to
  *                             the bus. Such endpoints usually carry a more
  *                             restrictive policy and grant restricted access
@@ -853,7 +853,7 @@ struct kdbus_cmd_memfd_make {
  */
 enum kdbus_ioctl_type {
        KDBUS_CMD_BUS_MAKE =            _IOW (KDBUS_IOC_MAGIC, 0x00, struct kdbus_cmd_make),
-       KDBUS_CMD_NS_MAKE =             _IOW (KDBUS_IOC_MAGIC, 0x10, struct kdbus_cmd_make),
+       KDBUS_CMD_DOMAIN_MAKE =         _IOW (KDBUS_IOC_MAGIC, 0x10, struct kdbus_cmd_make),
        KDBUS_CMD_EP_MAKE =             _IOW (KDBUS_IOC_MAGIC, 0x20, struct kdbus_cmd_make),
 
        KDBUS_CMD_HELLO =               _IOWR(KDBUS_IOC_MAGIC, 0x30, struct kdbus_cmd_hello),
@@ -897,7 +897,7 @@ enum kdbus_ioctl_type {
  *                     inconsistent types.
  * @EBUSY:             The user tried to say BYEBYE to a connection, but the
  *                     connection had a non-empty message list.
- * @ECANCELED:         A syncronous message sending was cancelled.
+ * @ECANCELED:         A synchronous message sending was cancelled.
  * @ECONNRESET:                A connection is shut down, no further operations are
  *                     possible.
  * @ECOMM:             A peer does not accept the file descriptors addressed
@@ -905,7 +905,7 @@ enum kdbus_ioctl_type {
  * @EDESTADDRREQ:      The well-known bus name is required but missing.
  * @EDOM:              The size of data does not match the expectations. Used
  *                     for bloom bit field sizes.
- * @EEXIST:            A requested namespace, bus or endpoint with the same
+ * @EEXIST:            A requested domain, bus or endpoint with the same
  *                     name already exists.  A specific data type, which is
  *                     only expected once, is provided multiple times.
  * @EFAULT:            The supplied memory could not be accessed, or the data
@@ -947,7 +947,7 @@ enum kdbus_ioctl_type {
  * @EPIPE:             When sending a message, a synchronous reply from the
  *                     receiving connection was expected but the connection
  *                     died before answering.
- * @ESHUTDOWN:         A namespace or endpoint is currently shutting down;
+ * @ESHUTDOWN:         A domain or endpoint is currently shutting down;
  *                     no further operations will be possible.
  * @ESRCH:             A requested well-known bus name is not found.
  * @ETIMEDOUT:         A synchronous wait for a message reply did not arrive
index 5352b95ec69776b20c103ac6a1a4736dfe870fa8..f0e7b0619fd6eb44958e8f4c0605e4f0fba86f48 100644 (file)
@@ -974,7 +974,7 @@ static int setup_kdbus(const char *dest, const char *path) {
         }
 
         if (mount(path, p, "bind", MS_BIND, NULL) < 0) {
-                log_error("Failed to mount kdbus namespace path: %m");
+                log_error("Failed to mount kdbus domain path: %m");
                 return -errno;
         }
 
@@ -1092,7 +1092,7 @@ int main(int argc, char *argv[]) {
         sigset_t mask;
         _cleanup_close_pipe_ int kmsg_socket_pair[2] = { -1, -1 };
         _cleanup_fdset_free_ FDSet *fds = NULL;
-        _cleanup_free_ char *kdbus_namespace = NULL;
+        _cleanup_free_ char *kdbus_domain = NULL;
         const char *ns;
 
         log_parse_environment();
@@ -1195,11 +1195,11 @@ int main(int argc, char *argv[]) {
         }
 
         ns = strappenda("machine-", arg_machine);
-        kdbus_fd = bus_kernel_create_namespace(ns, &kdbus_namespace);
+        kdbus_fd = bus_kernel_create_domain(ns, &kdbus_domain);
         if (r < 0)
-                log_debug("Failed to create kdbus namespace: %s", strerror(-r));
+                log_debug("Failed to create kdbus domain: %s", strerror(-r));
         else
-                log_debug("Successfully created kdbus namespace as %s", kdbus_namespace);
+                log_debug("Successfully created kdbus domain as %s", kdbus_domain);
 
         if (socketpair(AF_UNIX, SOCK_DGRAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0, kmsg_socket_pair) < 0) {
                 log_error("Failed to create kmsg socket pair: %m");
@@ -1356,7 +1356,7 @@ int main(int argc, char *argv[]) {
                         if (mount_binds(arg_directory, arg_bind_ro, MS_RDONLY) < 0)
                                 goto child_fail;
 
-                        if (setup_kdbus(arg_directory, kdbus_namespace) < 0)
+                        if (setup_kdbus(arg_directory, kdbus_domain) < 0)
                                 goto child_fail;
 
                         if (chdir(arg_directory) < 0) {