Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Dec 2009 11:41:53 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r200723 - head/sys/kern
Message-ID:  <200912191141.nBJBfrlP032076@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Sat Dec 19 11:41:52 2009
New Revision: 200723
URL: http://svn.freebsd.org/changeset/base/200723

Log:
  Interpret VAPPEND correctly in vaccess_acl_nfs4(9).

Modified:
  head/sys/kern/subr_acl_nfs4.c

Modified: head/sys/kern/subr_acl_nfs4.c
==============================================================================
--- head/sys/kern/subr_acl_nfs4.c	Sat Dec 19 11:31:28 2009	(r200722)
+++ head/sys/kern/subr_acl_nfs4.c	Sat Dec 19 11:41:52 2009	(r200723)
@@ -82,6 +82,13 @@ _access_mask_from_accmode(accmode_t accm
 			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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912191141.nBJBfrlP032076>