s3-smbd provide struct smbd_server_connection * to conn_snum_used
[nivanova/samba-autobuild/.git] / source3 / rpc_server / dfs / srv_dfs_nt.c
index 324af534c9bf3788085d59b9bdee86a2b7f21c2c..6ca35a5dcc97023071956c5df8098f2b0eee564d 100644 (file)
@@ -26,6 +26,7 @@
 #include "../librpc/gen_ndr/srv_dfs.h"
 #include "msdfs.h"
 #include "smbd/smbd.h"
+#include "smbd/globals.h"
 #include "auth.h"
 
 #undef DBGC_CLASS
@@ -278,7 +279,8 @@ WERROR _dfs_Enum(struct pipes_struct *p, struct dfs_Enum *r)
        size_t i;
        TALLOC_CTX *ctx = talloc_tos();
 
-       jn = enum_msdfs_links(ctx, &num_jn);
+       jn = enum_msdfs_links(msg_ctx_to_sconn(p->msg_ctx),
+                             ctx, &num_jn);
        if (!jn || num_jn == 0) {
                num_jn = 0;
                jn = NULL;