auth/kerberos: Use KRB5_PRINCIPAL_UNPARSE_DISPLAY in kerberos_create_pac()
authorAndrew Bartlett <abartlet@samba.org>
Wed, 11 Mar 2015 22:27:57 +0000 (11:27 +1300)
committerGünther Deschner <gd@samba.org>
Thu, 12 Mar 2015 16:13:42 +0000 (17:13 +0100)
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 <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source4/auth/kerberos/kerberos_pac.c

index 5d65461575d0c64d635a04e9e5aeb0dff0f5db12..20cfe884dabc389002c22f3fe3f5e40b7fbee877 100644 (file)
        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;
        }