mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
VFS: unityed_media: Fix um_mkdirat() to correctly look at the full pathname.
Missed in the original mkdirat fixes. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
This commit is contained in:
parent
9884d17843
commit
83686ff1e1
@ -742,19 +742,10 @@ static int um_mkdirat(vfs_handle_struct *handle,
|
|||||||
mode_t mode)
|
mode_t mode)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
const char *path = smb_fname->base_name;
|
const char *path = NULL;
|
||||||
struct smb_filename *client_fname = NULL;
|
struct smb_filename *client_fname = NULL;
|
||||||
struct smb_filename *full_fname = NULL;
|
struct smb_filename *full_fname = NULL;
|
||||||
|
|
||||||
DEBUG(10, ("Entering with path '%s'\n", path));
|
|
||||||
|
|
||||||
if (!is_in_media_files(path) || !is_in_media_dir(path)) {
|
|
||||||
return SMB_VFS_NEXT_MKDIRAT(handle,
|
|
||||||
dirfsp,
|
|
||||||
smb_fname,
|
|
||||||
mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
full_fname = full_path_from_dirfsp_atname(talloc_tos(),
|
full_fname = full_path_from_dirfsp_atname(talloc_tos(),
|
||||||
dirfsp,
|
dirfsp,
|
||||||
smb_fname);
|
smb_fname);
|
||||||
@ -762,6 +753,17 @@ static int um_mkdirat(vfs_handle_struct *handle,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
path = full_fname->base_name;
|
||||||
|
DEBUG(10, ("Entering with path '%s'\n", path));
|
||||||
|
|
||||||
|
if (!is_in_media_files(path) || !is_in_media_dir(path)) {
|
||||||
|
TALLOC_FREE(full_fname);
|
||||||
|
return SMB_VFS_NEXT_MKDIRAT(handle,
|
||||||
|
dirfsp,
|
||||||
|
smb_fname,
|
||||||
|
mode);
|
||||||
|
}
|
||||||
|
|
||||||
status = alloc_get_client_smb_fname(handle,
|
status = alloc_get_client_smb_fname(handle,
|
||||||
talloc_tos(),
|
talloc_tos(),
|
||||||
full_fname,
|
full_fname,
|
||||||
@ -775,9 +777,9 @@ static int um_mkdirat(vfs_handle_struct *handle,
|
|||||||
client_fname,
|
client_fname,
|
||||||
mode);
|
mode);
|
||||||
err:
|
err:
|
||||||
|
DEBUG(10, ("Leaving with path '%s'\n", path));
|
||||||
TALLOC_FREE(client_fname);
|
TALLOC_FREE(client_fname);
|
||||||
TALLOC_FREE(full_fname);
|
TALLOC_FREE(full_fname);
|
||||||
DEBUG(10, ("Leaving with path '%s'\n", path));
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user