aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-03-24 15:24:38 +0000
committerChristian Grothoff <christian@grothoff.org>2012-03-24 15:24:38 +0000
commit612fa9643a97e41af4d8bbc80332e362c2aaf600 (patch)
tree63b2de5ac5bbabfc99a47dab2753fe3f20343c57
parentd083cb4de13258ec74c73ecf323fb5ea75712189 (diff)
downloadgnunet-612fa9643a97e41af4d8bbc80332e362c2aaf600.tar.gz
gnunet-612fa9643a97e41af4d8bbc80332e362c2aaf600.zip
-UID match is sufficient if GID match is required
-rw-r--r--src/util/service.c5
1 files 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,
626 /* UID match required */ 626 /* UID match required */
627 ret = (uc != NULL) && (uc->uid == geteuid ()); 627 ret = (uc != NULL) && (uc->uid == geteuid ());
628 } 628 }
629 else if (sctx->match_gid == GNUNET_YES) 629 else if ( (sctx->match_gid == GNUNET_YES) &&
630 ( (uc == NULL) || (uc->uid != geteuid ()) ) )
630 { 631 {
631 /* group match required */ 632 /* group match required and UID does not match */
632 if (uc == NULL) 633 if (uc == NULL)
633 { 634 {
634 /* no credentials, group match not possible */ 635 /* no credentials, group match not possible */