diff options
author | 2012-10-01 00:08:42 +0000 | |
---|---|---|
committer | 2012-10-01 00:08:42 +0000 | |
commit | f145108b27a098862181f4ddbee13b521a66e1dc (patch) | |
tree | 61d8c3dd50bc22b63bb9f849a0882500e15da9b3 /sys/kern/vfs_subr.c | |
parent | Correct the addition of the 39320LPE controller. The actual product name (diff) | |
download | wireguard-openbsd-f145108b27a098862181f4ddbee13b521a66e1dc.tar.xz wireguard-openbsd-f145108b27a098862181f4ddbee13b521a66e1dc.zip |
Make groupmember() check the effective gid too, so that the checks are
consistent when the effective gid isn't also a supplementary group.
ok beck@
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 6ed94c45ab0..9e1a850b931 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.198 2012/09/19 00:53:13 guenther Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.199 2012/10/01 00:08:43 guenther Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -1578,7 +1578,7 @@ vaccess(enum vtype type, mode_t file_mode, uid_t uid, gid_t gid, } /* Otherwise, check the groups. */ - if (cred->cr_gid == gid || groupmember(gid, cred)) { + if (groupmember(gid, cred)) { if (acc_mode & VEXEC) mask |= S_IXGRP; if (acc_mode & VREAD) |