From 612fa9643a97e41af4d8bbc80332e362c2aaf600 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 24 Mar 2012 15:24:38 +0000 Subject: [PATCH] -UID match is sufficient if GID match is required --- src/util/service.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/service.c b/src/util/service.c index 7583dccb6..34d676137 100644 --- a/src/util/service.c +++ b/src/util/service.c @@ -626,9 +626,10 @@ check_access (void *cls, const struct GNUNET_CONNECTION_Credentials *uc, /* UID match required */ ret = (uc != NULL) && (uc->uid == geteuid ()); } - else if (sctx->match_gid == GNUNET_YES) + else if ( (sctx->match_gid == GNUNET_YES) && + ( (uc == NULL) || (uc->uid != geteuid ()) ) ) { - /* group match required */ + /* group match required and UID does not match */ if (uc == NULL) { /* no credentials, group match not possible */ -- 2.25.1