summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus/bus-socket.c')
-rw-r--r--src/libsystemd-bus/bus-socket.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-socket.c b/src/libsystemd-bus/bus-socket.c
index 69f78c9a58..a449ce0eb3 100644
--- a/src/libsystemd-bus/bus-socket.c
+++ b/src/libsystemd-bus/bus-socket.c
@@ -623,6 +623,9 @@ int bus_socket_setup(sd_bus *b) {
if (getsockopt(b->input_fd, SOL_SOCKET, SO_PEERCRED, &b->ucred, &l) >= 0 && l >= sizeof(b->ucred))
b->ucred_valid = b->ucred.pid > 0;
+ b->is_kernel = false;
+ b->message_version = 1;
+
return 0;
}
@@ -765,6 +768,10 @@ int bus_socket_exec(sd_bus *b) {
close_nointr_nofail(s[1]);
b->output_fd = b->input_fd = s[0];
+ r = bus_socket_setup(b);
+ if (r < 0)
+ return r;
+
return bus_socket_start_auth(b);
}