X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-cred.h;h=46639408371ab41809f29e3d5d574453c2816220;hb=b70caad7da2eaea85db06dec8377b1cbebcec997;hp=5bd5423352b6a16765b66de1cff9038f88aad4e1;hpb=a05138e6bf1257b0e7b1ad90c974fb9e12f1d040;p=src%2Fapp-framework-binder.git diff --git a/src/afb-cred.h b/src/afb-cred.h index 5bd54233..46639408 100644 --- a/src/afb-cred.h +++ b/src/afb-cred.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 "IoT.bzh" + * Copyright (C) 2017-2019 "IoT.bzh" * Author: José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,14 +19,18 @@ #include +struct afb_context; + struct afb_cred { int refcount; uid_t uid; gid_t gid; pid_t pid; + const char *user; const char *label; const char *id; + const char *exported; }; extern struct afb_cred *afb_cred_current(); @@ -35,4 +39,7 @@ extern struct afb_cred *afb_cred_create_for_socket(int fd); extern struct afb_cred *afb_cred_addref(struct afb_cred *cred); extern void afb_cred_unref(struct afb_cred *cred); +extern int afb_cred_has_permission(struct afb_cred *cred, const char *permission, struct afb_context *context); +extern const char *afb_cred_export(struct afb_cred *cred); +extern struct afb_cred *afb_cred_import(const char *string);