summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2022-02-22 14:15:43 +1300
committerJule Anger <janger@samba.org>2022-03-02 10:26:30 +0000
commit635c8b730f7163dcb7e73d640948d91f88e70369 (patch)
tree6c9d58381781a0f827114e0c367c1b50c9c374ec /auth
parentb668c076722745c060ba7b1c5e4b2c9342452fe2 (diff)
downloadsamba-635c8b730f7163dcb7e73d640948d91f88e70369.tar.gz
auth: Cope with NULL upn_name in PAC
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14995 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit ef95fb439237910b945b8d6a3ad4a140a8d6d1ea)
Diffstat (limited to 'auth')
-rw-r--r--auth/auth_sam_reply.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/auth/auth_sam_reply.c b/auth/auth_sam_reply.c
index b5b6362dc93..fda014c87d5 100644
--- a/auth/auth_sam_reply.c
+++ b/auth/auth_sam_reply.c
@@ -616,11 +616,13 @@ NTSTATUS make_user_info_dc_pac(TALLOC_CTX *mem_ctx,
}
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;
+ if (pac_upn_dns_info->upn_name != 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 =