summaryrefslogtreecommitdiff
path: root/source4/smb_server/password.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-05-02 08:45:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:42 -0500
commit9f084101dd392ceb85f141f55ee56bed344626ef (patch)
tree2a9884d8e99e28b9dbfb153575e32c5b8bb9ef4c /source4/smb_server/password.c
parent585d87a9590ecf64681700d70c37e5276ee8514a (diff)
downloadsamba-9f084101dd392ceb85f141f55ee56bed344626ef.tar.gz
samba-9f084101dd392ceb85f141f55ee56bed344626ef.tar.bz2
samba-9f084101dd392ceb85f141f55ee56bed344626ef.zip
r443: Update Samba4 to the auth and NTLMSSP code from Samba3.
Not all the auth code is merged - only those parts that are actually being used in Samba4. There is a lot more work to do in the NTLMSSP area, and I hope to develop that work here. There is a start on this here - splitting NTLMSSP into two parts that my operate in an async fashion (before and after the actual authentication) Andrew Bartlett (This used to be commit 5876c78806e6a6c44613a1354e8d564b427d0c9f)
Diffstat (limited to 'source4/smb_server/password.c')
-rw-r--r--source4/smb_server/password.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/smb_server/password.c b/source4/smb_server/password.c
index 2811a14c21..196556819e 100644
--- a/source4/smb_server/password.c
+++ b/source4/smb_server/password.c
@@ -60,6 +60,8 @@ void invalidate_vuid(struct server_context *smb, uint16 vuid)
SAFE_FREE(vuser->unix_homedir);
SAFE_FREE(vuser->logon_script);
+ data_blob_free(&vuser->session_key);
+
session_yield(vuser);
free_server_info(&vuser->server_info);
@@ -95,6 +97,10 @@ void invalidate_all_vuids(struct server_context *smb)
* @param server_info The token returned from the authentication process.
* (now 'owned' by register_vuid)
*
+ * @param session_key The User session key for the login session (now also 'owned' by register_vuid)
+ *
+ * @param smb_name The untranslated name of the user
+ *
* @return Newly allocated vuid, biased by an offset. (This allows us to
* tell random client vuid's (normally zero) from valid vuids.)
*
@@ -102,6 +108,7 @@ void invalidate_all_vuids(struct server_context *smb)
int register_vuid(struct server_context *smb,
struct auth_serversupplied_info *server_info,
+ DATA_BLOB *session_key,
const char *smb_name)
{
user_struct *vuser = NULL;
@@ -184,7 +191,7 @@ int register_vuid(struct server_context *smb,
}
}
- memcpy(vuser->session_key, server_info->session_key, sizeof(vuser->session_key));
+ vuser->session_key = *session_key;
DEBUG(10,("register_vuid: (%u,%u) %s %s %s guest=%d\n",
(unsigned int)vuser->uid,