summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-03 07:32:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:35 -0500
commitc4bf8c5b2ce09cbc54b7d013c345f4ef920e958e (patch)
tree089498b5be5711732128a111a74dc5da4c7b1ce0
parentc5722fb81b14bf067c4c97eda2ee01f1640084f7 (diff)
downloadsamba-c4bf8c5b2ce09cbc54b7d013c345f4ef920e958e.tar.gz
samba-c4bf8c5b2ce09cbc54b7d013c345f4ef920e958e.tar.bz2
samba-c4bf8c5b2ce09cbc54b7d013c345f4ef920e958e.zip
r2797: don't free the server_info before using it for anonymous connections
(This used to be commit 5f5b04196c7930c91e6c00e0276f25f88181b317)
-rw-r--r--source4/smb_server/sesssetup.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/smb_server/sesssetup.c b/source4/smb_server/sesssetup.c
index 01d170aec7..7b4c217b8f 100644
--- a/source4/smb_server/sesssetup.c
+++ b/source4/smb_server/sesssetup.c
@@ -128,9 +128,6 @@ static NTSTATUS sesssetup_nt1(struct smbsrv_request *req, union smb_sesssetup *s
status = auth_context->check_ntlm_password(auth_context,
user_info,
&server_info);
-
- free_auth_context(&auth_context);
-
} else {
TALLOC_CTX *mem_ctx = talloc_init("NT1 session setup");
char *remote_machine;
@@ -165,6 +162,8 @@ static NTSTATUS sesssetup_nt1(struct smbsrv_request *req, union smb_sesssetup *s
return nt_status_squash(status);
}
+ talloc_steal(session_info, server_info);
+
sess->nt1.out.action = 0;
sess->nt1.out.vuid = smbsrv_register_session(req->smb_conn, session_info, NULL);
if (sess->nt1.out.vuid == UID_FIELD_INVALID) {