summaryrefslogtreecommitdiffstats
path: root/source/smbd/password.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/smbd/password.c')
-rw-r--r--source/smbd/password.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/smbd/password.c b/source/smbd/password.c
index 8d33c1deed1..73b0ebb4b32 100644
--- a/source/smbd/password.c
+++ b/source/smbd/password.c
@@ -155,10 +155,9 @@ int register_vuid(auth_serversupplied_info *server_info,
{
user_struct *vuser = NULL;
- /* Ensure no vuid gets registered in share level security. */
+ /* Paranoia check. */
if(lp_security() == SEC_SHARE) {
- data_blob_free(&session_key);
- return UID_FIELD_INVALID;
+ smb_panic("Tried to register uid in security=share\n");
}
/* Limit allowed vuids to 16bits - VUID_OFFSET. */
@@ -189,6 +188,11 @@ int register_vuid(auth_serversupplied_info *server_info,
vuser->vuid = next_vuid;
if (!server_info) {
+ /*
+ * This happens in an unfinished NTLMSSP session setup. We
+ * need to allocate a vuid between the first and second calls
+ * to NTLMSSP.
+ */
next_vuid++;
num_validated_vuids++;