1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

s3: smbd: Allow openat_pathref_dirfsp_nosymlink() to return NT_STATUS_PATH_NOT_COVERED for a DFS link on a DFS share.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15144

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison 2022-08-08 11:31:39 -07:00
parent a92f4f7af0
commit b5f6809593

View File

@ -856,6 +856,18 @@ next:
*unparsed = len - parsed;
}
}
/*
* If we're on an MSDFS share, see if this is
* an MSDFS link.
*/
if (lp_host_msdfs() &&
lp_msdfs_root(SNUM(conn)) &&
(substitute != NULL) &&
strnequal(*substitute, "msdfs:", 6) &&
is_msdfs_link(dirfsp, &rel_fname))
{
status = NT_STATUS_PATH_NOT_COVERED;
}
} else {
DBG_DEBUG("readlink_talloc failed: %s\n",