X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-auth.c;h=900ec4c67b0f172fd2f21965e57496e9969e5ad5;hb=8f3368daeca3d5c184321e96cba60886bb7fc82f;hp=82e6fd213286ebe099644d28cdc6537ad66ce6a2;hpb=b56b68b16b307df81eddf9705ead59198d75b7bd;p=src%2Fapp-framework-binder.git diff --git a/src/afb-auth.c b/src/afb-auth.c index 82e6fd21..900ec4c6 100644 --- a/src/afb-auth.c +++ b/src/afb-auth.c @@ -45,7 +45,10 @@ int afb_auth_check(const struct afb_auth *auth, struct afb_xreq *xreq) return afb_context_check_loa(&xreq->context, auth->loa); case afb_auth_Permission: - return xreq->cred && auth->text && check_permission(auth->text, xreq); + if (xreq->cred && auth->text) + return check_permission(auth->text, xreq); + /* TODO: handle case of self permission */ + return 1; case afb_auth_Or: return afb_auth_check(auth->first, xreq) || afb_auth_check(auth->next, xreq);