smbd: pass session info to count_dfs_links()
authorRalph Boehme <slow@samba.org>
Fri, 13 Dec 2019 15:51:16 +0000 (16:51 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 20 Dec 2019 11:41:40 +0000 (11:41 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/msdfs.c

index 2b7fe12e087ca02be6d80a7cd2500e59e57e58a0..e12e018c2c550a8b83278e0034c7575aa627514e 100644 (file)
@@ -1541,7 +1541,9 @@ bool remove_msdfs_link(const struct junction_map *jucn,
  Return the number of DFS links at the root of this share.
 *********************************************************************/
 
-static size_t count_dfs_links(TALLOC_CTX *ctx, int snum)
+static size_t count_dfs_links(TALLOC_CTX *ctx,
+                             struct auth_session_info *session_info,
+                             int snum)
 {
        TALLOC_CTX *frame = talloc_stackframe();
        const struct loadparm_substitution *lp_sub =
@@ -1814,7 +1816,7 @@ struct junction_map *enum_msdfs_links(TALLOC_CTX *ctx,
 
        for(i=0;i < sharecount;i++) {
                if(lp_msdfs_root(i)) {
-                       jn_count += count_dfs_links(ctx, i);
+                       jn_count += count_dfs_links(ctx, session_info, i);
                }
        }
        if (jn_count == 0) {