From 6d8f8050bf9d7cacd62498b78f7ed2b89002d798 Mon Sep 17 00:00:00 2001 From: trasz Date: Sat, 19 Dec 2009 11:41:52 +0000 Subject: Interpret VAPPEND correctly in vaccess_acl_nfs4(9). --- sys/kern/subr_acl_nfs4.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/kern/subr_acl_nfs4.c b/sys/kern/subr_acl_nfs4.c index c3f4b65..fbd233b 100644 --- a/sys/kern/subr_acl_nfs4.c +++ b/sys/kern/subr_acl_nfs4.c @@ -82,6 +82,13 @@ _access_mask_from_accmode(accmode_t accmode) access_mask |= accmode2mask[i].mask; } + /* + * VAPPEND is just a modifier for VWRITE; if the caller asked + * for 'VAPPEND | VWRITE', we want to check for ACL_APPEND_DATA only. + */ + if (access_mask & ACL_APPEND_DATA) + access_mask &= ~ACL_WRITE_DATA; + return (access_mask); } -- cgit v1.1