]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/libadouble: remove dirfsp arg from ad_convert()
authorRalph Boehme <slow@samba.org>
Fri, 22 Jan 2021 16:03:30 +0000 (17:03 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 28 Jan 2021 08:11:49 +0000 (08:11 +0000)
ad_convert() doesn't really need the dirfsp in most places. Only
ad_convert_delete_adfile() would use it, so instead open a dirfsp internally for
this function in a later commit.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/adouble.c
source3/lib/adouble.h
source3/modules/vfs_fruit.c

index e869965876d209135fcf807154aaa7900abb0d35..10b9bb1fb5d1938ff86dbdc248acd7d049e1ebd5 100644 (file)
@@ -1418,7 +1418,6 @@ static bool ad_convert_delete_adfile(vfs_handle_struct *handle,
  * otherwise
  **/
 int ad_convert(struct vfs_handle_struct *handle,
-               struct files_struct *dirfsp,
                const struct smb_filename *smb_fname,
                const char *catia_mappings,
                uint32_t flags)
@@ -1468,7 +1467,7 @@ int ad_convert(struct vfs_handle_struct *handle,
 
        ok = ad_convert_delete_adfile(handle,
                        ad,
-                       dirfsp,
+                       handle->conn->cwd_fsp,
                        smb_fname,
                        flags);
        if (!ok) {
index a5761281670d56fd2ded4fae18192a123b7dee0c..040568a44b621d5df7f6863144ded1780c0fd5dc 100644 (file)
@@ -154,7 +154,6 @@ char *ad_get_entry(const struct adouble *ad, int eid);
 int ad_getdate(const struct adouble *ad, unsigned int dateoff, uint32_t *date);
 int ad_setdate(struct adouble *ad, unsigned int dateoff, uint32_t date);
 int ad_convert(struct vfs_handle_struct *handle,
-               struct files_struct *dirfsp,
                const struct smb_filename *smb_fname,
                const char *catia_mappings,
                uint32_t flags);
index 6e8a785d91fdc5e7b76fba81821df159d6ec1e51..529741d2611c5e2e18088cf3fcc73750bf733f67 100644 (file)
@@ -4094,7 +4094,6 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle,
                }
 
                ret = ad_convert(handle,
-                                handle->conn->cwd_fsp,
                                 smb_fname,
                                 macos_string_replace_map,
                                 conv_flags);
@@ -4203,7 +4202,6 @@ static NTSTATUS fruit_readdir_attr(struct vfs_handle_struct *handle,
        }
 
        ret = ad_convert(handle,
-                       handle->conn->cwd_fsp,
                        fname,
                        macos_string_replace_map,
                        conv_flags);