From: Christian Grothoff Date: Sat, 24 Mar 2012 15:24:38 +0000 (+0000) Subject: -UID match is sufficient if GID match is required X-Git-Tag: initial-import-from-subversion-38251~14104 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=612fa9643a97e41af4d8bbc80332e362c2aaf600;p=oweals%2Fgnunet.git -UID match is sufficient if GID match is required --- 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 */