summaryrefslogtreecommitdiff
path: root/uidlist.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-01-24 18:36:36 +0000
committerWayne Davison <wayned@samba.org>2004-01-24 18:36:36 +0000
commit3048b0a8eaf97bb5ee9c97dd498abcb8b0c61bda (patch)
tree4f88986d49da8f4e275ae50dc719540690a3d169 /uidlist.c
parentd99b4ccf9348b701086b018354844f0d800d3f9d (diff)
downloadrsync-3048b0a8eaf97bb5ee9c97dd498abcb8b0c61bda.tar.gz
rsync-3048b0a8eaf97bb5ee9c97dd498abcb8b0c61bda.tar.bz2
rsync-3048b0a8eaf97bb5ee9c97dd498abcb8b0c61bda.zip
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.
Diffstat (limited to 'uidlist.c')
-rw-r--r--uidlist.c2
1 files changed, 1 insertions, 1 deletions
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;