summaryrefslogtreecommitdiff
path: root/source3/smbd/password.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-07-14 14:39:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:06 -0500
commitdae78e57e2341e519a2bb609d827968ac93a2499 (patch)
tree0f32b0448015f7ab2599ae7f32f23b2c8f5d0e38 /source3/smbd/password.c
parent0d8ef1cec4134521dc507bd27f256ed93084818c (diff)
downloadsamba-dae78e57e2341e519a2bb609d827968ac93a2499.tar.gz
samba-dae78e57e2341e519a2bb609d827968ac93a2499.tar.bz2
samba-dae78e57e2341e519a2bb609d827968ac93a2499.zip
r8472: abartlet's patch for parallel ntlmssp supporttrunk/source/smbd/sesssetup.c
(This used to be commit aab17a7095a18b243a271f8f3f824facd6932f23)
Diffstat (limited to 'source3/smbd/password.c')
-rw-r--r--source3/smbd/password.c37
1 files changed, 36 insertions, 1 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 2ee8c1232e..9ee721089c 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -47,7 +47,31 @@ user_struct *get_valid_user_struct(uint16 vuid)
return NULL;
for (usp=validated_users;usp;usp=usp->next,count++) {
- if (vuid == usp->vuid) {
+ if (vuid == usp->vuid && usp->server_info) {
+ if (count > 10) {
+ DLIST_PROMOTE(validated_users, usp);
+ }
+ return usp;
+ }
+ }
+
+ return NULL;
+}
+
+/****************************************************************************
+ Get the user struct of a partial NTLMSSP login
+****************************************************************************/
+
+user_struct *get_partial_auth_user_struct(uint16 vuid)
+{
+ user_struct *usp;
+ int count=0;
+
+ if (vuid == UID_FIELD_INVALID)
+ return NULL;
+
+ for (usp=validated_users;usp;usp=usp->next,count++) {
+ if (vuid == usp->vuid && !usp->server_info) {
if (count > 10) {
DLIST_PROMOTE(validated_users, usp);
}
@@ -159,6 +183,17 @@ int register_vuid(auth_serversupplied_info *server_info, DATA_BLOB session_key,
vuser->vuid = next_vuid;
+ if (!server_info) {
+ next_vuid++;
+ num_validated_vuids++;
+
+ vuser->server_info = NULL;
+
+ DLIST_ADD(validated_users, vuser);
+
+ return vuser->vuid;
+ }
+
/* the next functions should be done by a SID mapping system (SMS) as
* the new real sam db won't have reference to unix uids or gids
*/