#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"
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)