diff options
author | Jeremy Allison <jra@samba.org> | 2019-09-13 11:20:36 -0700 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2019-09-26 17:20:48 +0000 |
commit | 3d6a8d9ae0d55d92068c06651f6722b8158c25c8 (patch) | |
tree | cc2f068766a83218cd4d5b46770df2f36f35886b /source3/smbd | |
parent | 66d86efb9a19285a09940f4f359c80dfd59cddd6 (diff) | |
download | samba-3d6a8d9ae0d55d92068c06651f6722b8158c25c8.tar.gz |
s3: smbd: Change remove_msdfs_link() 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/msdfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index dabad072205..fe8553215a4 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -1455,6 +1455,7 @@ bool remove_msdfs_link(const struct junction_map *jucn) bool ret = False; struct smb_filename *smb_fname; bool ok; + int retval; ok = junction_to_local_path_tos(jucn, &path, &conn); if (!ok) { @@ -1473,7 +1474,11 @@ bool remove_msdfs_link(const struct junction_map *jucn) return false; } - if( SMB_VFS_UNLINK(conn, smb_fname) == 0 ) { + retval = SMB_VFS_UNLINKAT(conn, + conn->cwd_fsp, + smb_fname, + 0); + if (retval == 0) { ret = True; } |