[SCM] Samba Shared Repository - branch v3-5-test updated

Karolin Seeger kseeger at samba.org
Mon Jan 11 04:12:22 MST 2010

The branch, v3-5-test has been updated
       via  e687a20... Re-fix bug 5202 - cannot change ACLs on writable file with "dos filemode=yes"
      from  ea7d299... s3: Lock down some srvsvc calls according to what w2k3 seems to do


- Log -----------------------------------------------------------------
commit e687a20d60144af2cb459231fb6a699f2533ce9d
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Jan 8 10:17:46 2010 -0800

    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
    Added in the mapping from "w" to WRITE_DAC and WRITE_OWNER access.
    (cherry picked from commit d7713d11a6dc2d66c820d7496bc45eb5fe527fbf)


Summary of changes:
 source3/smbd/posix_acls.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Changeset truncated at 500 lines:

diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 8280538..8d66bf1 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -1107,6 +1107,9 @@ uint32_t map_canon_ace_perms(int snum,
 			nt_mask |= ((perms & S_IWUSR) ? UNIX_ACCESS_W : 0 );
 			nt_mask |= ((perms & S_IXUSR) ? UNIX_ACCESS_X : 0 );
+		if ((perms & S_IWUSR) && lp_dos_filemode(snum)) {
+		}
 	DEBUG(10,("map_canon_ace_perms: Mapped (UNIX) %x to (NT) %x\n",

Samba Shared Repository

More information about the samba-cvs mailing list