X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-hook.c;h=c1f93fabb92feb165b2ac27de44a0e70e693aad2;hb=e000e3b73ee0582882324e504fe2dae7386534f8;hp=545673f4103d3b34c2265146dbfa650006141049;hpb=05e0214d821f1a7604b4a0897907f347761b56e6;p=src%2Fapp-framework-binder.git diff --git a/src/afb-hook.c b/src/afb-hook.c index 545673f4..c1f93fab 100644 --- a/src/afb-hook.c +++ b/src/afb-hook.c @@ -32,6 +32,7 @@ #include "afb-context.h" #include "afb-hook.h" #include "afb-session.h" +#include "afb-cred.h" #include "afb-xreq.h" #include "afb-ditf.h" #include "verbose.h" @@ -95,7 +96,17 @@ static void _hook_xreq_(const struct afb_xreq *xreq, const char *format, ...) static void hook_xreq_begin_default_cb(void * closure, const struct afb_xreq *xreq) { - _hook_xreq_(xreq, "BEGIN"); + if (!xreq->cred) + _hook_xreq_(xreq, "BEGIN"); + else + _hook_xreq_(xreq, "BEGIN uid=%d=%s gid=%d pid=%d label=%s id=%s", + (int)xreq->cred->uid, + xreq->cred->user, + (int)xreq->cred->gid, + (int)xreq->cred->pid, + xreq->cred->label?:"(null)", + xreq->cred->id?:"(null)" + ); } static void hook_xreq_end_default_cb(void * closure, const struct afb_xreq *xreq)