diff options
author | Jeremy Allison <jra@samba.org> | 2019-09-13 11:33:53 -0700 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2019-09-26 17:20:48 +0000 |
commit | 24516e78eebbb30df09f85cdeacf6d1ad2635d32 (patch) | |
tree | b91fdd7a3215cbf8d3fae4315d582c24eda182b7 /source3/smbd | |
parent | 56b355d07959923381e60c3fc51136cc4703876f (diff) | |
download | samba-24516e78eebbb30df09f85cdeacf6d1ad2635d32.tar.gz |
s3: smbd: Change smb_set_file_unix_basic() to call SMB_VFS_UNLINKAT() in 3 places.
Use conn->cwd_fsp as current fsp. This is horrible code and must
be removed.
No logic change for now.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/trans2.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 7c1e020324b..bc4b3934c83 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -8164,7 +8164,10 @@ static NTSTATUS smb_set_file_unix_basic(connection_struct *conn, if (SMB_VFS_STAT(conn, smb_fname_tmp) != 0) { status = map_nt_error_from_unix(errno); TALLOC_FREE(smb_fname_tmp); - SMB_VFS_UNLINK(conn, smb_fname); + SMB_VFS_UNLINKAT(conn, + conn->cwd_fsp, + smb_fname, + 0); return status; } @@ -8241,7 +8244,10 @@ static NTSTATUS smb_set_file_unix_basic(connection_struct *conn, if (ret != 0) { status = map_nt_error_from_unix(errno); if (delete_on_fail) { - SMB_VFS_UNLINK(conn, smb_fname); + SMB_VFS_UNLINKAT(conn, + conn->cwd_fsp, + smb_fname, + 0); } return status; } @@ -8272,7 +8278,10 @@ static NTSTATUS smb_set_file_unix_basic(connection_struct *conn, if (ret != 0) { status = map_nt_error_from_unix(errno); if (delete_on_fail) { - SMB_VFS_UNLINK(conn, smb_fname); + SMB_VFS_UNLINKAT(conn, + conn->cwd_fsp, + smb_fname, + 0); } return status; } |