X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbus-proxyd%2Fproxy.c;h=0c851f93c14fb4cf4bb4b8bd334a9d7d38ff6531;hb=c29005212dc38d98c707639d1a82ffa5270f2e97;hp=73f68b7874c28e901886e74aaff838602dbe30ef;hpb=c74f883c6f7d5901b3c543d47f64082ccd91a895;p=elogind.git diff --git a/src/bus-proxyd/proxy.c b/src/bus-proxyd/proxy.c index 73f68b787..0c851f93c 100644 --- a/src/bus-proxyd/proxy.c +++ b/src/bus-proxyd/proxy.c @@ -23,30 +23,20 @@ ***/ #include -#include #include -#include -#include #include #include #include -#include -#include #include "log.h" #include "util.h" -#include "socket-util.h" #include "sd-daemon.h" #include "sd-bus.h" #include "bus-internal.h" #include "bus-message.h" #include "bus-util.h" -#include "build.h" #include "strv.h" -#include "def.h" -#include "capability.h" #include "bus-control.h" -#include "smack-util.h" #include "set.h" #include "bus-xml-policy.h" #include "driver.h" @@ -81,14 +71,14 @@ static int proxy_create_destination(Proxy *p, const char *destination, const cha b->fake_pids.pid = p->local_creds.pid; b->fake_pids_valid = true; - b->fake_creds.uid = p->local_creds.uid; + b->fake_creds.uid = UID_INVALID; b->fake_creds.euid = p->local_creds.uid; - b->fake_creds.suid = p->local_creds.uid; - b->fake_creds.fsuid = p->local_creds.uid; - b->fake_creds.gid = p->local_creds.gid; + b->fake_creds.suid = UID_INVALID; + b->fake_creds.fsuid = UID_INVALID; + b->fake_creds.gid = GID_INVALID; b->fake_creds.egid = p->local_creds.gid; - b->fake_creds.sgid = p->local_creds.gid; - b->fake_creds.fsgid = p->local_creds.gid; + b->fake_creds.sgid = GID_INVALID; + b->fake_creds.fsgid = GID_INVALID; b->fake_creds_valid = true; } @@ -729,7 +719,10 @@ static int proxy_process_destination_to_local(Proxy *p) { /* Return the error to the client, if we can */ synthetic_reply_method_errnof(m, r, "Failed to forward message we got from destination: %m"); - log_error_errno(r, "Failed to send message to client, ignoring: %m"); + log_error_errno(r, + "Failed to forward message we got from destination: uid=" UID_FMT " gid=" GID_FMT" message=%s destination=%s path=%s interface=%s member=%s: %m", + p->local_creds.uid, p->local_creds.gid, bus_message_type_to_string(m->header->type), + strna(m->destination), strna(m->path), strna(m->interface), strna(m->member)); return 1; } @@ -799,7 +792,10 @@ static int proxy_process_local_to_destination(Proxy *p) { return 1; synthetic_reply_method_errnof(m, r, "Failed to forward message we got from local: %m"); - log_error_errno(r, "Failed to send message to bus: %m"); + log_error_errno(r, + "Failed to forward message we got from local: uid=" UID_FMT " gid=" GID_FMT" message=%s destination=%s path=%s interface=%s member=%s: %m", + p->local_creds.uid, p->local_creds.gid, bus_message_type_to_string(m->header->type), + strna(m->destination), strna(m->path), strna(m->interface), strna(m->member)); return 1; }