diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-10 01:07:09 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-10 01:07:09 +0100 |
commit | e1d337d4626728545748302735e9e382b5741e83 (patch) | |
tree | 99b42eae3bb895560d3de2bd00a02aa0dababdc8 /src/libsystemd-bus/bus-socket.c | |
parent | d36b70313666b334cc01c0c2344070341f7d0eb3 (diff) |
bus: only accept gvariant native endian messages via kdbus
Diffstat (limited to 'src/libsystemd-bus/bus-socket.c')
-rw-r--r-- | src/libsystemd-bus/bus-socket.c | 7 |
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); } |