diff options
-rw-r--r-- | usr.bin/rdistd/server.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/rdistd/server.c b/usr.bin/rdistd/server.c index 45e2254489f..e86f764dad8 100644 --- a/usr.bin/rdistd/server.c +++ b/usr.bin/rdistd/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.42 2016/03/30 20:51:59 millert Exp $ */ +/* $OpenBSD: server.c,v 1.43 2017/08/30 07:43:52 otto Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -244,7 +244,7 @@ fchog(int fd, char *file, char *owner, char *group, int mode) } else gid = gr->gr_gid; - if (userid && gid >= 0 && gid != primegid) { + if (userid && gid != (gid_t)-1 && gid != primegid) { if (gr) for (i = 0; gr->gr_mem[i] != NULL; i++) if (strcmp(locuser, gr->gr_mem[i]) == 0) |