X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-cred.h;h=1ebdf15d8d0ed158cdce4966437c64f35881603d;hb=6f13ad1989875b5a0ce50b24211fd1fba093735f;hp=7ee4723c1906145f330fce4d03d7405a15a1dfc2;hpb=24d000c2290126abf88204089d132229d63f9a05;p=src%2Fapp-framework-binder.git diff --git a/src/afb-cred.h b/src/afb-cred.h index 7ee4723c..1ebdf15d 100644 --- a/src/afb-cred.h +++ b/src/afb-cred.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017, 2018 "IoT.bzh" + * Copyright (C) 2017-2019 "IoT.bzh" * Author: José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -28,6 +28,7 @@ struct afb_cred const char *user; const char *label; const char *id; + const char *exported; }; extern struct afb_cred *afb_cred_current(); @@ -36,4 +37,10 @@ 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, const char *context); + +extern const char *afb_cred_export(struct afb_cred *cred); +extern struct afb_cred *afb_cred_import(const char *string); + +extern struct afb_cred *afb_cred_mixed_on_behalf_import(struct afb_cred *cred, const char *context, const char *exported);