Module Name: src Committed By: dholland Date: Sat Sep 5 06:18:55 UTC 2009
Modified Files: src/external/gpl2/xcvs/dist/src: filesubr.c Log Message: Check group membership correctly; ingroup() returns a truth value, not a gid. PR bin/41995. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/filesubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/gpl2/xcvs/dist/src/filesubr.c diff -u src/external/gpl2/xcvs/dist/src/filesubr.c:1.2 src/external/gpl2/xcvs/dist/src/filesubr.c:1.3 --- src/external/gpl2/xcvs/dist/src/filesubr.c:1.2 Wed Apr 8 16:27:51 2009 +++ src/external/gpl2/xcvs/dist/src/filesubr.c Sat Sep 5 06:18:55 2009 @@ -282,8 +282,7 @@ omask |= S_IXOTH; } - mask = sb.st_uid == uid ? umask : sb.st_gid == ingroup(sb.st_gid) ? - gmask : omask; + mask = sb.st_uid == uid ? umask : ingroup(sb.st_gid) ? gmask : omask; if ((sb.st_mode & mask) == mask) return true; errno = EACCES;