Re-fix bug 5202 - cannot change ACLs on writable file with "dos filemode=yes"
authorJeremy Allison <jra@samba.org>
Fri, 8 Jan 2010 18:22:46 +0000 (10:22 -0800)
committerKarolin Seeger <kseeger@samba.org>
Mon, 11 Jan 2010 11:12:34 +0000 (12:12 +0100)
commitf04a8d1811c1099eb653efda314bc98553fa6d02
treee4e584b047fca6222a9a915ee5a419ed1de047f1
parent3c092c7acb18620e3769c791a9ea4055605247ee
Re-fix bug 5202 - cannot change ACLs on writable file with "dos filemode=yes"

This bug re-occurred for 3.3.x and above.

The reason is that to change a NT ACL we now have to open the file requesting
WRITE_DAC and WRITE_OWNER access. The mapping from POSIX "w" to NT permissions
in posix_acls doesn't add these bits when "dos filemode = yes", so even though
the permission or owner change would be allowed by the POSIX ACL code, the
NTCreateX call fails with ACCESS_DENIED now we always check NT permissions
first.

Added in the mapping from "w" to WRITE_DAC and WRITE_OWNER access.

Jeremy.
source3/smbd/posix_acls.c