]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
The static last_in value in match_gid() needed to default to -2 so
authorWayne Davison <wayned@samba.org>
Sat, 24 Jan 2004 18:36:36 +0000 (18:36 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 24 Jan 2004 18:36:36 +0000 (18:36 +0000)
that we don't accidentally return a GID of 0 when we don't have the
permissions to set it.

uidlist.c

index 896e16cab940f4d82fb8330e95f3e87baf6eda05..38c265b3122e65cf08a0b427da1a5af11b0865a7 100644 (file)
--- 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;