mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
s3: VFS: glusterfs: Fix vfs_gluster_mknodat() to cope with a real dirfsp.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
163a6802b6
commit
30af87f46f
@ -1900,11 +1900,23 @@ static int vfs_gluster_mknodat(struct vfs_handle_struct *handle,
|
||||
mode_t mode,
|
||||
SMB_DEV_T dev)
|
||||
{
|
||||
struct smb_filename *full_fname = NULL;
|
||||
int ret;
|
||||
|
||||
START_PROFILE(syscall_mknodat);
|
||||
SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);
|
||||
ret = glfs_mknod(handle->data, smb_fname->base_name, mode, dev);
|
||||
|
||||
full_fname = full_path_from_dirfsp_atname(talloc_tos(),
|
||||
dirfsp,
|
||||
smb_fname);
|
||||
if (full_fname == NULL) {
|
||||
END_PROFILE(syscall_mknodat);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = glfs_mknod(handle->data, full_fname->base_name, mode, dev);
|
||||
|
||||
TALLOC_FREE(full_fname);
|
||||
|
||||
END_PROFILE(syscall_mknodat);
|
||||
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user