From: Stefan Metzmacher Date: Sun, 11 Jun 2017 21:19:01 +0000 (+0200) Subject: krb5_wrap: handle KRB5_ERR_HOST_REALM_UNKNOWN in smb_krb5_get_realm_from_hostname() X-Git-Tag: tevent-0.9.32~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4ae820648dcbc265a89d271538c5e97137a8353;p=thirdparty%2Fsamba.git krb5_wrap: handle KRB5_ERR_HOST_REALM_UNKNOWN in smb_krb5_get_realm_from_hostname() Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c index 2e43f797144..0c8b402c21e 100644 --- a/lib/krb5_wrap/krb5_samba.c +++ b/lib/krb5_wrap/krb5_samba.c @@ -2669,6 +2669,10 @@ char *smb_krb5_get_realm_from_hostname(TALLOC_CTX *mem_ctx, } kerr = krb5_get_host_realm(ctx, hostname, &realm_list); + if (kerr == KRB5_ERR_HOST_REALM_UNKNOWN) { + realm_list = NULL; + kerr = 0; + } if (kerr != 0) { DEBUG(3,("kerberos_get_realm_from_hostname %s: " "failed %s\n",