diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-07-07 03:48:37 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-07-07 04:13:19 +0200 |
commit | a822056bca49a63cb832230af22f789c5ab5b856 (patch) | |
tree | 59f96a8149848eee738db79d2ccd9373b11e61b7 /src/initctl.c | |
parent | f4579ce704b9db0358b90c282da9536410a4df5a (diff) |
initctl: check peer credentials after connection
Diffstat (limited to 'src/initctl.c')
-rw-r--r-- | src/initctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/initctl.c b/src/initctl.c index a18cf384a4..7241acb8df 100644 --- a/src/initctl.c +++ b/src/initctl.c @@ -41,6 +41,7 @@ #include "initreq.h" #include "special.h" #include "sd-daemon.h" +#include "dbus-common.h" #define SERVER_FD_MAX 16 #define TIMEOUT ((int) (10*MSEC_PER_SEC)) @@ -300,6 +301,10 @@ static int server_init(Server *s, unsigned n_sockets) { log_error("Failed to get D-Bus connection: %s", error.message); goto fail; } + if ((r = bus_check_peercred(s->bus)) < 0) { + log_error("Bus connection failed peer credential check: %s", strerror(-r)); + goto fail; + } return 0; |