r26268: Avoid more use of global_loadparm - put lp_ctx in smb_server and wbsrv_connec...
[kai/samba-autobuild/.git] / source4 / smb_server / smb / sesssetup.c
index 57e2f28b8afa4e671c60bc1ca5b3dc764526dcd6..de2141b8086d2595f42f9c8a8826939e3cf4837e 100644 (file)
@@ -40,7 +40,8 @@ static void sesssetup_common_strings(struct smbsrv_request *req,
 {
        (*os) = talloc_asprintf(req, "Unix");
        (*lanman) = talloc_asprintf(req, "Samba %s", SAMBA_VERSION_STRING);
-       (*domain) = talloc_asprintf(req, "%s", lp_workgroup(global_loadparm));
+       (*domain) = talloc_asprintf(req, "%s", 
+                                   lp_workgroup(req->smb_conn->lp_ctx));
 }
 
 static void smbsrv_sesssetup_backend_send(struct smbsrv_request *req,
@@ -69,7 +70,8 @@ static void sesssetup_old_send(struct auth_check_password_request *areq,
        if (!NT_STATUS_IS_OK(status)) goto failed;
 
        /* This references server_info into session_info */
-       status = auth_generate_session_info(req, server_info, &session_info);
+       status = auth_generate_session_info(req, req->smb_conn->lp_ctx, 
+                                           server_info, &session_info);
        if (!NT_STATUS_IS_OK(status)) goto failed;
 
        /* allocate a new session */
@@ -164,7 +166,8 @@ static void sesssetup_nt1_send(struct auth_check_password_request *areq,
        if (!NT_STATUS_IS_OK(status)) goto failed;
 
        /* This references server_info into session_info */
-       status = auth_generate_session_info(req, server_info, &session_info);
+       status = auth_generate_session_info(req, req->smb_conn->lp_ctx, 
+                                           server_info, &session_info);
        if (!NT_STATUS_IS_OK(status)) goto failed;
 
        /* allocate a new session */
@@ -246,6 +249,7 @@ static void sesssetup_nt1(struct smbsrv_request *req, union smb_sesssetup *sess)
                status = auth_context_create(req, 
                                             req->smb_conn->connection->event.ctx,
                                             req->smb_conn->connection->msg_ctx,
+                                            req->smb_conn->lp_ctx,
                                             &auth_context);
                if (!NT_STATUS_IS_OK(status)) goto failed;
        } else {
@@ -379,6 +383,7 @@ static void sesssetup_spnego(struct smbsrv_request *req, union smb_sesssetup *se
 
                status = gensec_server_start(req,
                                             req->smb_conn->connection->event.ctx,
+                                            req->smb_conn->lp_ctx,
                                             req->smb_conn->connection->msg_ctx,
                                             &gensec_ctx);
                if (!NT_STATUS_IS_OK(status)) {