From 028c33e09ab52b55f33f83e26a12498f57918334 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 27 Jan 2020 16:31:52 -0800 Subject: [PATCH] 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 Reviewed-by: Ralph Boehme --- source3/smbd/msdfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index debc38a5307..8a682aad499 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -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)) {