Revert "smbd: introduce sconn->sync_thread_pool"
[garming/samba-autobuild/.git] / source3 / smbd / msdfs.c
index bf9b3abee4a797a3c35c36b332c633447f2bf62d..5283edbecfcd8997378d31447899033a903993ee 100644 (file)
 #include "smbd/globals.h"
 #include "msdfs.h"
 #include "auth.h"
+#include "../auth/auth_util.h"
 #include "lib/param/loadparm.h"
 #include "libcli/security/security.h"
 #include "librpc/gen_ndr/ndr_dfsblobs.h"
 #include "lib/tsocket/tsocket.h"
-#include "lib/pthreadpool/pthreadpool_tevent.h"
 
 /**********************************************************************
  Parse a DFS pathname of the form \hostname\service\reqpath
@@ -252,7 +252,6 @@ static NTSTATUS create_conn_struct_as_root(TALLOC_CTX *ctx,
        const char *vfs_user;
        struct smbd_server_connection *sconn;
        const char *servicename = lp_const_servicename(snum);
-       int ret;
 
        sconn = talloc_zero(ctx, struct smbd_server_connection);
        if (sconn == NULL) {
@@ -276,16 +275,6 @@ static NTSTATUS create_conn_struct_as_root(TALLOC_CTX *ctx,
                return NT_STATUS_NO_MEMORY;
        }
 
-       /*
-        * We only provide sync threadpools.
-        */
-       ret = pthreadpool_tevent_init(sconn, 0, &sconn->sync_thread_pool);
-       if (ret != 0) {
-               TALLOC_FREE(sconn);
-               return NT_STATUS_NO_MEMORY;
-       }
-       sconn->raw_thread_pool = sconn->sync_thread_pool;
-
        sconn->msg_ctx = msg;
 
        conn = conn_new(sconn);
@@ -1150,7 +1139,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
                return NT_STATUS_OK;
        }
 
-       status = create_conn_struct_tos_cwd(server_messaging_context(),
+       status = create_conn_struct_tos_cwd(global_messaging_context(),
                                            snum,
                                            lp_path(frame, snum),
                                            NULL,
@@ -1364,7 +1353,7 @@ static bool junction_to_local_path_tos(const struct junction_map *jucn,
        if(snum < 0) {
                return False;
        }
-       status = create_conn_struct_tos_cwd(server_messaging_context(),
+       status = create_conn_struct_tos_cwd(global_messaging_context(),
                                            snum,
                                            lp_path(talloc_tos(), snum),
                                            NULL,
@@ -1534,7 +1523,7 @@ static int count_dfs_links(TALLOC_CTX *ctx, int snum)
         * Fake up a connection struct for the VFS layer.
         */
 
-       status = create_conn_struct_tos_cwd(server_messaging_context(),
+       status = create_conn_struct_tos_cwd(global_messaging_context(),
                                            snum,
                                            connect_path,
                                            NULL,
@@ -1631,7 +1620,7 @@ static int form_junctions(TALLOC_CTX *ctx,
         * Fake up a connection struct for the VFS layer.
         */
 
-       status = create_conn_struct_tos_cwd(server_messaging_context(),
+       status = create_conn_struct_tos_cwd(global_messaging_context(),
                                            snum,
                                            connect_path,
                                            NULL,