1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

s3: smbd: Change create_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>
This commit is contained in:
Jeremy Allison 2019-09-13 11:17:45 -07:00 committed by Ralph Boehme
parent 244c3820a8
commit 66d86efb9a

View File

@ -1419,7 +1419,11 @@ bool create_msdfs_link(const struct junction_map *jucn)
smb_fname);
if (retval < 0) {
if (errno == EEXIST) {
if(SMB_VFS_UNLINK(conn, smb_fname)!=0) {
retval = SMB_VFS_UNLINKAT(conn,
conn->cwd_fsp,
smb_fname,
0);
if (retval != 0) {
TALLOC_FREE(smb_fname);
goto out;
}