From 3048b0a8eaf97bb5ee9c97dd498abcb8b0c61bda Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sat, 24 Jan 2004 18:36:36 +0000 Subject: [PATCH] The static last_in value in match_gid() needed to default to -2 so that we don't accidentally return a GID of 0 when we don't have the permissions to set it. --- uidlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uidlist.c b/uidlist.c index 896e16ca..38c265b3 100644 --- a/uidlist.c +++ b/uidlist.c @@ -158,7 +158,7 @@ static int is_in_group(gid_t gid) static gid_t match_gid(gid_t gid) { - static gid_t last_in, last_out; + static gid_t last_in = (gid_t) -2, last_out; struct idlist *list = gidlist; if (gid == last_in) return last_out; -- 2.34.1