access(2): fix confusion between real and effective uid/gid
authorNicolas Thery <nthery@gmail.com>
Sat, 22 Aug 2009 17:31:24 +0000 (19:31 +0200)
committerNicolas Thery <nthery@gmail.com>
Sun, 23 Aug 2009 06:59:56 +0000 (08:59 +0200)
commit7ecca789d4f8366a6f54a1c889001f69b7ea3b1e
tree192a277dc42fa2799f01a704b304f2dace92352e
parent439e77846691790dab5ae3e888233c6de5c82327
access(2): fix confusion between real and effective uid/gid

Posix states that access() shall check permissions against
real uid and gid but our implementation was using effective
uid and gid instead.

Change vop_helper_access accordingly.

NOTE: This code will change soon when faccessat(2) is implemented
but I'd rather not mix the bug fix with a new feature in a single
commit.

NOTE: nfs_access() may need to be fixed too but I haven't
managed yet to figure out whether it should use real or
effective uid.

Fix-suggested-by: Alex Hornung <ahornung@gmail.com>
Approved-by: dillon@
sys/kern/vfs_helper.c