diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-10-10 18:21:54 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-10-10 20:28:40 +0200 |
commit | 04241c8168fe8826b4fc7a80500577b50936b57a (patch) | |
tree | 145d56f7357b463dabe60c2126348b9126edfbb0 /src/afb-hook.h | |
parent | b55a56d550d4a62a63e175f87c89a0a6c55e691e (diff) |
Add the function afb_req_get_uid
Change-Id: I9caf38ee3811cf10b546489094f0bb5b3d844c40
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-hook.h')
-rw-r--r-- | src/afb-hook.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/afb-hook.h b/src/afb-hook.h index b7fd88d8..c9ecb331 100644 --- a/src/afb-hook.h +++ b/src/afb-hook.h @@ -77,6 +77,7 @@ struct afb_hookid #define afb_hook_flag_req_has_permission 0x00800000 #define afb_hook_flag_req_get_application_id 0x01000000 #define afb_hook_flag_req_context_make 0x02000000 +#define afb_hook_flag_req_get_uid 0x04000000 /* common flags */ #define afb_hook_flags_req_life (afb_hook_flag_req_begin|afb_hook_flag_req_end) @@ -87,7 +88,8 @@ struct afb_hookid #define afb_hook_flags_req_subcalls (afb_hook_flag_req_subcall|afb_hook_flag_req_subcall_result\ |afb_hook_flag_req_subcall_req|afb_hook_flag_req_subcall_req_result\ |afb_hook_flag_req_subcallsync|afb_hook_flag_req_subcallsync_result) -#define afb_hook_flags_req_security (afb_hook_flag_req_has_permission|afb_hook_flag_req_get_application_id) +#define afb_hook_flags_req_security (afb_hook_flag_req_has_permission|afb_hook_flag_req_get_application_id\ + |afb_hook_flag_req_get_uid) /* extra flags */ #define afb_hook_flags_req_ref (afb_hook_flag_req_addref|afb_hook_flag_req_unref) @@ -130,6 +132,7 @@ struct afb_hook_xreq_itf { void (*hook_xreq_has_permission)(void *closure, const struct afb_hookid *hookid, const struct afb_xreq *xreq, const char *permission, int result); void (*hook_xreq_get_application_id)(void *closure, const struct afb_hookid *hookid, const struct afb_xreq *xreq, char *result); void (*hook_xreq_context_make)(void *closure, const struct afb_hookid *hookid, const struct afb_xreq *xreq, int replace, void *(*create_value)(void*), void (*free_value)(void*), void *create_closure, void *result); + void (*hook_xreq_get_uid)(void *closure, const struct afb_hookid *hookid, const struct afb_xreq *xreq, int result); }; extern void afb_hook_init_xreq(struct afb_xreq *xreq); @@ -165,6 +168,7 @@ extern void afb_hook_xreq_subcall_req_result(const struct afb_xreq *xreq, int st extern int afb_hook_xreq_has_permission(const struct afb_xreq *xreq, const char *permission, int result); extern char *afb_hook_xreq_get_application_id(const struct afb_xreq *xreq, char *result); extern void *afb_hook_xreq_context_make(const struct afb_xreq *xreq, int replace, void *(*create_value)(void*), void (*free_value)(void*), void *create_closure, void *result); +extern int afb_hook_xreq_get_uid(const struct afb_xreq *xreq, int result); /********************************************************* * section hooking export (daemon interface) |