The Samba-Bugzilla – Attachment 3836 Details for
Bug 5933
STATUS_INVALID_PARAMETER returned for all Session Setup AndX requests until smbd killed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
5933.diff (text/plain), 1.83 KB, created by
Volker Lendecke
on 2008-12-29 15:22:48 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2008-12-29 15:22:48 UTC
Size:
1.83 KB
patch
obsolete
>diff --git a/source/smbd/password.c b/source/smbd/password.c >index 80eba56..c19df0c 100644 >--- a/source/smbd/password.c >+++ b/source/smbd/password.c >@@ -27,7 +27,7 @@ static char *session_workgroup = NULL; > > /* this holds info on user ids that are already validated for this VC */ > static user_struct *validated_users; >-static int next_vuid = VUID_OFFSET; >+static uint16_t next_vuid = VUID_OFFSET; > static int num_validated_vuids; > > enum server_allocated_state { SERVER_ALLOCATED_REQUIRED_YES, >@@ -149,6 +149,16 @@ void invalidate_all_vuids(void) > } > } > >+static void increment_next_vuid(uint16_t *vuid) >+{ >+ *vuid += 1; >+ >+ /* Check for vuid wrap. */ >+ if (*vuid == UID_FIELD_INVALID) { >+ *vuid = VUID_OFFSET; >+ } >+} >+ > /**************************************************** > Create a new partial auth user struct. > *****************************************************/ >@@ -177,11 +187,8 @@ int register_initial_vuid(void) > /* Allocate a free vuid. Yes this is a linear search... */ > while( get_valid_user_struct_internal(next_vuid, > SERVER_ALLOCATED_REQUIRED_ANY) != NULL ) { >+ increment_next_vuid(&next_vuid); > next_vuid++; >- /* Check for vuid wrap. */ >- if (next_vuid == UID_FIELD_INVALID) { >- next_vuid = VUID_OFFSET; >- } > } > > DEBUG(10,("register_initial_vuid: allocated vuid = %u\n", >@@ -194,7 +201,7 @@ int register_initial_vuid(void) > * need to allocate a vuid between the first and second calls > * to NTLMSSP. > */ >- next_vuid++; >+ increment_next_vuid(&next_vuid); > num_validated_vuids++; > > DLIST_ADD(validated_users, vuser); >@@ -325,9 +332,6 @@ int register_existing_vuid(uint16 vuid, > "and will be vuid %u\n", > (int)vuser->uid,vuser->user.unix_name, vuser->vuid)); > >- next_vuid++; >- num_validated_vuids++; >- > if (!session_claim(vuser)) { > DEBUG(1, ("register_existing_vuid: Failed to claim session " > "for vuid=%d\n",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 5933
:
3770
|
3771
|
3772
|
3836
|
3837