diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-10-25 04:19:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:38 -0500 |
commit | e5fc6dd0bb460017f6678202afc1b73acb58af09 (patch) | |
tree | 5951f48f22b888abf90e3467a32142c3f05d40e8 /source4/smb_server/password.c | |
parent | f7c6a9438dba17032aea102d18b44c6d96ae470b (diff) | |
download | samba-e5fc6dd0bb460017f6678202afc1b73acb58af09.tar.gz samba-e5fc6dd0bb460017f6678202afc1b73acb58af09.tar.bz2 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/password.c')
-rw-r--r-- | source4/smb_server/password.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/smb_server/password.c b/source4/smb_server/password.c index c302f65980..d553d8612d 100644 --- a/source4/smb_server/password.c +++ b/source4/smb_server/password.c @@ -58,8 +58,6 @@ void smbsrv_invalidate_vuid(struct smbsrv_connection *smb_conn, uint16_t vuid) session_yield(sess); - free_session_info(&sess->session_info); - DLIST_REMOVE(smb_conn->sessions.session_list, sess); /* clear the vuid from the 'cache' on each connection, and @@ -135,8 +133,13 @@ uint16_t smbsrv_register_session(struct smbsrv_connection *smb_conn, smb_conn->sessions.num_validated_vuids++; /* use this to keep tabs on all our info from the authentication */ - sess->session_info = session_info; - sess->gensec_ctx = gensec_ctx; + if (session_info) { + sess->session_info = talloc_reference(sess, session_info); + } + + if (gensec_ctx) { + sess->gensec_ctx = talloc_reference(sess, gensec_ctx); + } sess->smb_conn = smb_conn; DLIST_ADD(smb_conn->sessions.session_list, sess); |