From 7f5740f34226301e2172c7e2024fd8c6c4ededf5 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 12 Mar 2015 13:29:56 +1300 Subject: [PATCH] kdc: Ensure we cope with a samAccountName with a space in it Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher Reviewed-by: Guenther Deschner --- source4/kdc/db-glue.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c index 0bc907ef609..8f2b361b571 100644 --- a/source4/kdc/db-glue.c +++ b/source4/kdc/db-glue.c @@ -1601,7 +1601,10 @@ static krb5_error_code samba_kdc_lookup_server(krb5_context context, /* TODO: Check if it is our realm, otherwise give referral */ - ret = krb5_unparse_name_flags(context, principal, KRB5_PRINCIPAL_UNPARSE_NO_REALM, &short_princ); + ret = krb5_unparse_name_flags(context, principal, + KRB5_PRINCIPAL_UNPARSE_NO_REALM | + KRB5_PRINCIPAL_UNPARSE_DISPLAY, + &short_princ); if (ret != 0) { krb5_set_error_message(context, ret, "samba_kdc_lookup_principal: could not parse principal"); -- 2.11.4.GIT