diff options
author | trasz <trasz@FreeBSD.org> | 2009-10-01 17:22:03 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2009-10-01 17:22:03 +0000 |
commit | d5661d631d28fee99ac0a8758c56535ac2c9b01b (patch) | |
tree | f2b6e2088bb410fc3239074022c9d70c3c255caf /sys/kern/subr_acl_posix1e.c | |
parent | c6a1085feffa5fcd9040272aeae30e7f2466f754 (diff) | |
download | FreeBSD-src-d5661d631d28fee99ac0a8758c56535ac2c9b01b.zip FreeBSD-src-d5661d631d28fee99ac0a8758c56535ac2c9b01b.tar.gz |
Provide default implementation for VOP_ACCESS(9), so that filesystems which
want to provide VOP_ACCESSX(9) don't have to implement both. Note that
this commit makes implementation of either of these two mandatory.
Reviewed by: kib
Diffstat (limited to 'sys/kern/subr_acl_posix1e.c')
-rw-r--r-- | sys/kern/subr_acl_posix1e.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/subr_acl_posix1e.c b/sys/kern/subr_acl_posix1e.c index e0016e7..9690580 100644 --- a/sys/kern/subr_acl_posix1e.c +++ b/sys/kern/subr_acl_posix1e.c @@ -61,6 +61,9 @@ vaccess_acl_posix1e(enum vtype type, uid_t file_uid, gid_t file_gid, accmode_t acl_mask_granted; int group_matched, i; + KASSERT((accmode & ~(VEXEC | VWRITE | VREAD | VADMIN | VAPPEND)) == 0, + ("invalid bit in accmode")); + /* * Look for a normal, non-privileged way to access the file/directory * as requested. If it exists, go with that. Otherwise, attempt to |