From bc8b580659d429690f6b54f17368526fc8c845e3 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 12 Mar 2015 11:27:57 +1300 Subject: [PATCH] auth/kerberos: Use KRB5_PRINCIPAL_UNPARSE_DISPLAY in kerberos_create_pac() This ensures that in the all-Samba PAC creation code, we do not escape a space character if present in the logon name. This matches what we do in the Heimdal code in the KDC. Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher Reviewed-by: Guenther Deschner --- source4/auth/kerberos/kerberos_pac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source4/auth/kerberos/kerberos_pac.c b/source4/auth/kerberos/kerberos_pac.c index 5d65461575d..20cfe884dab 100644 --- a/source4/auth/kerberos/kerberos_pac.c +++ b/source4/auth/kerberos/kerberos_pac.c @@ -251,7 +251,9 @@ LOGON_INFO->info3 = *sam3; ret = krb5_unparse_name_flags(context, client_principal, - KRB5_PRINCIPAL_UNPARSE_NO_REALM, &name); + KRB5_PRINCIPAL_UNPARSE_NO_REALM | + KRB5_PRINCIPAL_UNPARSE_DISPLAY, + &name); if (ret) { return ret; }