From: Jeremy Allison Date: Tue, 17 Jun 2014 05:54:45 +0000 (-0700) Subject: s3: auth: Change make_server_info_info3() to take a const struct netr_SamInfo3 pointe... X-Git-Tag: samba-4.1.20~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3d6a15ba18b20d21a531812ff6e670e6a717178;p=thirdparty%2Fsamba.git s3: auth: Change make_server_info_info3() to take a const struct netr_SamInfo3 pointer instead of a struct PAC_LOGON_INFO. make_server_info_info3() only reads from the info3 pointer. Signed-off-by: Jeremy Allison Reviewed-by: Richard Sharpe Reviewed-by: Simo Sorce (cherry picked from commit 527f7b54388713acaaf7b66c718cc0f7114fc368) --- diff --git a/source3/auth/auth_generic.c b/source3/auth/auth_generic.c index a2ba4e32573..2880bc9e019 100644 --- a/source3/auth/auth_generic.c +++ b/source3/auth/auth_generic.c @@ -112,7 +112,7 @@ static NTSTATUS auth3_generate_session_info_pac(struct auth4_context *auth_ctx, status = make_session_info_krb5(mem_ctx, ntuser, ntdomain, username, pw, - logon_info, is_guest, is_mapped, NULL /* No session key for now, caller will sort it out */, + &logon_info->info3, is_guest, is_mapped, NULL /* No session key for now, caller will sort it out */, session_info); if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("Failed to map kerberos pac to server info (%s)\n", diff --git a/source3/auth/proto.h b/source3/auth/proto.h index 6ec206ec81a..75d10973536 100644 --- a/source3/auth/proto.h +++ b/source3/auth/proto.h @@ -357,7 +357,7 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx, char *ntdomain, char *username, struct passwd *pw, - struct PAC_LOGON_INFO *logon_info, + const struct netr_SamInfo3 *info3, bool mapped_to_guest, bool username_was_mapped, DATA_BLOB *session_key, struct auth_session_info **session_info); diff --git a/source3/auth/user_krb5.c b/source3/auth/user_krb5.c index 974a8aa2f81..0a538b4a7ac 100644 --- a/source3/auth/user_krb5.c +++ b/source3/auth/user_krb5.c @@ -186,7 +186,7 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx, char *ntdomain, char *username, struct passwd *pw, - struct PAC_LOGON_INFO *logon_info, + const struct netr_SamInfo3 *info3, bool mapped_to_guest, bool username_was_mapped, DATA_BLOB *session_key, struct auth_session_info **session_info) @@ -202,14 +202,14 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx, return status; } - } else if (logon_info) { + } else if (info3) { /* pass the unmapped username here since map_username() will be called again in make_server_info_info3() */ status = make_server_info_info3(mem_ctx, ntuser, ntdomain, &server_info, - &logon_info->info3); + info3); if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("make_server_info_info3 failed: %s!\n", nt_errstr(status))); @@ -299,7 +299,7 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx, char *ntdomain, char *username, struct passwd *pw, - struct PAC_LOGON_INFO *logon_info, + const struct netr_SamInfo3 *info3, bool mapped_to_guest, bool username_was_mapped, DATA_BLOB *session_key, struct auth_session_info **session_info)