summaryrefslogtreecommitdiff
path: root/auth/auth_sam_reply.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2016-01-07 14:55:07 +0100
committerAndrew Bartlett <abartlet@samba.org>2016-07-22 23:34:22 +0200
commit8b1f5cad958a4022edc947b6abdb198ffad1a525 (patch)
tree76b5cd0fc76419c8810dd5c87715d217247a0517 /auth/auth_sam_reply.c
parent1854252816bf19b9afd104098e750d8495ad85b6 (diff)
downloadsamba-8b1f5cad958a4022edc947b6abdb198ffad1a525.tar.gz
auth/auth_sam_reply: fill user_principal_* and dns_domain_name in make_user_info_dc_pac()
This is required in order to support netr_SamInfo6 and PAC_UPN_DNS_INFO correctly. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'auth/auth_sam_reply.c')
-rw-r--r--auth/auth_sam_reply.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/auth/auth_sam_reply.c b/auth/auth_sam_reply.c
index 1929cd9d848..15d17b0745e 100644
--- a/auth/auth_sam_reply.c
+++ b/auth/auth_sam_reply.c
@@ -506,6 +506,7 @@ NTSTATUS make_user_info_dc_netlogon_validation(TALLOC_CTX *mem_ctx,
*/
NTSTATUS make_user_info_dc_pac(TALLOC_CTX *mem_ctx,
const struct PAC_LOGON_INFO *pac_logon_info,
+ const struct PAC_UPN_DNS_INFO *pac_upn_dns_info,
struct auth_user_info_dc **_user_info_dc)
{
uint32_t i;
@@ -574,6 +575,27 @@ NTSTATUS make_user_info_dc_pac(TALLOC_CTX *mem_ctx,
user_info_dc->num_sids++;
}
}
+
+ if (pac_upn_dns_info != NULL) {
+ user_info_dc->info->user_principal_name =
+ talloc_strdup(user_info_dc->info,
+ pac_upn_dns_info->upn_name);
+ if (user_info_dc->info->user_principal_name == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ user_info_dc->info->dns_domain_name =
+ talloc_strdup(user_info_dc->info,
+ pac_upn_dns_info->dns_domain_name);
+ if (user_info_dc->info->dns_domain_name == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ if (pac_upn_dns_info->flags & PAC_UPN_DNS_FLAG_CONSTRUCTED) {
+ user_info_dc->info->user_principal_constructed = true;
+ }
+ }
+
*_user_info_dc = user_info_dc;
return NT_STATUS_OK;
}