1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

s3: smbd: dfs: Move lp_msdfs_shuffle_referrals() call out of parse_msdfs_symlink().

Removes dependency on snum for what is text parsing code.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison 2020-01-27 16:31:52 -08:00 committed by Ralph Boehme
parent d22b0d9072
commit 028c33e09a

View File

@ -524,7 +524,7 @@ static void shuffle_strlist(char **list, int count)
**********************************************************************/
static bool parse_msdfs_symlink(TALLOC_CTX *ctx,
int snum,
bool shuffle_referrals,
const char *target,
struct referral **preflist,
size_t *refcount)
@ -558,7 +558,7 @@ static bool parse_msdfs_symlink(TALLOC_CTX *ctx,
}
/* shuffle alternate paths */
if (lp_msdfs_shuffle_referrals(snum)) {
if (shuffle_referrals) {
shuffle_strlist(alt_path, count);
}
@ -1100,7 +1100,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
}
if (!parse_msdfs_symlink(ctx,
snum,
lp_msdfs_shuffle_referrals(snum),
tmp,
&ref,
&refcount)) {
@ -1175,7 +1175,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
/* We know this is a valid dfs link. Parse the targetpath. */
if (!parse_msdfs_symlink(ctx,
snum,
lp_msdfs_shuffle_referrals(snum),
targetpath,
&jucn->referral_list,
&jucn->referral_count)) {
@ -1770,7 +1770,7 @@ static int form_junctions(TALLOC_CTX *ctx,
conn,
smb_dname, &link_target)) {
if (parse_msdfs_symlink(ctx,
snum,
lp_msdfs_shuffle_referrals(snum),
link_target,
&jucn[cnt].referral_list,
&jucn[cnt].referral_count)) {