summaryrefslogtreecommitdiffstats
path: root/source4/smb_server/sesssetup.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-10-25 04:19:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:38 -0500
commite5fc6dd0bb460017f6678202afc1b73acb58af09 (patch)
tree5951f48f22b888abf90e3467a32142c3f05d40e8 /source4/smb_server/sesssetup.c
parentf7c6a9438dba17032aea102d18b44c6d96ae470b (diff)
downloadsamba-e5fc6dd0bb460017f6678202afc1b73acb58af09.tar.gz
samba-e5fc6dd0bb460017f6678202afc1b73acb58af09.tar.xz
samba-e5fc6dd0bb460017f6678202afc1b73acb58af09.zip
r3186: Use the properties of the new talloc() system to handle the auth
session info and server info structures. Andrew Bartlett (This used to be commit 5bdf391b3bc10291739f5640be9a404dbbeda273)
Diffstat (limited to 'source4/smb_server/sesssetup.c')
-rw-r--r--source4/smb_server/sesssetup.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/smb_server/sesssetup.c b/source4/smb_server/sesssetup.c
index 7b4c217b8f..03a750e070 100644
--- a/source4/smb_server/sesssetup.c
+++ b/source4/smb_server/sesssetup.c
@@ -74,7 +74,8 @@ static NTSTATUS sesssetup_old(struct smbsrv_request *req, union smb_sesssetup *s
return nt_status_squash(status);
}
- status = make_session_info(server_info, &session_info);
+ /* This references server_info into session_info */
+ status = make_session_info(req, server_info, &session_info);
if (!NT_STATUS_IS_OK(status)) {
return nt_status_squash(status);
}
@@ -157,12 +158,12 @@ static NTSTATUS sesssetup_nt1(struct smbsrv_request *req, union smb_sesssetup *s
return nt_status_squash(status);
}
- status = make_session_info(server_info, &session_info);
+ /* This references server_info into session_info */
+ status = make_session_info(req, server_info, &session_info);
if (!NT_STATUS_IS_OK(status)) {
return nt_status_squash(status);
}
-
- talloc_steal(session_info, server_info);
+ talloc_free(server_info);
sess->nt1.out.action = 0;
sess->nt1.out.vuid = smbsrv_register_session(req->smb_conn, session_info, NULL);
@@ -238,7 +239,8 @@ static NTSTATUS sesssetup_spnego(struct smbsrv_request *req, union smb_sesssetup
}
if (!smb_sess) {
- vuid = smbsrv_register_session(req->smb_conn, session_info, gensec_ctx);
+ vuid = smbsrv_register_session(req->smb_conn,
+ session_info, gensec_ctx);
if (vuid == UID_FIELD_INVALID) {
return NT_STATUS_ACCESS_DENIED;
}