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.
This commit is contained in:
Wayne Davison committed 2004-01-24 18:36:36 +00:00
1 parent d99b4ccf93
commit 3048b0a8ea
1 file changed
+1 -1
+1 -1
View File
@@ -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;