chiark / gitweb /
libsystemd-bus: copy over kdbus provided 128-bit bus id
[elogind.git] / src / libsystemd-bus / bus-kernel.c
index 959392a62d742c1f3d093879b0b4530cd64e3f98..d2fcfd7f928e38780053e31be826f408d002eeb0 100644 (file)
@@ -357,6 +357,9 @@ int bus_kernel_take_fd(sd_bus *b) {
         b->bus_client = true;
         b->can_fds = !!(hello.conn_flags & KDBUS_HELLO_ACCEPT_FD);
 
+        /* the kernel told us the UUID of the underlying bus */
+        memcpy(b->server_id.bytes, hello.id128, sizeof(b->server_id.bytes));
+
         r = bus_start_running(b);
         if (r < 0)
                 return r;