X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-hook.c;h=909c5126119cf6b26faf4cfe93e199abc3863db6;hb=f3d1f19ae308cc0559728c0ccf6281cbce5ee37c;hp=6b1ab10c5eb191971cb873e8c7bda5b1e95f7cbe;hpb=0d3dc9722c610857c2f83c4f3bf06299f2426a95;p=src%2Fapp-framework-binder.git diff --git a/src/afb-hook.c b/src/afb-hook.c index 6b1ab10c..909c5126 100644 --- a/src/afb-hook.c +++ b/src/afb-hook.c @@ -217,16 +217,18 @@ static void _hook_xreq_(const struct afb_xreq *xreq, const char *format, ...) static void hook_xreq_begin_cb(void *closure, const struct afb_hookid *hookid, const struct afb_xreq *xreq) { - if (!xreq->cred) + struct afb_cred *cred = xreq->context.credentials; + + if (!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)" + (int)cred->uid, + cred->user, + (int)cred->gid, + (int)cred->pid, + cred->label?:"(null)", + cred->id?:"(null)" ); } @@ -1531,7 +1533,7 @@ static void _hook_session_(struct afb_session *session, const char *format, ...) static void hook_session_create_cb(void *closure, const struct afb_hookid *hookid, struct afb_session *session) { - _hook_session_(session, "create -> token=%s", afb_session_token(session)); + _hook_session_(session, "create"); } static void hook_session_close_cb(void *closure, const struct afb_hookid *hookid, struct afb_session *session)