openssh/mit kerberos and numeric host address

王剑 larkwang at outlook.com
Sat Apr 6 02:50:13 EDT 2013


After I compare debian testing's krb5 source and kfw-3-2-2 source, I get this
simple patch which works as I want.

!!! Notice this patch is over getaddrinfo patch !!!


--- src/lib/krb5/os/hst_realm.c.bak     2013-04-06 14:10:14.000000000 +0800
+++ src/lib/krb5/os/hst_realm.c 2013-04-06 14:09:23.000000000 +0800
@@ -144,9 +144,7 @@
     printf("get_host_realm(host:%s) called\n",host);
 #endif

-    retval = krb5int_clean_hostname(context, host, local_host, sizeof local_host);
-    if (retval)
-     return retval;
+    krb5int_clean_hostname(context, host, local_host, sizeof local_host);

     /*
       Search for the best match for the host or domain.
---


Who introduced this retval check code?
https://github.com/krb5/krb5/blame/master/src/lib/krb5/os/hst_realm.c

Maybe the way to go is

---snip---
retval = krb5int_clean_hostname(context, host, local_host, sizeof local_host);
if (retval && retval != KRB5_ERR_NUMERIC_REALM)
    return retval;
---snip---


Any input? 		 	   		  



More information about the Kerberos mailing list