vfs: add acl type arg to SMB_VFS_SYS_ACL_SET_FD()
authorRalph Boehme <slow@samba.org>
Mon, 14 Dec 2020 15:28:26 +0000 (16:28 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 17 Dec 2020 18:56:28 +0000 (18:56 +0000)
No change in behaviour, the new arg is not yet used in any module.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
28 files changed:
examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/vfs.h
source3/include/vfs_macros.h
source3/lib/sysacls.c
source3/modules/posixacl_xattr.c
source3/modules/posixacl_xattr.h
source3/modules/vfs_acl_tdb.c
source3/modules/vfs_acl_xattr.c
source3/modules/vfs_aixacl.c
source3/modules/vfs_aixacl2.c
source3/modules/vfs_catia.c
source3/modules/vfs_default.c
source3/modules/vfs_fake_acls.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_gpfs.c
source3/modules/vfs_nfs4acl_xattr.c
source3/modules/vfs_not_implemented.c
source3/modules/vfs_posixacl.c
source3/modules/vfs_posixacl.h
source3/modules/vfs_solarisacl.c
source3/modules/vfs_streams_xattr.c
source3/modules/vfs_time_audit.c
source3/modules/vfs_tru64acl.c
source3/modules/vfs_vxfs.c
source3/modules/vfs_zfsacl.c
source3/smbd/posix_acls.c
source3/smbd/vfs.c

index 881a7fdaf1c12f4f1c364e6f4855c5b172ef172a..e00f886b7003d716edf1a04e6c1679877d75f74b 100644 (file)
@@ -848,7 +848,9 @@ static int skel_sys_acl_set_file(vfs_handle_struct *handle,
        return -1;
 }
 
-static int skel_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
+static int skel_sys_acl_set_fd(vfs_handle_struct *handle,
+                              struct files_struct *fsp,
+                              SMB_ACL_TYPE_T type,
                               SMB_ACL_T theacl)
 {
        errno = ENOSYS;
index 2680b4f328593023ae543d5b0862d625689f98ec..f3d74556ef3defff8834984576766fabe553d816 100644 (file)
@@ -1112,10 +1112,12 @@ static int skel_sys_acl_set_file(vfs_handle_struct *handle,
                        acltype, theacl);
 }
 
-static int skel_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
+static int skel_sys_acl_set_fd(vfs_handle_struct *handle,
+                              struct files_struct *fsp,
+                              SMB_ACL_TYPE_T type,
                               SMB_ACL_T theacl)
 {
-       return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
+       return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
 }
 
 static int skel_sys_acl_delete_def_file(vfs_handle_struct *handle,
index 1a5d71e840182057511fe03684926398affdafe4..ada1f13bc3f2ca012e5baf6be877b7c9dc2ea5f5 100644 (file)
  * Version 44 - Add dirfsp arg to SMB_VFS_READDIR()
  * Version 44 - Remove SMB_VFS_GET_DOS_ATTRIBUTES()
  * Version 44 - Replace SMB_VFS_GET_COMPRESSION() with SMB_VFS_FGET_COMPRESSION()
+ * Version 44 - Add type argument to SMB_VFS_SYS_ACL_SET_FD()
  */
 
 #define SMB_VFS_INTERFACE_VERSION 44
@@ -1219,7 +1220,10 @@ struct vfs_fn_pointers {
                                        const struct smb_filename *smb_fname,
                                        SMB_ACL_TYPE_T acltype,
                                        SMB_ACL_T theacl);
-       int (*sys_acl_set_fd_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_T theacl);
+       int (*sys_acl_set_fd_fn)(struct vfs_handle_struct *handle,
+                                struct files_struct *fsp,
+                                SMB_ACL_TYPE_T type,
+                                SMB_ACL_T theacl);
        int (*sys_acl_delete_def_file_fn)(struct vfs_handle_struct *handle,
                                        const struct smb_filename *smb_fname);
 
@@ -1746,7 +1750,9 @@ int smb_vfs_call_sys_acl_set_file(struct vfs_handle_struct *handle,
                                SMB_ACL_TYPE_T acltype,
                                SMB_ACL_T theacl);
 int smb_vfs_call_sys_acl_set_fd(struct vfs_handle_struct *handle,
-                               struct files_struct *fsp, SMB_ACL_T theacl);
+                               struct files_struct *fsp,
+                               SMB_ACL_TYPE_T type,
+                               SMB_ACL_T theacl);
 int smb_vfs_call_sys_acl_delete_def_file(struct vfs_handle_struct *handle,
                                const struct smb_filename *smb_fname);
 ssize_t smb_vfs_call_getxattr(struct vfs_handle_struct *handle,
@@ -2164,7 +2170,9 @@ int vfs_not_implemented_sys_acl_set_file(vfs_handle_struct *handle,
                                const struct smb_filename *smb_fname,
                                SMB_ACL_TYPE_T acltype,
                                SMB_ACL_T theacl);
-int vfs_not_implemented_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
+int vfs_not_implemented_sys_acl_set_fd(vfs_handle_struct *handle,
+                                      struct files_struct *fsp,
+                                      SMB_ACL_TYPE_T type,
                                       SMB_ACL_T theacl);
 int vfs_not_implemented_sys_acl_delete_def_file(vfs_handle_struct *handle,
                                        const struct smb_filename *smb_fname);
index 80720ad16cdac0003aceb0703558632092a58c92..2fc3ba7b66803930fe3ed089d5ffe04d531ccb2e 100644 (file)
 #define SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname, acltype, theacl) \
        smb_vfs_call_sys_acl_set_file((handle)->next, (smb_fname), (acltype), (theacl))
 
-#define SMB_VFS_SYS_ACL_SET_FD(fsp, theacl) \
-       smb_vfs_call_sys_acl_set_fd((fsp)->conn->vfs_handles, (fsp), (theacl))
-#define SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl) \
-       smb_vfs_call_sys_acl_set_fd((handle)->next, (fsp), (theacl))
+#define SMB_VFS_SYS_ACL_SET_FD(fsp, type, theacl) \
+       smb_vfs_call_sys_acl_set_fd((fsp)->conn->vfs_handles, (fsp), (type), (theacl))
+#define SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl) \
+       smb_vfs_call_sys_acl_set_fd((handle)->next, (fsp), (type), (theacl))
 
 #define SMB_VFS_SYS_ACL_DELETE_DEF_FILE(conn, smb_fname) \
        smb_vfs_call_sys_acl_delete_def_file((conn)->vfs_handles, (smb_fname))
index c80f8f30c904a88422994c37c4246e23d24ee453..ad970b6299be1eb1152554c94b03511ceb2479cc 100644 (file)
@@ -387,7 +387,7 @@ int sys_acl_set_file(vfs_handle_struct *handle,
 int sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
                   SMB_ACL_T acl_d)
 {
-       return posixacl_sys_acl_set_fd(handle, fsp, acl_d);
+       return posixacl_sys_acl_set_fd(handle, fsp, SMB_ACL_TYPE_ACCESS, acl_d);
 }
 
 int sys_acl_delete_def_file(vfs_handle_struct *handle,
index 6f016e17e0b655a55b79c27ad953c834fe4c5715..e88c6cecacec366f67decc5354340d9168037c2a 100644 (file)
@@ -479,7 +479,9 @@ int posixacl_xattr_acl_set_file(vfs_handle_struct *handle,
 }
 
 int posixacl_xattr_acl_set_fd(vfs_handle_struct *handle,
-                             files_struct *fsp, SMB_ACL_T theacl)
+                             files_struct *fsp,
+                             SMB_ACL_TYPE_T type,
+                             SMB_ACL_T theacl)
 {
        char *buf;
        ssize_t size;
index 70962dd3115864734cba434a565c62cd2cddb805..7d0fb2bb8bf0cca67d89bebb555d336fb1e0caab 100644 (file)
@@ -37,6 +37,7 @@ int posixacl_xattr_acl_set_file(vfs_handle_struct *handle,
 
 int posixacl_xattr_acl_set_fd(vfs_handle_struct *handle,
                              files_struct *fsp,
+                             SMB_ACL_TYPE_T type,
                              SMB_ACL_T theacl);
 
 int posixacl_xattr_acl_delete_def_file(vfs_handle_struct *handle,
index 2fb03c03efc21e0f29e9ed9c03f799ae7ef492dc..ecbc75f9937b98c9e011a39bbba3c2a5a9189ecc 100644 (file)
@@ -416,6 +416,7 @@ fail:
 
 static int sys_acl_set_fd_tdb(vfs_handle_struct *handle,
                             files_struct *fsp,
+                           SMB_ACL_TYPE_T type,
                             SMB_ACL_T theacl)
 {
        struct db_context *db = acl_db;
@@ -428,8 +429,9 @@ static int sys_acl_set_fd_tdb(vfs_handle_struct *handle,
        }
 
        ret = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle,
-                                               fsp,
-                                               theacl);
+                                         fsp,
+                                         type,
+                                         theacl);
        if (ret == -1) {
                return -1;
        }
index 2f286ed97f77218d8f14d009c5295992fd6d89d5..7a1f1ba44374bfc31e17cc9e81eb660fdcba093c 100644 (file)
@@ -250,10 +250,12 @@ static int sys_acl_set_file_xattr(vfs_handle_struct *handle,
 
 static int sys_acl_set_fd_xattr(vfs_handle_struct *handle,
                             files_struct *fsp,
+                           SMB_ACL_TYPE_T type,
                             SMB_ACL_T theacl)
 {
        int ret = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle,
                                                fsp,
+                                               type,
                                                theacl);
        if (ret == -1) {
                return -1;
index 39c92e3606035ddfaf8948991101e6b4ce2d841e..e9cc667faf90c8fb4019eb7a04cb17ea32d1db7f 100644 (file)
@@ -156,6 +156,7 @@ int aixacl_sys_acl_set_file(vfs_handle_struct *handle,
 
 int aixacl_sys_acl_set_fd(vfs_handle_struct *handle,
                            files_struct *fsp,
+                           SMB_ACL_TYPE_T type,
                            SMB_ACL_T theacl)
 {
        struct acl *file_acl = NULL;
index 57f4d0fc000b48e0dc9a73ffff068456aeda05ea..d06f7c882f5137dbdd39f3bcd80fa764a225b6ec 100644 (file)
@@ -513,6 +513,7 @@ int aixjfs2_sys_acl_set_file(vfs_handle_struct *handle,
 
 int aixjfs2_sys_acl_set_fd(vfs_handle_struct *handle,
                            files_struct *fsp,
+                           SMB_ACL_TYPE_T type,
                            SMB_ACL_T theacl)
 {
        struct acl      *acl_aixc;
index 21ea24000ac4ac08dc4358d76ae84fdc4708f3e2..0e4843ff58f274d0ed657347a479276704289074 100644 (file)
@@ -1673,6 +1673,7 @@ static int catia_sys_acl_blob_get_fd(vfs_handle_struct *handle,
 
 static int catia_sys_acl_set_fd(vfs_handle_struct *handle,
                                files_struct *fsp,
+                               SMB_ACL_TYPE_T type,
                                SMB_ACL_T theacl)
 {
        struct catia_cache *cc = NULL;
@@ -1683,7 +1684,7 @@ static int catia_sys_acl_set_fd(vfs_handle_struct *handle,
                return ret;
        }
 
-       ret = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
+       ret = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
 
        CATIA_FETCH_FSP_POST_NEXT(&cc, fsp);
 
index 9157355dfdb7e6f42b8d8e2a7f2218c644f2b9c1..155bae3382353ab5dbbf6222fb1fcab7b2c1f7c9 100644 (file)
@@ -3231,7 +3231,10 @@ static int vfswrap_sys_acl_set_file(vfs_handle_struct *handle,
        return sys_acl_set_file(handle, smb_fname, acltype, theacl);
 }
 
-static int vfswrap_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_T theacl)
+static int vfswrap_sys_acl_set_fd(vfs_handle_struct *handle,
+                                 files_struct *fsp,
+                                 SMB_ACL_TYPE_T type,
+                                 SMB_ACL_T theacl)
 {
        return sys_acl_set_fd(handle, fsp, theacl);
 }
index d83859543642634728d78520cd4f708e46d4e3f9..a093fcb12ea68c1a705093bff88ad397771854a3 100644 (file)
@@ -351,7 +351,10 @@ static int fake_acls_sys_acl_set_file(vfs_handle_struct *handle,
        return ret;
 }
 
-static int fake_acls_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_T theacl)
+static int fake_acls_sys_acl_set_fd(vfs_handle_struct *handle,
+                                   struct files_struct *fsp,
+                                   SMB_ACL_TYPE_T type,
+                                   SMB_ACL_T theacl)
 {
        int ret;
        const char *name = FAKE_ACL_ACCESS_XATTR;
@@ -703,6 +706,7 @@ static int fake_acls_fchmod(vfs_handle_struct *handle,
        }
        ret = fake_acls_sys_acl_set_fd(handle,
                                fsp,
+                               SMB_ACL_TYPE_ACCESS,
                                the_acl);
        TALLOC_FREE(frame);
        return ret;
index 39fcdfc59daf36f7500c947536402196408f9036..0350df868a574a2c67d5a19422ca06e7044def09 100644 (file)
@@ -2576,12 +2576,14 @@ static int smb_full_audit_sys_acl_set_file(vfs_handle_struct *handle,
        return result;
 }
 
-static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
-                               SMB_ACL_T theacl)
+static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle,
+                                        struct files_struct *fsp,
+                                        SMB_ACL_TYPE_T type,
+                                        SMB_ACL_T theacl)
 {
        int result;
 
-       result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
+       result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
 
        do_log(SMB_VFS_OP_SYS_ACL_SET_FD, (result >= 0), handle,
               "%s", fsp_str_do_log(fsp));
index 78ee7fc6958d65206e685642b4d8699fcd481ad8..56a7254a7e625cbec93dbad47dc1546d0425584d 100644 (file)
@@ -1343,6 +1343,7 @@ static int gpfsacl_sys_acl_set_file(vfs_handle_struct *handle,
 
 static int gpfsacl_sys_acl_set_fd(vfs_handle_struct *handle,
                                  files_struct *fsp,
+                                 SMB_ACL_TYPE_T type,
                                  SMB_ACL_T theacl)
 {
        struct gpfs_config_data *config;
@@ -1352,7 +1353,7 @@ static int gpfsacl_sys_acl_set_fd(vfs_handle_struct *handle,
                                return -1);
 
        if (!config->acl) {
-               return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
+               return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
        }
 
        return gpfsacl_sys_acl_set_file(handle, fsp->fsp_name,
index 2a8db6737087b3cd8de7efeb6e46774be50987a9..33bf0661648ac3b031498ec9170951e8597c0d5d 100644 (file)
@@ -630,6 +630,7 @@ static int nfs4acl_xattr_fail__sys_acl_set_file(vfs_handle_struct *handle,
 
 static int nfs4acl_xattr_fail__sys_acl_set_fd(vfs_handle_struct *handle,
                                       files_struct *fsp,
+                                      SMB_ACL_TYPE_T type,
                                       SMB_ACL_T theacl)
 {
        return -1;
index 4aeccb889c443185a48d878aa681e9c429201e13..a1bbe3f41bc61f032c2b81d0215c8d9d13e367a4 100644 (file)
@@ -852,7 +852,9 @@ int vfs_not_implemented_sys_acl_set_file(vfs_handle_struct *handle,
        return -1;
 }
 
-int vfs_not_implemented_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
+int vfs_not_implemented_sys_acl_set_fd(vfs_handle_struct *handle,
+                                      struct files_struct *fsp,
+                                      SMB_ACL_TYPE_T type,
                                       SMB_ACL_T theacl)
 {
        errno = ENOSYS;
index cca4dd22b60855ece763714b6191a25c7b0dfb75..d573461e9874449e7335466e7486a7e28749a3a0 100644 (file)
@@ -137,6 +137,7 @@ int posixacl_sys_acl_set_file(vfs_handle_struct *handle,
 
 int posixacl_sys_acl_set_fd(vfs_handle_struct *handle,
                            files_struct *fsp,
+                           SMB_ACL_TYPE_T type,
                            SMB_ACL_T theacl)
 {
        int res;
index da7449f039ccd5c424924661d4ceee4c13d8f9d8..5a423ca2c4a8cd8da2eb02d2c3b2de2417da6ade 100644 (file)
@@ -37,6 +37,7 @@ int posixacl_sys_acl_set_file(vfs_handle_struct *handle,
 
 int posixacl_sys_acl_set_fd(vfs_handle_struct *handle,
                            files_struct *fsp,
+                           SMB_ACL_TYPE_T type,
                            SMB_ACL_T theacl);
 
 int posixacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
index 7c4ffd02c35967f1728dd0af33ba2507370bd876..41a2dd363d86db571cd97628934098d1f107fd18 100644 (file)
@@ -237,6 +237,7 @@ int solarisacl_sys_acl_set_file(vfs_handle_struct *handle,
  */
 int solarisacl_sys_acl_set_fd(vfs_handle_struct *handle,
                              files_struct *fsp,
+                             SMB_ACL_TYPE_T type,
                              SMB_ACL_T theacl)
 {
        SOLARIS_ACL_T solaris_acl = NULL;
index 47580a7a53d4bf2dd721c65f5b3a2d179dfcc465..b838878d4b33cd241a599024774509fca171ea98 100644 (file)
@@ -1409,13 +1409,14 @@ static SMB_ACL_T streams_xattr_sys_acl_get_fd(vfs_handle_struct *handle,
 
 static int streams_xattr_sys_acl_set_fd(vfs_handle_struct *handle,
                                        files_struct *fsp,
+                                       SMB_ACL_TYPE_T type,
                                        SMB_ACL_T theacl)
 {
        struct stream_io *sio =
                (struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
 
        if (sio == NULL) {
-               return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
+               return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
        }
 
        return 0;
index 3c8459e3eaa3834eaa8db718b1fed10296f4a1de..1f7829fd29258ebfd151f3da70b28d5fe12a0ecc 100644 (file)
@@ -2409,6 +2409,7 @@ static int smb_time_audit_sys_acl_set_file(vfs_handle_struct *handle,
 
 static int smb_time_audit_sys_acl_set_fd(vfs_handle_struct *handle,
                                         files_struct *fsp,
+                                        SMB_ACL_TYPE_T type,
                                         SMB_ACL_T theacl)
 {
        int result;
@@ -2416,7 +2417,7 @@ static int smb_time_audit_sys_acl_set_fd(vfs_handle_struct *handle,
        double timediff;
 
        clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
+       result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
        clock_gettime_mono(&ts2);
        timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
 
index b93ff28fb3d70648d354e635465d74b60ec73ac8..104397ee0be45b15234769caad08db9a852aa206 100644 (file)
@@ -135,6 +135,7 @@ fail:
 
 int tru64acl_sys_acl_set_fd(vfs_handle_struct *handle,
                            files_struct *fsp,
+                           SMB_ACL_TYPE_T type,
                            SMB_ACL_T theacl)
 {
         int res;
index f51d6cfb38b5b42effc1bb90c0a7a9e2c1ffc678..7bdcd3484a07f5900803de3bac45c5f68bffae50 100644 (file)
@@ -485,7 +485,9 @@ out:
        return ret;
 }
 
-static int vxfs_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
+static int vxfs_sys_acl_set_fd(vfs_handle_struct *handle,
+                              struct files_struct *fsp,
+                              SMB_ACL_TYPE_T type,
                               SMB_ACL_T theacl)
 {
 
@@ -494,7 +496,7 @@ static int vxfs_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
                return 0;
        }
 
-       return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
+       return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
 }
 
 static int vxfs_sys_acl_set_file(vfs_handle_struct *handle,
index fba7253bbef00a908cbff9c37eae486b60b11819..ef9ac0eb718d82ac7791dc865476bd0ca28761de 100644 (file)
@@ -545,6 +545,7 @@ static int zfsacl_fail__sys_acl_set_file(vfs_handle_struct *handle,
 
 static int zfsacl_fail__sys_acl_set_fd(vfs_handle_struct *handle,
                                       files_struct *fsp,
+                                      SMB_ACL_TYPE_T type,
                                       SMB_ACL_T theacl)
 {
        return -1;
index fb137f293507c1037ffdf67567f00d3ff83a0573..87a89fcbd38afac338e588722a44ac282df8fe4b 100644 (file)
@@ -3061,7 +3061,7 @@ static bool set_canon_ace_list(files_struct *fsp,
                        }
                }
        } else {
-               if (SMB_VFS_SYS_ACL_SET_FD(fsp, the_acl) == -1) {
+               if (SMB_VFS_SYS_ACL_SET_FD(fsp, SMB_ACL_TYPE_ACCESS, the_acl) == -1) {
                        /*
                         * Some systems allow all the above calls and only fail with no ACL support
                         * when attempting to apply the acl. HPUX with HFS is an example of this. JRA.
@@ -3079,7 +3079,9 @@ static bool set_canon_ace_list(files_struct *fsp,
                                         fsp_str_dbg(fsp)));
 
                                become_root();
-                               sret = SMB_VFS_SYS_ACL_SET_FD(fsp, the_acl);
+                               sret = SMB_VFS_SYS_ACL_SET_FD(fsp,
+                                                             SMB_ACL_TYPE_ACCESS,
+                                                             the_acl);
                                unbecome_root();
                                if (sret == 0) {
                                        ret = True;
@@ -4559,7 +4561,7 @@ static NTSTATUS remove_posix_acl(connection_struct *conn,
        }
 
        /* Set the new empty file ACL. */
-       ret = SMB_VFS_SYS_ACL_SET_FD(fsp, new_file_acl);
+       ret = SMB_VFS_SYS_ACL_SET_FD(fsp, SMB_ACL_TYPE_ACCESS, new_file_acl);
        if (ret == -1) {
                status = map_nt_error_from_unix(errno);
                DBG_INFO("acl_set_file failed on %s (%s)\n",
@@ -4605,7 +4607,7 @@ NTSTATUS set_unix_posix_acl(connection_struct *conn,
                return map_nt_error_from_unix(errno);
        }
 
-       ret = SMB_VFS_SYS_ACL_SET_FD(fsp, file_acl);
+       ret = SMB_VFS_SYS_ACL_SET_FD(fsp, SMB_ACL_TYPE_ACCESS, file_acl);
        if (ret == -1) {
                status = map_nt_error_from_unix(errno);
                DBG_INFO("acl_set_file failed on %s (%s)\n",
index afff32063b573d37921c4abef467a27e4efe1a43..47277d1dffd9b40a5294bc3dacacdf21c12e808a 100644 (file)
@@ -2776,10 +2776,12 @@ int smb_vfs_call_sys_acl_set_file(struct vfs_handle_struct *handle,
 }
 
 int smb_vfs_call_sys_acl_set_fd(struct vfs_handle_struct *handle,
-                               struct files_struct *fsp, SMB_ACL_T theacl)
+                               struct files_struct *fsp,
+                               SMB_ACL_TYPE_T type,
+                               SMB_ACL_T theacl)
 {
        VFS_FIND(sys_acl_set_fd);
-       return handle->fns->sys_acl_set_fd_fn(handle, fsp, theacl);
+       return handle->fns->sys_acl_set_fd_fn(handle, fsp, type, theacl);
 }
 
 int smb_vfs_call_sys_acl_delete_def_file(struct vfs_handle_struct *handle,