diff options
author | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-09-03 13:00:17 +0000 |
---|---|---|
committer | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-09-03 13:00:17 +0000 |
commit | bb0f7ca4c3823ed1b2068bd6a4e73b78bc04e7c2 (patch) | |
tree | cc1e1d090498ade190991b6d8f1aaa5f2e75c1dd /src/util/service.c | |
parent | e745d7048efe4cab6f3dcedcae39f9328a95ecc4 (diff) |
always allow root
git-svn-id: https://gnunet.org/svn/gnunet@23570 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/util/service.c')
-rw-r--r-- | src/util/service.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/util/service.c b/src/util/service.c index af0d0769aa..e2d056d7ff 100644 --- a/src/util/service.c +++ b/src/util/service.c @@ -660,10 +660,12 @@ check_access (void *cls, const struct GNUNET_CONNECTION_Credentials *uc, if (GNUNET_YES == sctx->match_uid) { /* UID match required */ - ret = (NULL != uc) && (uc->uid == geteuid ()); + ret = (NULL != uc) && ( (0 == uc->uid) || (uc->uid == geteuid ()) ); } else if ( (GNUNET_YES == sctx->match_gid) && - ( (NULL == uc) || (uc->uid != geteuid ()) ) ) + ( (NULL == uc) || + ( (0 != uc->uid) && + (uc->uid != geteuid ()) ) ) ) { /* group match required and UID does not match */ if (NULL == uc) |