summaryrefslogtreecommitdiff
path: root/source4/auth/ntlm
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-01-30 21:49:33 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-02-13 01:25:59 +0100
commitcaf485a2bd0453b7d22600f9106a2026b1a50c79 (patch)
tree23f5b05f738a6ebd565c7b49ffe91356dd7fff4a /source4/auth/ntlm
parent05f9495ff36c2335ff9c69ea408cd9328f6cc6e6 (diff)
downloadsamba-caf485a2bd0453b7d22600f9106a2026b1a50c79.tar.gz
samba-caf485a2bd0453b7d22600f9106a2026b1a50c79.tar.bz2
samba-caf485a2bd0453b7d22600f9106a2026b1a50c79.zip
auth: Pass in the SMB username (for %U) into generate_session_info
This matches what Samba3 does. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Feb 13 01:25:59 CET 2012 on sn-devel-104
Diffstat (limited to 'source4/auth/ntlm')
-rw-r--r--source4/auth/ntlm/auth.c8
-rw-r--r--source4/auth/ntlm/auth_simple.c1
2 files changed, 7 insertions, 2 deletions
diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c
index 6dd82e4ae8..fdfdb635f9 100644
--- a/source4/auth/ntlm/auth.c
+++ b/source4/auth/ntlm/auth.c
@@ -36,7 +36,8 @@
static NTSTATUS auth_generate_session_info_wrapper(TALLOC_CTX *mem_ctx,
struct auth4_context *auth_context,
void *server_returned_info,
- uint32_t session_info_flags,
+ const char *original_user_name,
+ uint32_t session_info_flags,
struct auth_session_info **session_info);
/***************************************************************************
@@ -140,6 +141,7 @@ static NTSTATUS auth_generate_session_info_principal(struct auth4_context *auth_
nt_status = auth_generate_session_info_wrapper(mem_ctx, auth_ctx,
user_info_dc,
+ user_info_dc->info->account_name,
session_info_flags, session_info);
talloc_free(user_info_dc);
@@ -466,6 +468,7 @@ _PUBLIC_ NTSTATUS auth_check_password_recv(struct tevent_req *req,
static NTSTATUS auth_generate_session_info_wrapper(TALLOC_CTX *mem_ctx,
struct auth4_context *auth_context,
void *server_returned_info,
+ const char *original_user_name,
uint32_t session_info_flags,
struct auth_session_info **session_info)
{
@@ -494,7 +497,7 @@ static NTSTATUS auth_generate_session_info_wrapper(TALLOC_CTX *mem_ctx,
return NT_STATUS_INVALID_SERVER_STATE;
}
status = auth_session_info_fill_unix(wbc_ctx, auth_context->lp_ctx,
- *session_info);
+ original_user_name, *session_info);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(*session_info);
}
@@ -542,6 +545,7 @@ static NTSTATUS auth_generate_session_info_pac(struct auth4_context *auth_ctx,
status = auth_generate_session_info_wrapper(mem_ctx, auth_ctx,
user_info_dc,
+ user_info_dc->info->account_name,
session_info_flags, session_info);
talloc_free(tmp_ctx);
return status;
diff --git a/source4/auth/ntlm/auth_simple.c b/source4/auth/ntlm/auth_simple.c
index 241906e281..2e69991926 100644
--- a/source4/auth/ntlm/auth_simple.c
+++ b/source4/auth/ntlm/auth_simple.c
@@ -96,6 +96,7 @@ _PUBLIC_ NTSTATUS authenticate_username_pw(TALLOC_CTX *mem_ctx,
}
nt_status = auth_context->generate_session_info(tmp_ctx, auth_context,
user_info_dc,
+ nt4_username,
flags,
session_info);