diff options
author | Jeremy Allison <jra@samba.org> | 2016-03-18 21:19:38 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-03-24 22:57:16 +0100 |
commit | dc5dad48139a3dcb4544e4f31aabe269f6401849 (patch) | |
tree | d28e38e34b700d0bc2cabab81f8130eaf1c91909 /source3/modules | |
parent | 2e302d7007a58df972f7e63382ee8c9729f80560 (diff) | |
download | samba-dc5dad48139a3dcb4544e4f31aabe269f6401849.tar.gz |
s3: Filenames: Add uint32_t flags parameter to synthetic_smb_fname().
Get it from parent/deriving smb_filename if present.
Use 0 (as usually this a Windows-style lookup) if
not.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/non_posix_acls.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_cap.c | 21 | ||||
-rw-r--r-- | source3/modules/vfs_catia.c | 27 | ||||
-rw-r--r-- | source3/modules/vfs_default.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_fake_acls.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_fruit.c | 22 | ||||
-rw-r--r-- | source3/modules/vfs_gpfs.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_hpuxacl.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_media_harmony.c | 6 | ||||
-rw-r--r-- | source3/modules/vfs_nfs4acl_xattr.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_recycle.c | 10 | ||||
-rw-r--r-- | source3/modules/vfs_shadow_copy.c | 3 | ||||
-rw-r--r-- | source3/modules/vfs_shadow_copy2.c | 27 | ||||
-rw-r--r-- | source3/modules/vfs_snapper.c | 24 | ||||
-rw-r--r-- | source3/modules/vfs_streams_depot.c | 71 | ||||
-rw-r--r-- | source3/modules/vfs_streams_xattr.c | 14 | ||||
-rw-r--r-- | source3/modules/vfs_unityed_media.c | 6 | ||||
-rw-r--r-- | source3/modules/vfs_vxfs.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_xattr_tdb.c | 2 |
19 files changed, 170 insertions, 77 deletions
diff --git a/source3/modules/non_posix_acls.c b/source3/modules/non_posix_acls.c index fca9979d649..8d3be72223d 100644 --- a/source3/modules/non_posix_acls.c +++ b/source3/modules/non_posix_acls.c @@ -32,7 +32,7 @@ int non_posix_sys_acl_blob_get_file_helper(vfs_handle_struct *handle, struct xattr_sys_acl_hash_wrapper acl_wrapper = {}; struct smb_filename *smb_fname; - smb_fname = synthetic_smb_fname(frame, path_p, NULL, NULL); + smb_fname = synthetic_smb_fname(frame, path_p, NULL, NULL, 0); if (smb_fname == NULL) { TALLOC_FREE(frame); errno = ENOMEM; diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c index 42b4b8dc013..eece1986f90 100644 --- a/source3/modules/vfs_cap.c +++ b/source3/modules/vfs_cap.c @@ -69,7 +69,8 @@ static DIR *cap_opendir(vfs_handle_struct *handle, cap_smb_fname = synthetic_smb_fname(talloc_tos(), capname, NULL, - NULL); + NULL, + smb_fname->flags); if (cap_smb_fname == NULL) { TALLOC_FREE(capname); errno = ENOMEM; @@ -125,7 +126,8 @@ static int cap_mkdir(vfs_handle_struct *handle, cap_smb_fname = synthetic_smb_fname(talloc_tos(), cappath, NULL, - NULL); + NULL, + smb_fname->flags); if (cap_smb_fname == NULL) { TALLOC_FREE(cappath); errno = ENOMEM; @@ -149,7 +151,8 @@ static int cap_rmdir(vfs_handle_struct *handle, cap_smb_fname = synthetic_smb_fname(talloc_tos(), cappath, NULL, - NULL); + NULL, + smb_fname->flags); if (cap_smb_fname == NULL) { TALLOC_FREE(cappath); errno = ENOMEM; @@ -321,7 +324,8 @@ static int cap_chmod(vfs_handle_struct *handle, cap_smb_fname = synthetic_smb_fname(talloc_tos(), cappath, NULL, - NULL); + NULL, + smb_fname->flags); if (cap_smb_fname == NULL) { TALLOC_FREE(cappath); errno = ENOMEM; @@ -354,7 +358,8 @@ static int cap_chown(vfs_handle_struct *handle, cap_smb_fname = synthetic_smb_fname(talloc_tos(), cappath, NULL, - NULL); + NULL, + smb_fname->flags); if (cap_smb_fname == NULL) { TALLOC_FREE(cappath); errno = ENOMEM; @@ -387,7 +392,8 @@ static int cap_lchown(vfs_handle_struct *handle, cap_smb_fname = synthetic_smb_fname(talloc_tos(), cappath, NULL, - NULL); + NULL, + smb_fname->flags); if (cap_smb_fname == NULL) { TALLOC_FREE(cappath); errno = ENOMEM; @@ -522,7 +528,8 @@ static int cap_chmod_acl(vfs_handle_struct *handle, cap_smb_fname = synthetic_smb_fname(talloc_tos(), cappath, NULL, - NULL); + NULL, + smb_fname->flags); if (cap_smb_fname == NULL) { TALLOC_FREE(cappath); errno = ENOMEM; diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index e2b4eb5745e..c5d2b6a1b28 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -290,7 +290,8 @@ static DIR *catia_opendir(vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), name_mapped, NULL, - NULL); + NULL, + smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_smb_fname); errno = ENOMEM; @@ -543,7 +544,8 @@ static int catia_chown(vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, - NULL); + NULL, + smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(name); errno = ENOMEM; @@ -580,7 +582,8 @@ static int catia_lchown(vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, - NULL); + NULL, + smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(name); errno = ENOMEM; @@ -616,7 +619,8 @@ static int catia_chmod(vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, - NULL); + NULL, + smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(name); errno = ENOMEM; @@ -650,7 +654,8 @@ static int catia_rmdir(vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, - NULL); + NULL, + smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(name); errno = ENOMEM; @@ -684,7 +689,8 @@ static int catia_mkdir(vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, - NULL); + NULL, + smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(name); errno = ENOMEM; @@ -819,7 +825,8 @@ catia_streaminfo(struct vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL); + NULL, + smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(mapped_name); return NT_STATUS_NO_MEMORY; @@ -898,7 +905,8 @@ catia_get_nt_acl(struct vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL); + NULL, + smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_name); return NT_STATUS_NO_MEMORY; @@ -935,7 +943,8 @@ catia_chmod_acl(vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL); + NULL, + smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_name); errno = ENOMEM; diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 23df640b415..65a14dfa9bc 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -133,7 +133,7 @@ static uint32_t vfswrap_fs_capabilities(struct vfs_handle_struct *handle, * use when setting a timestamp. */ smb_fname_cpath = synthetic_smb_fname(talloc_tos(), conn->connectpath, - NULL, NULL); + NULL, NULL, 0); if (smb_fname_cpath == NULL) { return caps; } diff --git a/source3/modules/vfs_fake_acls.c b/source3/modules/vfs_fake_acls.c index 491e1ac1ea8..55ff7db37df 100644 --- a/source3/modules/vfs_fake_acls.c +++ b/source3/modules/vfs_fake_acls.c @@ -364,7 +364,7 @@ static int fake_acls_sys_acl_delete_def_file(vfs_handle_struct *handle, const ch TALLOC_CTX *frame = talloc_stackframe(); struct smb_filename *smb_fname; - smb_fname = synthetic_smb_fname(frame, path, NULL, NULL); + smb_fname = synthetic_smb_fname(frame, path, NULL, NULL, 0); if (smb_fname == NULL) { TALLOC_FREE(frame); errno = ENOMEM; diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 0c742861d76..761741a3570 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -2132,7 +2132,10 @@ static int fruit_open_meta(vfs_handle_struct *handle, /* Create an smb_filename with stream_name == NULL. */ smb_fname_base = synthetic_smb_fname(talloc_tos(), - smb_fname->base_name, NULL, NULL); + smb_fname->base_name, + NULL, + NULL, + smb_fname->flags); if (smb_fname_base == NULL) { errno = ENOMEM; @@ -2281,7 +2284,10 @@ static int fruit_open_rsrc(vfs_handle_struct *handle, /* Create an smb_filename with stream_name == NULL. */ smb_fname_base = synthetic_smb_fname(talloc_tos(), - adpath, NULL, NULL); + adpath, + NULL, + NULL, + smb_fname->flags); if (smb_fname_base == NULL) { errno = ENOMEM; rc = -1; @@ -2527,7 +2533,8 @@ static int fruit_chmod(vfs_handle_struct *handle, smb_fname_adp = synthetic_smb_fname(talloc_tos(), adp, NULL, - NULL); + NULL, + smb_fname->flags); if (smb_fname_adp == NULL) { TALLOC_FREE(adp); errno = ENOMEM; @@ -2583,7 +2590,8 @@ static int fruit_chown(vfs_handle_struct *handle, adp_smb_fname = synthetic_smb_fname(talloc_tos(), adp, NULL, - NULL); + NULL, + smb_fname->flags); if (adp_smb_fname == NULL) { errno = ENOMEM; rc = -1; @@ -3802,7 +3810,8 @@ static void fruit_copy_chunk_done(struct tevent_req *subreq) req, state->src_fsp->fsp_name->base_name, streams[i].name, - NULL); + NULL, + state->src_fsp->fsp_name->flags); if (tevent_req_nomem(src_fname_tmp, req)) { return; } @@ -3816,7 +3825,8 @@ static void fruit_copy_chunk_done(struct tevent_req *subreq) req, state->dst_fsp->fsp_name->base_name, streams[i].name, - NULL); + NULL, + state->dst_fsp->fsp_name->flags); if (tevent_req_nomem(dst_fname_tmp, req)) { TALLOC_FREE(src_fname_tmp); return; diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 09e37fa7f53..04d89f48997 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1380,7 +1380,7 @@ static int gpfsacl_emu_chmod(vfs_handle_struct *handle, /* don't add complementary DENY ACEs here */ fake_fsp.fsp_name = synthetic_smb_fname( - frame, path, NULL, NULL); + frame, path, NULL, NULL, 0); if (fake_fsp.fsp_name == NULL) { errno = ENOMEM; TALLOC_FREE(frame); diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c index 55a68946517..df27c89f948 100644 --- a/source3/modules/vfs_hpuxacl.c +++ b/source3/modules/vfs_hpuxacl.c @@ -221,7 +221,7 @@ int hpuxacl_sys_acl_set_file(vfs_handle_struct *handle, DEBUG(10, ("hpuxacl_sys_acl_set_file called for file '%s'\n", name)); - smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, NULL); + smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, NULL, 0); if (smb_fname == NULL) { status = NT_STATUS_NO_MEMORY; goto done; diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c index 2ae6c4a96a1..8f802216771 100644 --- a/source3/modules/vfs_media_harmony.c +++ b/source3/modules/vfs_media_harmony.c @@ -783,7 +783,8 @@ static DIR *mh_opendir(vfs_handle_struct *handle, synthetic_smb_fname(talloc_tos(), dirInfo->clientPath, NULL, - NULL); + NULL, + smb_fname->flags); if (smb_fname_clientpath == NULL) { goto err; } @@ -2045,7 +2046,8 @@ static NTSTATUS mh_get_nt_acl(vfs_handle_struct *handle, client_smb_fname = synthetic_smb_fname(talloc_tos(), clientPath, NULL, - NULL); + NULL, + smb_fname->flags); if (client_smb_fname == NULL) { TALLOC_FREE(clientPath); return NT_STATUS_NO_MEMORY; diff --git a/source3/modules/vfs_nfs4acl_xattr.c b/source3/modules/vfs_nfs4acl_xattr.c index af84b8bb71a..9ab7238e0ac 100644 --- a/source3/modules/vfs_nfs4acl_xattr.c +++ b/source3/modules/vfs_nfs4acl_xattr.c @@ -417,7 +417,7 @@ static struct SMB4ACL_T *nfs4acls_inheritacl(vfs_handle_struct *handle, TALLOC_CTX *frame = talloc_stackframe(); DEBUG(10, ("nfs4acls_inheritacl invoked for %s\n", path)); - smb_fname = synthetic_smb_fname(frame, path, NULL, NULL); + smb_fname = synthetic_smb_fname(frame, path, NULL, NULL, 0); if (smb_fname == NULL) { TALLOC_FREE(frame); errno = ENOMEM; diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c index 4981f558a82..ca3fc2ee5f4 100644 --- a/source3/modules/vfs_recycle.c +++ b/source3/modules/vfs_recycle.c @@ -299,7 +299,8 @@ static bool recycle_create_dir(vfs_handle_struct *handle, const char *dname) smb_fname = synthetic_smb_fname(talloc_tos(), new_dir, NULL, - NULL); + NULL, + 0); if (smb_fname == NULL) { goto done; } @@ -587,8 +588,11 @@ static int recycle_unlink(vfs_handle_struct *handle, } /* Create smb_fname with final base name and orig stream name. */ - smb_fname_final = synthetic_smb_fname(talloc_tos(), final_name, - smb_fname->stream_name, NULL); + smb_fname_final = synthetic_smb_fname(talloc_tos(), + final_name, + smb_fname->stream_name, + NULL, + smb_fname->flags); if (smb_fname_final == NULL) { rc = SMB_VFS_NEXT_UNLINK(handle, smb_fname); goto done; diff --git a/source3/modules/vfs_shadow_copy.c b/source3/modules/vfs_shadow_copy.c index 77dc1636c91..9b43e85af63 100644 --- a/source3/modules/vfs_shadow_copy.c +++ b/source3/modules/vfs_shadow_copy.c @@ -230,7 +230,8 @@ static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle, struct smb_filename *smb_fname = synthetic_smb_fname(talloc_tos(), fsp->conn->connectpath, NULL, - NULL); + NULL, + 0); if (smb_fname == NULL) { errno = ENOMEM; return -1; diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index c63d67603d3..43bc89d3126 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -719,7 +719,8 @@ static DIR *shadow_copy2_opendir(vfs_handle_struct *handle, conv_smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + smb_fname->flags); if (conv_smb_fname == NULL) { TALLOC_FREE(conv); return NULL; @@ -998,7 +999,8 @@ static int shadow_copy2_chmod(vfs_handle_struct *handle, conv_smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + smb_fname->flags); if (conv_smb_fname == NULL) { TALLOC_FREE(conv); errno = ENOMEM; @@ -1042,7 +1044,8 @@ static int shadow_copy2_chown(vfs_handle_struct *handle, conv_smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + smb_fname->flags); if (conv_smb_fname == NULL) { TALLOC_FREE(conv); errno = ENOMEM; @@ -1442,7 +1445,8 @@ static int shadow_copy2_get_shadow_copy_data( snapdir_smb_fname = synthetic_smb_fname(talloc_tos(), snapdir, NULL, - NULL); + NULL, + fsp->fsp_name->flags); if (snapdir_smb_fname == NULL) { errno = ENOMEM; talloc_free(tmp_ctx); @@ -1543,7 +1547,8 @@ static NTSTATUS shadow_copy2_fget_nt_acl(vfs_handle_struct *handle, smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + fsp->fsp_name->flags); if (smb_fname == NULL) { TALLOC_FREE(conv); return NT_STATUS_NO_MEMORY; @@ -1587,7 +1592,8 @@ static NTSTATUS shadow_copy2_get_nt_acl(vfs_handle_struct *handle, conv_smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + smb_fname->flags); if (conv_smb_fname == NULL) { TALLOC_FREE(conv); return NT_STATUS_NO_MEMORY; @@ -1627,7 +1633,8 @@ static int shadow_copy2_mkdir(vfs_handle_struct *handle, conv_smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + smb_fname->flags); if (conv_smb_fname == NULL) { TALLOC_FREE(conv); return -1; @@ -1667,7 +1674,8 @@ static int shadow_copy2_rmdir(vfs_handle_struct *handle, conv_smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + smb_fname->flags); if (conv_smb_fname == NULL) { TALLOC_FREE(conv); return -1; @@ -1853,7 +1861,8 @@ static int shadow_copy2_chmod_acl(vfs_handle_struct *handle, conv_smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + smb_fname->flags); if (conv_smb_fname == NULL) { TALLOC_FREE(conv); errno = ENOMEM; diff --git a/source3/modules/vfs_snapper.c b/source3/modules/vfs_snapper.c index 11a99d97b79..64a83bdfe91 100644 --- a/source3/modules/vfs_snapper.c +++ b/source3/modules/vfs_snapper.c @@ -1972,7 +1972,8 @@ static DIR *snapper_gmt_opendir(vfs_handle_struct *handle, conv_smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + smb_fname->flags); if (conv_smb_fname == NULL) { TALLOC_FREE(conv); errno = ENOMEM; @@ -2244,7 +2245,8 @@ static int snapper_gmt_chmod(vfs_handle_struct *handle, conv_smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + smb_fname->flags); if (conv_smb_fname == NULL) { TALLOC_FREE(conv); errno = ENOMEM; @@ -2289,7 +2291,8 @@ static int snapper_gmt_chown(vfs_handle_struct *handle, conv_smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + smb_fname->flags); if (conv_smb_fname == NULL) { TALLOC_FREE(conv); errno = ENOMEM; @@ -2485,7 +2488,8 @@ static NTSTATUS snapper_gmt_fget_nt_acl(vfs_handle_struct *handle, smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + fsp->fsp_name->flags); TALLOC_FREE(conv); if (smb_fname == NULL) { return NT_STATUS_NO_MEMORY; @@ -2525,7 +2529,8 @@ static NTSTATUS snapper_gmt_get_nt_acl(vfs_handle_struct *handle, smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + fname->flags); TALLOC_FREE(conv); if (smb_fname == NULL) { return NT_STATUS_NO_MEMORY; @@ -2562,7 +2567,8 @@ static int snapper_gmt_mkdir(vfs_handle_struct *handle, smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + fname->flags); TALLOC_FREE(conv); if (smb_fname == NULL) { errno = ENOMEM; @@ -2600,7 +2606,8 @@ static int snapper_gmt_rmdir(vfs_handle_struct *handle, smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + fname->flags); TALLOC_FREE(conv); if (smb_fname == NULL) { errno = ENOMEM; @@ -2786,7 +2793,8 @@ static int snapper_gmt_chmod_acl(vfs_handle_struct *handle, conv_smb_fname = synthetic_smb_fname(talloc_tos(), conv, NULL, - NULL); + NULL, + smb_fname->flags); if (conv_smb_fname == NULL) { TALLOC_FREE(conv); errno = ENOMEM; diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c index 5a974445e31..2b80b9dcf7b 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -148,7 +148,8 @@ static char *stream_dir(vfs_handle_struct *handle, rootdir_fname = synthetic_smb_fname(talloc_tos(), rootdir, NULL, - NULL); + NULL, + smb_fname->flags); if (rootdir_fname == NULL) { errno = ENOMEM; goto fail; @@ -159,7 +160,11 @@ static char *stream_dir(vfs_handle_struct *handle, struct smb_filename *smb_fname_base; smb_fname_base = synthetic_smb_fname( - talloc_tos(), smb_fname->base_name, NULL, NULL); + talloc_tos(), + smb_fname->base_name, + NULL, + NULL, + smb_fname->flags); if (smb_fname_base == NULL) { errno = ENOMEM; goto fail; @@ -200,7 +205,11 @@ static char *stream_dir(vfs_handle_struct *handle, return NULL; } - smb_fname_hash = synthetic_smb_fname(talloc_tos(), result, NULL, NULL); + smb_fname_hash = synthetic_smb_fname(talloc_tos(), + result, + NULL, + NULL, + smb_fname->flags); if (smb_fname_hash == NULL) { errno = ENOMEM; goto fail; @@ -251,7 +260,11 @@ static char *stream_dir(vfs_handle_struct *handle, } smb_fname_new = synthetic_smb_fname( - talloc_tos(), newname, NULL, NULL); + talloc_tos(), + newname, + NULL, + NULL, + smb_fname->flags); TALLOC_FREE(newname); if (smb_fname_new == NULL) { errno = ENOMEM; @@ -287,7 +300,11 @@ static char *stream_dir(vfs_handle_struct *handle, goto fail; } - tmp_fname = synthetic_smb_fname(talloc_tos(), tmp, NULL, NULL); + tmp_fname = synthetic_smb_fname(talloc_tos(), + tmp, + NULL, + NULL, + smb_fname->flags); if (tmp_fname == NULL) { errno = ENOMEM; goto fail; @@ -308,7 +325,11 @@ static char *stream_dir(vfs_handle_struct *handle, goto fail; } - tmp_fname = synthetic_smb_fname(talloc_tos(), tmp, NULL, NULL); + tmp_fname = synthetic_smb_fname(talloc_tos(), + tmp, + NULL, + NULL, + smb_fname->flags); if (tmp_fname == NULL) { errno = ENOMEM; goto fail; @@ -403,8 +424,11 @@ static NTSTATUS stream_smb_fname(vfs_handle_struct *handle, DEBUG(10, ("stream filename = %s\n", stream_fname)); /* Create an smb_filename with stream_name == NULL. */ - *smb_fname_out = synthetic_smb_fname( - talloc_tos(), stream_fname, NULL, NULL); + *smb_fname_out = synthetic_smb_fname(talloc_tos(), + stream_fname, + NULL, + NULL, + smb_fname->flags); if (*smb_fname_out == NULL) { return NT_STATUS_NO_MEMORY; } @@ -449,7 +473,8 @@ static NTSTATUS walk_streams(vfs_handle_struct *handle, dir_smb_fname = synthetic_smb_fname(talloc_tos(), dirname, NULL, - NULL); + NULL, + smb_fname_base->flags); if (dir_smb_fname == NULL) { TALLOC_FREE(dirname); return NT_STATUS_NO_MEMORY; @@ -615,8 +640,11 @@ static int streams_depot_open(vfs_handle_struct *handle, } /* Ensure the base file still exists. */ - smb_fname_base = synthetic_smb_fname( - talloc_tos(), smb_fname->base_name, NULL, NULL); + smb_fname_base = synthetic_smb_fname(talloc_tos(), + smb_fname->base_name, + NULL, + NULL, + smb_fname->flags); if (smb_fname_base == NULL) { ret = -1; errno = ENOMEM; @@ -676,8 +704,11 @@ static int streams_depot_unlink(vfs_handle_struct *handle, * We potentially need to delete the per-inode streams directory */ - smb_fname_base = synthetic_smb_fname( - talloc_tos(), smb_fname->base_name, NULL, NULL); + smb_fname_base = synthetic_smb_fname(talloc_tos(), + smb_fname->base_name, + NULL, + NULL, + smb_fname->flags); if (smb_fname_base == NULL) { errno = ENOMEM; return -1; @@ -704,7 +735,8 @@ static int streams_depot_unlink(vfs_handle_struct *handle, synthetic_smb_fname(talloc_tos(), dirname, NULL, - NULL); + NULL, + smb_fname->flags); if (smb_fname_dir == NULL) { TALLOC_FREE(smb_fname_base); TALLOC_FREE(dirname); @@ -737,7 +769,8 @@ static int streams_depot_rmdir(vfs_handle_struct *handle, smb_fname_base = synthetic_smb_fname(talloc_tos(), smb_fname->base_name, NULL, - NULL); + NULL, + smb_fname->flags); if (smb_fname_base == NULL) { errno = ENOMEM; return -1; @@ -764,7 +797,8 @@ static int streams_depot_rmdir(vfs_handle_struct *handle, synthetic_smb_fname(talloc_tos(), dirname, NULL, - NULL); + NULL, + smb_fname->flags); if (smb_fname_dir == NULL) { TALLOC_FREE(smb_fname_base); TALLOC_FREE(dirname); @@ -884,7 +918,7 @@ static bool collect_one_stream(const char *dirname, goto out; } - smb_fname = synthetic_smb_fname(talloc_tos(), sname, NULL, NULL); + smb_fname = synthetic_smb_fname(talloc_tos(), sname, NULL, NULL, 0); if (smb_fname == NULL) { state->status = NT_STATUS_NO_MEMORY; ret = false; @@ -930,7 +964,8 @@ static NTSTATUS streams_depot_streaminfo(vfs_handle_struct *handle, smb_fname_base = synthetic_smb_fname(talloc_tos(), smb_fname->base_name, NULL, - NULL); + NULL, + smb_fname->flags); if (smb_fname_base == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index 0d547346b14..b3b800264fb 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -242,8 +242,11 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, files_struct *fsp, } /* Create an smb_filename with stream_name == NULL. */ - smb_fname_base = synthetic_smb_fname(talloc_tos(), io->base, - NULL, NULL); + smb_fname_base = synthetic_smb_fname(talloc_tos(), + io->base, + NULL, + NULL, + fsp->fsp_name->flags); if (smb_fname_base == NULL) { errno = ENOMEM; return -1; @@ -427,8 +430,11 @@ static int streams_xattr_open(vfs_handle_struct *handle, } /* Create an smb_filename with stream_name == NULL. */ - smb_fname_base = synthetic_smb_fname( - talloc_tos(), smb_fname->base_name, NULL, NULL); + smb_fname_base = synthetic_smb_fname(talloc_tos(), + smb_fname->base_name, + NULL, + NULL, + smb_fname->flags); if (smb_fname_base == NULL) { errno = ENOMEM; goto fail; diff --git a/source3/modules/vfs_unityed_media.c b/source3/modules/vfs_unityed_media.c index 4bbb8fb3a23..3b3493d013f 100644 --- a/source3/modules/vfs_unityed_media.c +++ b/source3/modules/vfs_unityed_media.c @@ -571,7 +571,8 @@ static DIR *um_opendir(vfs_handle_struct *handle, synthetic_smb_fname(talloc_tos(), dirInfo->clientPath, NULL, - NULL); + NULL, + smb_fname->flags); if (client_smb_fname == NULL) { goto err; } @@ -1561,7 +1562,8 @@ static NTSTATUS um_get_nt_acl(vfs_handle_struct *handle, client_smb_fname = synthetic_smb_fname(talloc_tos(), client_path, NULL, - NULL); + NULL, + smb_fname->flags); if (client_smb_fname == NULL) { TALLOC_FREE(client_path); return NT_STATUS_NO_MEMORY; diff --git a/source3/modules/vfs_vxfs.c b/source3/modules/vfs_vxfs.c index 4bfbef3530b..bcd7ae3a91f 100644 --- a/source3/modules/vfs_vxfs.c +++ b/source3/modules/vfs_vxfs.c @@ -421,7 +421,7 @@ static bool vxfs_compare(connection_struct *conn, char *name, SMB_ACL_T the_acl, goto out; } - smb_fname = synthetic_smb_fname(mem_ctx, name, NULL, NULL); + smb_fname = synthetic_smb_fname(mem_ctx, name, NULL, NULL, 0); if (smb_fname == NULL) { DEBUG(10, ("vfs_vxfs: Failed to create smb_fname\n")); goto out; diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c index a22192bcdf0..aac824523b9 100644 --- a/source3/modules/vfs_xattr_tdb.c +++ b/source3/modules/vfs_xattr_tdb.c @@ -37,7 +37,7 @@ static int xattr_tdb_get_file_id(struct vfs_handle_struct *handle, TALLOC_CTX *frame = talloc_stackframe(); struct smb_filename *smb_fname; - smb_fname = synthetic_smb_fname(frame, path, NULL, NULL); + smb_fname = synthetic_smb_fname(frame, path, NULL, NULL, 0); if (smb_fname == NULL) { TALLOC_FREE(frame); errno = ENOMEM; |