X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-hook.c;h=54058dea8eed9447668b04c3a0d0b6e58cafdb7e;hb=04241c8168fe8826b4fc7a80500577b50936b57a;hp=7ae713e236d4088d3cc87d677eebd236d4cb9da0;hpb=b55a56d550d4a62a63e175f87c89a0a6c55e691e;p=src%2Fapp-framework-binder.git diff --git a/src/afb-hook.c b/src/afb-hook.c index 7ae713e2..54058dea 100644 --- a/src/afb-hook.c +++ b/src/afb-hook.c @@ -364,6 +364,11 @@ static void hook_xreq_context_make_default_cb(void *closure, const struct afb_ho _hook_xreq_(xreq, "context_make(replace=%s, %p, %p, %p) -> %p", replace?"yes":"no", create_value, free_value, create_closure, result); } +static void hook_xreq_get_uid_default_cb(void *closure, const struct afb_hookid *hookid, const struct afb_xreq *xreq, int result) +{ + _hook_xreq_(xreq, "get_uid() -> %d", result); +} + static struct afb_hook_xreq_itf hook_xreq_default_itf = { .hook_xreq_begin = hook_xreq_begin_default_cb, .hook_xreq_end = hook_xreq_end_default_cb, @@ -390,7 +395,8 @@ static struct afb_hook_xreq_itf hook_xreq_default_itf = { .hook_xreq_subcall_req_result = hook_xreq_subcall_req_result_default_cb, .hook_xreq_has_permission = hook_xreq_has_permission_default_cb, .hook_xreq_get_application_id = hook_xreq_get_application_id_default_cb, - .hook_xreq_context_make = hook_xreq_context_make_default_cb + .hook_xreq_context_make = hook_xreq_context_make_default_cb, + .hook_xreq_get_uid = hook_xreq_get_uid_default_cb, }; /****************************************************************************** @@ -556,6 +562,12 @@ void *afb_hook_xreq_context_make(const struct afb_xreq *xreq, int replace, void return result; } +int afb_hook_xreq_get_uid(const struct afb_xreq *xreq, int result) +{ + _HOOK_XREQ_(get_uid, xreq, result); + return result; +} + /****************************************************************************** * section: hooking xreqs *****************************************************************************/