[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Fri May 25 19:30:03 UTC 2018


The branch, master has been updated
       via  52778af s3: vfs_fake_acls: Correctly implement the chmod/fchmod algorithm on fake acls.
       via  e85a662 s3: smbd: Make map_acl_perms_to_permset() extern.
       via  109d94d s3: smbd: Make unix_perms_to_acl_perms() extern.
       via  a41155b s3: posix_acls: Remove unused 'connection_struct *conn' parameter to map_acl_perms_to_permset().
       via  cfbe304 s3: posix_acls: Remove dead functions fchmod_acl()/chmod_acl().
       via  5bbb831 s3: VFS: Remove SMB_VFS_FCHMOD_ACL().
       via  a3d7544 s3: torture: Remove cmd_fchmod_acl().
       via  55f013e s3: modules: vfs_ceph: Remove FCHMOD_ACL in cephwrap_fchmod().
       via  0c65f6b s3: modules: vfs_default: Remove FCHMOD_ACL in fchmod.
       via  7b8fa17 s3: VFS: Remove SMB_VFS_CHMOD_ACL().
       via  7d3059c s3: torture: Remove cmd_chmod_acl().
       via  b8477ab s3: modules: vfs_ceph: Remove CHMOD_ACL in cephwrap_chmod().
       via  d50bb46 s3: modules: vfs_ceph: Remove CHMOD_ACL in cephwrap_mkdir().
       via  c5060e1 s3: modules: vfs_default: Remove CHMOD_ACL in chmod.
       via  90117f2 s3: modules: vfs_default: Remove CHMOD_ACL in mkdir.
       via  aaed6b4 s3: smbd: Use FCHMOD call, not FCHMOD_ACL call if mode bits reset needed.
       via  2f4e581 s3: smbd: Optimization. Only do the FCHMOD_ACL call if mode bits not equal.
       via  4f6c71a s3: smbd: optimization. Only do the FCHMOD call if needed.
       via  d03e9a8 s3: smbd: Remove use of SMB_VFS_FCHMOD_ACL() in overwrite case.
       via  41ee89b s3: smbd: Add clarifying comment on mode change on overwritten files.
       via  a6c03f2 s3: smbd: Remove existing_unx_mode, an unused parameter to open_match_attributes().
      from  33d1ac8 smbd: Call smbXsrv_client_global_init in the parent smbd

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 52778afdab31c8315a498544b6b11312c8625bb6
Author: Jeremy Allison <jra at samba.org>
Date:   Fri May 18 11:52:23 2018 -0700

    s3: vfs_fake_acls: Correctly implement the chmod/fchmod algorithm on fake acls.
    
    We now pass samba3hide(nt4_dc), so remove it from knownfail.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri May 25 21:29:32 CEST 2018 on sn-devel-144

commit e85a662eea4122bdc78ee2c6339623e9728d1b1b
Author: Jeremy Allison <jra at samba.org>
Date:   Fri May 18 11:50:44 2018 -0700

    s3: smbd: Make map_acl_perms_to_permset() extern.
    
    The vfs_fake_acl module will need it to implement chown/fchown.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 109d94d15e9c3b6606551c62ec6ec97acb821e82
Author: Jeremy Allison <jra at samba.org>
Date:   Fri May 18 11:49:09 2018 -0700

    s3: smbd: Make unix_perms_to_acl_perms() extern.
    
    The vfs_fake_acl module will need it to implement chown/fchown.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit a41155b005684debe8e2e17e4a97826e78702fa4
Author: Jeremy Allison <jra at samba.org>
Date:   Fri May 18 11:37:22 2018 -0700

    s3: posix_acls: Remove unused 'connection_struct *conn' parameter to map_acl_perms_to_permset().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit cfbe3048afbb6557852b7f887c32f10bf283e7ae
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 11:49:55 2018 -0700

    s3: posix_acls: Remove dead functions fchmod_acl()/chmod_acl().
    
    No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 5bbb8310417563b17d83bb9ea9d08940d26e90e1
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 11:48:55 2018 -0700

    s3: VFS: Remove SMB_VFS_FCHMOD_ACL().
    
    No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit a3d7544b8c9e31f06de347049757f833afa4c8e5
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 11:42:03 2018 -0700

    s3: torture: Remove cmd_fchmod_acl().
    
    No longer needed.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 55f013edbb10cf68289ea23f674af617edcc12ad
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 11:46:21 2018 -0700

    s3: modules: vfs_ceph: Remove FCHMOD_ACL in cephwrap_fchmod().
    
    Now I understand the use of the mask in POSIX ACLs
    this extra step is no longer needed.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 0c65f6b8331c064e6f15003ffd8c7b8e5a5f0b6d
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 11:45:05 2018 -0700

    s3: modules: vfs_default: Remove FCHMOD_ACL in fchmod.
    
    Now I understand the use of the mask in POSIX ACLs
    this extra step is no longer needed.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 7b8fa17f06b2e401584f9d3290d9c14ad120ce39
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 11:32:58 2018 -0700

    s3: VFS: Remove SMB_VFS_CHMOD_ACL().
    
    No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 7d3059cd7415c8da429f1f18cc562c6d138d77cf
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 11:21:14 2018 -0700

    s3: torture: Remove cmd_chmod_acl().
    
    No longer needed.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit b8477abbdefade3e7c005f77cc8aaf7da1bcc25a
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 11:19:33 2018 -0700

    s3: modules: vfs_ceph: Remove CHMOD_ACL in cephwrap_chmod().
    
    Now I understand the use of the mask in POSIX ACLs
    this extra step is no longer needed.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit d50bb46038b4d2c81b2e9623c5b678206856bccd
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 11:18:12 2018 -0700

    s3: modules: vfs_ceph: Remove CHMOD_ACL in cephwrap_mkdir().
    
    Now I understand the use of the mask in POSIX ACLs
    this extra step is no longer needed.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit c5060e1ad5fedb26f66bb9da479d46a4b576b9bc
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 11:05:20 2018 -0700

    s3: modules: vfs_default: Remove CHMOD_ACL in chmod.
    
    Now I understand the use of the mask in POSIX ACLs
    this extra step is no longer needed.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 90117f25bf10ea47f1bc02c22dc41f2a560d57eb
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 11:03:53 2018 -0700

    s3: modules: vfs_default: Remove CHMOD_ACL in mkdir.
    
    Now I understand the use of the mask in POSIX ACLs
    this extra step is no longer needed. If the mkdir
    succeeded it's already set the correct mode.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit aaed6b4e995bb95fdc3ca6e768e84d14b3a3e446
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 10:38:34 2018 -0700

    s3: smbd: Use FCHMOD call, not FCHMOD_ACL call if mode bits reset needed.
    
    This is a behavior change, it will modify the POSIX ACL mask
    from a value of rwx instead of modifying the existing ACE
    entries to be ANDed with the passed in mode. However it
    will have no effect on the underlying permissions, and
    better reflects the proper use of POSIX ACLs (i.e. I
    didn't understand the use of the mask entry in the
    ACL when I first wrote the POSIX ACL code).
    
    In addition, the vfs_acl_common.c module already
    filters these calls for all but POSIX opens, which
    means the only place this change is exposed to the
    client would be a cifsfs unix extensions client doing
    posix acl calls (and they would expect the mask to
    be set like this on chmod).
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 2f4e581c3d103633c96cdec35b0a9e7c9d2ae042
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 10:35:58 2018 -0700

    s3: smbd: Optimization. Only do the FCHMOD_ACL call if mode bits not equal.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 4f6c71ae886f65c120e628403e24970f0d126fc5
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 10:33:38 2018 -0700

    s3: smbd: optimization. Only do the FCHMOD call if needed.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit d03e9a861e207c8c0204e4f76cb4bdaec711f923
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 10:27:11 2018 -0700

    s3: smbd: Remove use of SMB_VFS_FCHMOD_ACL() in overwrite case.
    
    We have potentially called SMB_VFS_FCHMOD() here in
    the file_set_dosmode() call associated with the comment
    /* Overwritten files should be initially set as archive */
    at line 3755 above, so there is no need to do any POSIX ACL
    mask protection.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 41ee89b2ec76c289dfa5d481870aada27516cf1e
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 10:24:35 2018 -0700

    s3: smbd: Add clarifying comment on mode change on overwritten files.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit a6c03f2a9b21f445ddfda71c5d3619b759093ed3
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 17 09:37:23 2018 -0700

    s3: smbd: Remove existing_unx_mode, an unused parameter to open_match_attributes().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/Samba-Developers-Guide/vfs.xml |   3 -
 docs-xml/manpages/vfs_audit.8.xml       |   2 -
 docs-xml/manpages/vfs_full_audit.8.xml  |   2 -
 docs-xml/manpages/vfstest.1.xml         |   2 -
 examples/VFS/skel_opaque.c              |  18 ---
 examples/VFS/skel_transparent.c         |  16 ---
 selftest/knownfail                      |   2 +-
 source3/include/smbprofile.h            |   2 -
 source3/include/vfs.h                   |   9 +-
 source3/include/vfs_macros.h            |  10 --
 source3/modules/vfs_acl_common.c        |  21 ----
 source3/modules/vfs_acl_common.h        |   3 -
 source3/modules/vfs_acl_tdb.c           |   2 -
 source3/modules/vfs_acl_xattr.c         |   2 -
 source3/modules/vfs_audit.c             |  32 -----
 source3/modules/vfs_cap.c               |  34 -----
 source3/modules/vfs_catia.c             |  60 ---------
 source3/modules/vfs_ceph.c              |  62 +--------
 source3/modules/vfs_default.c           |  91 +-------------
 source3/modules/vfs_extd_audit.c        |  44 -------
 source3/modules/vfs_fake_acls.c         | 214 ++++++++++++++++++++++++++++++++
 source3/modules/vfs_full_audit.c        |  32 -----
 source3/modules/vfs_glusterfs.c         |   2 -
 source3/modules/vfs_linux_xfs_sgid.c    |   9 --
 source3/modules/vfs_media_harmony.c     |  35 ------
 source3/modules/vfs_shadow_copy2.c      |  49 --------
 source3/modules/vfs_snapper.c           |  45 -------
 source3/modules/vfs_streams_xattr.c     |  16 ---
 source3/modules/vfs_time_audit.c        |  45 -------
 source3/modules/vfs_unityed_media.c     |  32 -----
 source3/smbd/open.c                     |  70 +++++------
 source3/smbd/posix_acls.c               |  48 +------
 source3/smbd/proto.h                    |   6 +-
 source3/smbd/vfs.c                      |  15 ---
 source3/torture/cmd_vfs.c               |  63 ----------
 35 files changed, 263 insertions(+), 835 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/Samba-Developers-Guide/vfs.xml b/docs-xml/Samba-Developers-Guide/vfs.xml
index 99ef33f..b58410b 100644
--- a/docs-xml/Samba-Developers-Guide/vfs.xml
+++ b/docs-xml/Samba-Developers-Guide/vfs.xml
@@ -630,9 +630,6 @@ struct vfs_ops example_ops = {
 	NULL,				/* fset_nt_acl */
 	NULL,				/* set_nt_acl */
 
-	NULL,				/* chmod_acl */
-	NULL,				/* fchmod_acl */
-
 	NULL,				/* sys_acl_get_entry */
 	NULL,				/* sys_acl_get_tag_type */
 	NULL,				/* sys_acl_get_permset */
diff --git a/docs-xml/manpages/vfs_audit.8.xml b/docs-xml/manpages/vfs_audit.8.xml
index d2b0e90..3a1576d 100644
--- a/docs-xml/manpages/vfs_audit.8.xml
+++ b/docs-xml/manpages/vfs_audit.8.xml
@@ -47,8 +47,6 @@
 	<member>unlink</member>
 	<member>chmod</member>
 	<member>fchmod</member>
-	<member>chmod_acl</member>
-	<member>fchmod_acl</member>
 	</simplelist>
 
 	<para>This module is stackable.</para>
diff --git a/docs-xml/manpages/vfs_full_audit.8.xml b/docs-xml/manpages/vfs_full_audit.8.xml
index 392c7e4..7da3e3b 100644
--- a/docs-xml/manpages/vfs_full_audit.8.xml
+++ b/docs-xml/manpages/vfs_full_audit.8.xml
@@ -41,7 +41,6 @@
         <member>chdir</member>
         <member>chflags</member>
         <member>chmod</member>
-        <member>chmod_acl</member>
         <member>chown</member>
         <member>close</member>
         <member>closedir</member>
@@ -51,7 +50,6 @@
         <member>disconnect</member>
         <member>disk_free</member>
         <member>fchmod</member>
-        <member>fchmod_acl</member>
         <member>fchown</member>
         <member>fget_nt_acl</member>
         <member>fgetxattr</member>
diff --git a/docs-xml/manpages/vfstest.1.xml b/docs-xml/manpages/vfstest.1.xml
index 9990e27..dc6acd0 100644
--- a/docs-xml/manpages/vfstest.1.xml
+++ b/docs-xml/manpages/vfstest.1.xml
@@ -124,8 +124,6 @@
 		<listitem><para><command>get_nt_acl</command> - VFS get_nt_acl()</para></listitem>
 		<listitem><para><command>fset_nt_acl</command> - VFS fset_nt_acl()</para></listitem>
 		<listitem><para><command>set_nt_acl</command> - VFS open() and fset_nt_acl()</para></listitem>
-		<listitem><para><command>fchmod_acl</command> - VFS fchmod_acl()</para></listitem>
-		<listitem><para><command>chmod_acl</command> - VFS chmod_acl()</para></listitem>
 		<listitem><para><command>sys_acl_get_file</command> - VFS sys_acl_get_file()</para></listitem>
 		<listitem><para><command>sys_acl_get_fd</command> - VFS sys_acl_get_fd()</para></listitem>
 		<listitem><para><command>sys_acl_blob_get_file</command> - VFS sys_acl_blob_get_file()</para></listitem>
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 5529ec7..446cfd5 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -751,21 +751,6 @@ static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
 	return NT_STATUS_NOT_IMPLEMENTED;
 }
 
-static int skel_chmod_acl(vfs_handle_struct *handle,
-			const struct smb_filename *smb_fname,
-			mode_t mode)
-{
-	errno = ENOSYS;
-	return -1;
-}
-
-static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
-			   mode_t mode)
-{
-	errno = ENOSYS;
-	return -1;
-}
-
 static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle,
 				       const struct smb_filename *smb_fname,
 				       SMB_ACL_TYPE_T type,
@@ -1005,9 +990,6 @@ struct vfs_fn_pointers skel_opaque_fns = {
 
 	/* POSIX ACL operations. */
 
-	.chmod_acl_fn = skel_chmod_acl,
-	.fchmod_acl_fn = skel_fchmod_acl,
-
 	.sys_acl_get_file_fn = skel_sys_acl_get_file,
 	.sys_acl_get_fd_fn = skel_sys_acl_get_fd,
 	.sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index fde24fb..7f2c78b 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -942,19 +942,6 @@ static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
 	return SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd);
 }
 
-static int skel_chmod_acl(vfs_handle_struct *handle,
-			const struct smb_filename *smb_fname,
-			mode_t mode)
-{
-	return SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
-}
-
-static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
-			   mode_t mode)
-{
-	return SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
-}
-
 static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle,
 				       const struct smb_filename *smb_fname,
 				       SMB_ACL_TYPE_T type,
@@ -1181,9 +1168,6 @@ struct vfs_fn_pointers skel_transparent_fns = {
 
 	/* POSIX ACL operations. */
 
-	.chmod_acl_fn = skel_chmod_acl,
-	.fchmod_acl_fn = skel_fchmod_acl,
-
 	.sys_acl_get_file_fn = skel_sys_acl_get_file,
 	.sys_acl_get_fd_fn = skel_sys_acl_get_fd,
 	.sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file,
diff --git a/selftest/knownfail b/selftest/knownfail
index 8c70d6a..f718f45 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -20,7 +20,7 @@
 ^samba3.smb2.rename.*.simple_nodelete
 ^samba3.smb2.rename.*.no_share_delete_no_delete_access
 ^samba3.blackbox.smbclient_machine_auth.plain \(nt4_dc:local\)# the NT4 DC does not currently set up a self-join
-^samba3.raw.samba3hide.samba3hide\((nt4_dc|ad_dc)\) # This test fails against an smbd environment with NT ACLs enabled
+^samba3.raw.samba3hide.samba3hide\(ad_dc\) # This test fails against the ad_dc environment.
 ^samba3.raw.samba3closeerr.samba3closeerr\(nt4_dc\) # This test fails against an smbd environment with NT ACLs enabled
 ^samba3.raw.acls nfs4acl_xattr-simple-40.INHERITFLAGS\(nt4_dc\) # This (and the follow nfs4acl_xattr tests fail because our NFSv4 backend isn't a complete mapping yet.
 ^samba3.raw.acls nfs4acl_xattr-simple-40.create_owner_file\(nt4_dc\)
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h
index a4c3f24..327c16a 100644
--- a/source3/include/smbprofile.h
+++ b/source3/include/smbprofile.h
@@ -101,8 +101,6 @@ struct tevent_context;
 	SMBPROFILE_STATS_BASIC(get_nt_acl) \
 	SMBPROFILE_STATS_BASIC(fget_nt_acl) \
 	SMBPROFILE_STATS_BASIC(fset_nt_acl) \
-	SMBPROFILE_STATS_BASIC(chmod_acl) \
-	SMBPROFILE_STATS_BASIC(fchmod_acl) \
 	SMBPROFILE_STATS_SECTION_END \
 	\
 	SMBPROFILE_STATS_SECTION_START(statcache, "Stat Cache") \
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index cc7948a..945e4b6 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -251,6 +251,8 @@
 		All users are now pread or async versions. */
 /* Version 39 - Remove SMB_VFS_WRITE
 		All users are now pwrite or async versions. */
+/* Version 39 - Remove SMB_VFS_CHMOD_ACL - no longer used. */
+/* Version 39 - Remove SMB_VFS_FCHMOD_ACL - no longer used. */
 
 #define SMB_VFS_INTERFACE_VERSION 39
 
@@ -916,11 +918,6 @@ struct vfs_fn_pointers {
 
 	/* POSIX ACL operations. */
 
-	int (*chmod_acl_fn)(struct vfs_handle_struct *handle,
-					const struct smb_filename *smb_fname,
-					mode_t mode);
-	int (*fchmod_acl_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, mode_t mode);
-
 	SMB_ACL_T (*sys_acl_get_file_fn)(struct vfs_handle_struct *handle,
 					 const struct smb_filename *smb_fname,
 					 SMB_ACL_TYPE_T type,
@@ -1410,8 +1407,6 @@ NTSTATUS smb_vfs_call_audit_file(struct vfs_handle_struct *handle,
 int smb_vfs_call_chmod_acl(struct vfs_handle_struct *handle,
 				const struct smb_filename *file,
 				mode_t mode);
-int smb_vfs_call_fchmod_acl(struct vfs_handle_struct *handle,
-			    struct files_struct *fsp, mode_t mode);
 SMB_ACL_T smb_vfs_call_sys_acl_get_file(struct vfs_handle_struct *handle,
 					const struct smb_filename *smb_fname,
 					SMB_ACL_TYPE_T type,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index d483613..46d6728 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -460,16 +460,6 @@
 #define SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd) \
 	smb_vfs_call_fset_nt_acl((handle)->next, (fsp), (security_info_sent), (psd))
 
-#define SMB_VFS_CHMOD_ACL(conn, smb_fname, mode) \
-	smb_vfs_call_chmod_acl((conn)->vfs_handles, (smb_fname), (mode))
-#define SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode) \
-	smb_vfs_call_chmod_acl((handle)->next, (smb_fname), (mode))
-
-#define SMB_VFS_FCHMOD_ACL(fsp, mode) \
-	smb_vfs_call_fchmod_acl((fsp)->conn->vfs_handles, (fsp), (mode))
-#define SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode) \
-	smb_vfs_call_fchmod_acl((handle)->next, (fsp), (mode))
-
 #define SMB_VFS_SYS_ACL_GET_FILE(conn, smb_fname, type, mem_ctx)		\
 	smb_vfs_call_sys_acl_get_file((conn)->vfs_handles, (smb_fname), (type), (mem_ctx))
 #define SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, smb_fname, type, mem_ctx)		\
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 5b2b2ef..6c0d931 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -1244,24 +1244,3 @@ int fchmod_acl_module_common(struct vfs_handle_struct *handle,
 	}
 	return 0;
 }
-
-int chmod_acl_acl_module_common(struct vfs_handle_struct *handle,
-				const struct smb_filename *smb_fname,
-				mode_t mode)
-{
-	if (smb_fname->flags & SMB_FILENAME_POSIX_PATH) {
-		/* Only allow this on POSIX pathnames. */
-		return SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
-	}
-	return 0;
-}
-
-int fchmod_acl_acl_module_common(struct vfs_handle_struct *handle,
-				 struct files_struct *fsp, mode_t mode)
-{
-	if (fsp->posix_flags & FSP_POSIX_FLAGS_OPEN) {
-		/* Only allow this on POSIX opens. */
-		return SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
-	}
-	return 0;
-}
diff --git a/source3/modules/vfs_acl_common.h b/source3/modules/vfs_acl_common.h
index 24803e0..f8bc48b 100644
--- a/source3/modules/vfs_acl_common.h
+++ b/source3/modules/vfs_acl_common.h
@@ -44,9 +44,6 @@ int fchmod_acl_module_common(struct vfs_handle_struct *handle,
 int chmod_acl_acl_module_common(struct vfs_handle_struct *handle,
 				const struct smb_filename *smb_fname,
 				mode_t mode);
-int fchmod_acl_acl_module_common(struct vfs_handle_struct *handle,
-				 struct files_struct *fsp, mode_t mode);
-
 NTSTATUS get_nt_acl_common(
 	NTSTATUS (*get_acl_blob_fn)(TALLOC_CTX *ctx,
 				    vfs_handle_struct *handle,
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index c5ffa5e..bb69170 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -496,8 +496,6 @@ static struct vfs_fn_pointers vfs_acl_tdb_fns = {
 	.fget_nt_acl_fn = acl_tdb_fget_nt_acl,
 	.get_nt_acl_fn = acl_tdb_get_nt_acl,
 	.fset_nt_acl_fn = acl_tdb_fset_nt_acl,
-	.chmod_acl_fn = chmod_acl_acl_module_common,
-	.fchmod_acl_fn = fchmod_acl_acl_module_common,
 	.sys_acl_set_file_fn = sys_acl_set_file_tdb,
 	.sys_acl_set_fd_fn = sys_acl_set_fd_tdb
 };
diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c
index 38ad81c..94626cb 100644
--- a/source3/modules/vfs_acl_xattr.c
+++ b/source3/modules/vfs_acl_xattr.c
@@ -323,8 +323,6 @@ static struct vfs_fn_pointers vfs_acl_xattr_fns = {
 	.fget_nt_acl_fn = acl_xattr_fget_nt_acl,
 	.get_nt_acl_fn = acl_xattr_get_nt_acl,
 	.fset_nt_acl_fn = acl_xattr_fset_nt_acl,
-	.chmod_acl_fn = chmod_acl_acl_module_common,
-	.fchmod_acl_fn = fchmod_acl_acl_module_common,
 	.sys_acl_set_file_fn = sys_acl_set_file_xattr,
 	.sys_acl_set_fd_fn = sys_acl_set_fd_xattr
 };
diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c
index 12477d5..24bc1e8 100644
--- a/source3/modules/vfs_audit.c
+++ b/source3/modules/vfs_audit.c
@@ -233,22 +233,6 @@ static int audit_chmod(vfs_handle_struct *handle,
 	return result;
 }
 
-static int audit_chmod_acl(vfs_handle_struct *handle,
-			const struct smb_filename *smb_fname,
-			mode_t mode)
-{
-	int result;
-
-	result = SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
-
-	syslog(audit_syslog_priority(handle), "chmod_acl %s mode 0x%x %s%s\n",
-	       smb_fname->base_name, mode,
-	       (result < 0) ? "failed: " : "",
-	       (result < 0) ? strerror(errno) : "");
-
-	return result;
-}
-
 static int audit_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
 {
 	int result;
@@ -263,20 +247,6 @@ static int audit_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mod
 	return result;
 }
 
-static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
-{
-	int result;
-
-	result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
-
-	syslog(audit_syslog_priority(handle), "fchmod_acl %s mode 0x%x %s%s\n",
-	       fsp->fsp_name->base_name, mode,
-	       (result < 0) ? "failed: " : "",
-	       (result < 0) ? strerror(errno) : "");
-
-	return result;
-}
-
 static struct vfs_fn_pointers vfs_audit_fns = {
 	.connect_fn = audit_connect,
 	.disconnect_fn = audit_disconnect,
@@ -289,8 +259,6 @@ static struct vfs_fn_pointers vfs_audit_fns = {
 	.unlink_fn = audit_unlink,
 	.chmod_fn = audit_chmod,
 	.fchmod_fn = audit_fchmod,
-	.chmod_acl_fn = audit_chmod_acl,
-	.fchmod_acl_fn = audit_fchmod_acl
 };
 
 static_decl_vfs;
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index 0684c79..ffc35d6 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -703,39 +703,6 @@ static struct smb_filename *cap_realpath(vfs_handle_struct *handle,
 	return return_fname;
 }
 
-static int cap_chmod_acl(vfs_handle_struct *handle,
-			const struct smb_filename *smb_fname,
-			mode_t mode)
-{
-	struct smb_filename *cap_smb_fname = NULL;
-	char *cappath = capencode(talloc_tos(), smb_fname->base_name);
-	int ret;
-	int saved_errno;
-
-	/* If the underlying VFS doesn't have ACL support... */
-	if (!cappath) {
-		errno = ENOMEM;
-		return -1;
-	}
-	cap_smb_fname = synthetic_smb_fname(talloc_tos(),
-					cappath,
-					NULL,
-					NULL,
-					smb_fname->flags);
-	if (cap_smb_fname == NULL) {
-		TALLOC_FREE(cappath);
-		errno = ENOMEM;
-		return -1;
-	}
-
-	ret = SMB_VFS_NEXT_CHMOD_ACL(handle, cap_smb_fname, mode);
-	saved_errno = errno;
-	TALLOC_FREE(cappath);
-	TALLOC_FREE(cap_smb_fname);
-	errno = saved_errno;
-	return ret;
-}
-
 static SMB_ACL_T cap_sys_acl_get_file(vfs_handle_struct *handle,
 				const struct smb_filename *smb_fname,
 				SMB_ACL_TYPE_T type,
@@ -1056,7 +1023,6 @@ static struct vfs_fn_pointers vfs_cap_fns = {
 	.link_fn = cap_link,
 	.mknod_fn = cap_mknod,
 	.realpath_fn = cap_realpath,
-	.chmod_acl_fn = cap_chmod_acl,
 	.sys_acl_get_file_fn = cap_sys_acl_get_file,
 	.sys_acl_set_file_fn = cap_sys_acl_set_file,
 	.sys_acl_delete_def_file_fn = cap_sys_acl_delete_def_file,
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index ed22fa8..fce2dcf 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -1128,44 +1128,6 @@ catia_get_nt_acl(struct vfs_handle_struct *handle,
 	return status;
 }
 
-static int
-catia_chmod_acl(vfs_handle_struct *handle,
-		const struct smb_filename *smb_fname,
-		mode_t mode)
-{
-	char *mapped_name = NULL;
-	struct smb_filename *mapped_smb_fname = NULL;
-	NTSTATUS status;
-	int ret;
-	int saved_errno;
-
-	status = catia_string_replace_allocate(handle->conn,
-				smb_fname->base_name,
-				&mapped_name,
-				vfs_translate_to_unix);
-	if (!NT_STATUS_IS_OK(status)) {
-		errno = map_errno_from_nt_status(status);
-		return -1;
-	}
-
-	mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
-					mapped_name,
-					NULL,
-					NULL,
-					smb_fname->flags);
-	if (mapped_smb_fname == NULL) {
-		TALLOC_FREE(mapped_name);
-		errno = ENOMEM;
-		return -1;
-	}
-	ret = SMB_VFS_NEXT_CHMOD_ACL(handle, mapped_smb_fname, mode);
-	saved_errno = errno;
-	TALLOC_FREE(mapped_name);
-	TALLOC_FREE(mapped_smb_fname);
-	errno = saved_errno;
-	return ret;
-}
-
 static SMB_ACL_T
 catia_sys_acl_get_file(vfs_handle_struct *handle,
 			const struct smb_filename *smb_fname,
@@ -1769,25 +1731,6 @@ static int catia_sys_acl_set_fd(vfs_handle_struct *handle,
 	return ret;
 }
 
-static int catia_fchmod_acl(vfs_handle_struct *handle,
-			    files_struct *fsp,
-			    mode_t mode)
-{
-	struct catia_cache *cc = NULL;
-	int ret;
-
-	ret = CATIA_FETCH_FSP_PRE_NEXT(talloc_tos(), handle, fsp, &cc);
-	if (ret != 0) {
-		return ret;
-	}
-
-	ret = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
-
-	CATIA_FETCH_FSP_POST_NEXT(&cc, fsp);
-
-	return ret;
-}
-
 static NTSTATUS catia_fget_nt_acl(vfs_handle_struct *handle,
 				  files_struct *fsp,
 				  uint32_t security_info,
@@ -2516,9 +2459,6 @@ static struct vfs_fn_pointers vfs_catia_fns = {
 	.fset_nt_acl_fn = catia_fset_nt_acl,
 
 	/* POSIX ACL operations. */
-	.chmod_acl_fn = catia_chmod_acl,
-	.fchmod_acl_fn = catia_fchmod_acl,
-
 	.sys_acl_get_file_fn = catia_sys_acl_get_file,
 	.sys_acl_get_fd_fn = catia_sys_acl_get_fd,
 	.sys_acl_blob_get_fd_fn = catia_sys_acl_blob_get_fd,
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index bac8858..b6ca27d 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -368,7 +368,6 @@ static int cephwrap_mkdir(struct vfs_handle_struct *handle,
 			  mode_t mode)
 {
 	int result;
-	bool has_dacl = False;
 	char *parent = NULL;
 	const char *path = smb_fname->base_name;
 
@@ -376,34 +375,14 @@ static int cephwrap_mkdir(struct vfs_handle_struct *handle,
 
 	if (lp_inherit_acls(SNUM(handle->conn))
 	    && parent_dirname(talloc_tos(), path, &parent, NULL)
-	    && (has_dacl = directory_has_default_acl(handle->conn, parent)))
+	    && directory_has_default_acl(handle->conn, parent)) {
 		mode = 0777;
+	}
 
 	TALLOC_FREE(parent);
 
 	result = ceph_mkdir(handle->data, path, mode);
-
-	/*


-- 
Samba Shared Repository



More information about the samba-cvs mailing list