vfs_default: allow dirfsps in the link VFS functions
authorRalph Boehme <slow@samba.org>
Wed, 14 Oct 2020 13:34:55 +0000 (15:34 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 23 Oct 2020 07:56:32 +0000 (07:56 +0000)
The functions work just fine with real dirfsps.

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

index 904ee942c2aa3a9da12dc4c960a095c76a5aa3c8..7ea9b716e214feee83605016b17c8cdb8173f486 100644 (file)
@@ -2873,8 +2873,6 @@ static int vfswrap_symlinkat(vfs_handle_struct *handle,
 
        START_PROFILE(syscall_symlinkat);
 
-       SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);
-
        result = symlinkat(link_target->base_name,
                        dirfsp->fh->fd,
                        new_smb_fname->base_name);
@@ -2892,8 +2890,6 @@ static int vfswrap_readlinkat(vfs_handle_struct *handle,
 
        START_PROFILE(syscall_readlinkat);
 
-       SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);
-
        result = readlinkat(dirfsp->fh->fd,
                        smb_fname->base_name,
                        buf,
@@ -2914,9 +2910,6 @@ static int vfswrap_linkat(vfs_handle_struct *handle,
 
        START_PROFILE(syscall_linkat);
 
-       SMB_ASSERT(srcfsp == srcfsp->conn->cwd_fsp);
-       SMB_ASSERT(dstfsp == dstfsp->conn->cwd_fsp);
-
        result = linkat(srcfsp->fh->fd,
                        old_smb_fname->base_name,
                        dstfsp->fh->fd,
@@ -2937,8 +2930,6 @@ static int vfswrap_mknodat(vfs_handle_struct *handle,
 
        START_PROFILE(syscall_mknodat);
 
-       SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);
-
        result = sys_mknodat(dirfsp->fh->fd,
                        smb_fname->base_name,
                        mode,