s3-smbd provide struct smbd_server_connection * to conn_snum_used
[nivanova/samba-autobuild/.git] / source3 / rpc_server / dfs / srv_dfs_nt.c
index 01ecf792b36ff03439da73797fd74d9dcb7d0406..6ca35a5dcc97023071956c5df8098f2b0eee564d 100644 (file)
 /* This is the implementation of the dfs pipe. */
 
 #include "includes.h"
+#include "ntdomain.h"
 #include "../librpc/gen_ndr/srv_dfs.h"
+#include "msdfs.h"
+#include "smbd/smbd.h"
+#include "smbd/globals.h"
+#include "auth.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_MSDFS
@@ -274,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;