diff --git a/lib/krb5/addr_families.c b/lib/krb5/addr_families.c index 4fbb4fa2f..5e99da7ff 100644 --- a/lib/krb5/addr_families.c +++ b/lib/krb5/addr_families.c @@ -523,7 +523,7 @@ krb5_parse_address(krb5_context context, error = getaddrinfo (string, NULL, NULL, &ai); if (error) - return -1; + return krb5_eai_to_heim_errno(error); n = 0; for (a = ai; a != NULL; a = a->ai_next) diff --git a/lib/krb5/changepw.c b/lib/krb5/changepw.c index e48d761be..5151bd8da 100644 --- a/lib/krb5/changepw.c +++ b/lib/krb5/changepw.c @@ -55,7 +55,9 @@ get_kdc_address (krb5_context context, error = roken_getaddrinfo_hostspec(*hostlist, port, ai); krb5_free_krbhst (context, hostlist); - return error; + if(error) + return krb5_eai_to_heim_errno(error); + return 0; } static krb5_error_code diff --git a/lib/krb5/get_for_creds.c b/lib/krb5/get_for_creds.c index dd3d78884..81953d17e 100644 --- a/lib/krb5/get_for_creds.c +++ b/lib/krb5/get_for_creds.c @@ -144,7 +144,7 @@ krb5_get_forwarded_creds (krb5_context context, ret = getaddrinfo (hostname, NULL, NULL, &ai); if (ret) - return ret; + return krb5_eai_to_heim_errno(ret); ret = add_addrs (context, &addrs, ai); freeaddrinfo (ai); diff --git a/lib/krb5/send_to_kdc.c b/lib/krb5/send_to_kdc.c index 17bf08969..1979861a7 100644 --- a/lib/krb5/send_to_kdc.c +++ b/lib/krb5/send_to_kdc.c @@ -257,7 +257,7 @@ send_via_proxy (krb5_context context, ret = getaddrinfo (proxy, portstr, NULL, &ai); free (proxy); if (ret) - return ret; + return krb5_eai_to_heim_errno(ret); for (a = ai; a != NULL; a = a->ai_next) { s = socket (a->ai_family, a->ai_socktype, a->ai_protocol);