From: Jeremy Allison Date: Fri, 13 Sep 2019 18:17:45 +0000 (-0700) Subject: s3: smbd: Change create_msdfs_link() to call SMB_VFS_UNLINKAT(). X-Git-Tag: talloc-2.3.1~616 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66d86efb9a19285a09940f4f359c80dfd59cddd6;p=thirdparty%2Fsamba.git 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 Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index b438051c3fa..dabad072205 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -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; }