diff options
author | trasz <trasz@FreeBSD.org> | 2009-12-26 11:36:10 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2009-12-26 11:36:10 +0000 |
commit | a78d6a0fdab8ef9df3cfbb1d0b47b6f76cb8a71c (patch) | |
tree | afe50feb8570f29e5e5ee7379ef96a8bd309abfb /sys/kern/vfs_subr.c | |
parent | 690bd6b42878a547aceee0005d5124b3a0a81c04 (diff) | |
download | FreeBSD-src-a78d6a0fdab8ef9df3cfbb1d0b47b6f76cb8a71c.zip FreeBSD-src-a78d6a0fdab8ef9df3cfbb1d0b47b6f76cb8a71c.tar.gz |
Now that all the callers seem to be fixed, add KASSERTs to make sure VAPPEND
is not being used improperly.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index cb6920f..9fe4d43 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3534,6 +3534,8 @@ vaccess(enum vtype type, mode_t file_mode, uid_t file_uid, gid_t file_gid, KASSERT((accmode & ~(VEXEC | VWRITE | VREAD | VADMIN | VAPPEND)) == 0, ("invalid bit in accmode")); + KASSERT((accmode & VAPPEND) == 0 || (accmode & VWRITE), + ("VAPPEND without VWRITE")); /* * Look for a normal, non-privileged way to access the file/directory |