summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_acl_posix1e.c
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2009-10-01 17:22:03 +0000
committertrasz <trasz@FreeBSD.org>2009-10-01 17:22:03 +0000
commitd5661d631d28fee99ac0a8758c56535ac2c9b01b (patch)
treef2b6e2088bb410fc3239074022c9d70c3c255caf /sys/kern/subr_acl_posix1e.c
parentc6a1085feffa5fcd9040272aeae30e7f2466f754 (diff)
downloadFreeBSD-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.c3
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
OpenPOWER on IntegriCloud