aboutsummaryrefslogtreecommitdiff
path: root/src/util/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/service.c')
-rw-r--r--src/util/service.c6
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)