diff options
author | Jeremy Allison <jra@samba.org> | 2019-09-13 12:25:10 -0700 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2019-09-26 17:20:48 +0000 |
commit | f8cff71e5f9edb97a3817bc259c0aeec6fbdba7f (patch) | |
tree | c5c0495ad8aa799fe73aaea1699c3db99b6ded0b /source3/smbd | |
parent | 7f7ad9bbfd65f813f59b55e043c9e75859cb71e9 (diff) | |
download | samba-f8cff71e5f9edb97a3817bc259c0aeec6fbdba7f.tar.gz |
s3: smbd: Change close_remove_share_mode() to call SMB_VFS_UNLINKAT().
Use conn->cwd_fsp as current fsp. Rework to modern standards.
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/close.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c index a9d570a36d4..c441f4eb5bc 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -303,6 +303,7 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, const struct security_token *del_nt_token = NULL; bool got_tokens = false; bool normal_close; + int ret; /* Ensure any pending write time updates are done. */ if (fsp->update_write_time_event) { @@ -483,7 +484,11 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, } - if (SMB_VFS_UNLINK(conn, fsp->fsp_name) != 0) { + ret = SMB_VFS_UNLINKAT(conn, + conn->cwd_fsp, + fsp->fsp_name, + 0); + if (ret != 0) { /* * This call can potentially fail as another smbd may * have had the file open with delete on close set and |