From dc9f30b8b0ace8d6e2c8c0cbed537fde68d1556a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 6 May 2006 19:24:35 +0000 Subject: r15475: Ugly and disgusting patch to fix the username map problem I created by changing the token generation. I *hate* this code! Jerry, you have been looking at this as well, can you double-check that I did not screw it up? Thanks, Volker (This used to be commit 2765c4ff8d44c970db3e075b0a2412662f1936c6) --- source3/auth/auth_ntlmssp.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/auth/auth_ntlmssp.c') diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c index 1d3d17d60d..7607107548 100644 --- a/source3/auth/auth_ntlmssp.c +++ b/source3/auth/auth_ntlmssp.c @@ -80,6 +80,7 @@ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state, AUTH_NTLMSSP_STATE *auth_ntlmssp_state = ntlmssp_state->auth_context; auth_usersupplied_info *user_info = NULL; NTSTATUS nt_status; + BOOL username_was_mapped; /* the client has given us its machine name (which we otherwise would not get on port 445). we need to possibly reload smb.conf if smb.conf includes depend on the machine name */ @@ -110,12 +111,16 @@ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state, nt_status = auth_ntlmssp_state->auth_context->check_ntlm_password(auth_ntlmssp_state->auth_context, user_info, &auth_ntlmssp_state->server_info); + username_was_mapped = user_info->was_mapped; + free_user_info(&user_info); if (!NT_STATUS_IS_OK(nt_status)) { return nt_status; } + auth_ntlmssp_state->server_info->was_mapped |= username_was_mapped; + nt_status = create_local_token(auth_ntlmssp_state->server_info); if (!NT_STATUS_IS_OK(nt_status)) { -- cgit