[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: krb5_sock_to_principal



Alex Schenkman <alex@melody.se> writes:

> What does this message means ?

I guess you don't have a name associated with that address. Try this
patch.

/Johan

--- kerberos5.c	2001/01/09 18:45:33	1.47
+++ kerberos5.c	2001/03/19 11:09:53
@@ -351,12 +351,20 @@
 				      "host",
 				      KRB5_NT_SRV_HST,
 				      &server);
-	if (ret) {
-	    Data(ap, KRB_REJECT, "krb5_sock_to_principal failed", -1);
-	    auth_finished(ap, AUTH_REJECT);
+	if (ret != 0) {
 	    if (auth_debug_mode)
 		printf("Kerberos V5: "
 		       "krb5_sock_to_principal failed (%s)\r\n",
+		       krb5_get_err_text(context, ret));
+	    ret = krb5_sname_to_principal(context, NULL, "host", 
+					  KRB5_NT_SRV_HST, &server);
+	}
+	if (ret != 0) {
+	    Data(ap, KRB_REJECT, "krb5_sname_to_principal failed", -1);
+	    auth_finished(ap, AUTH_REJECT);
+	    if (auth_debug_mode)
+		printf("Kerberos V5: "
+		       "krb5_sname_to_principal failed (%s)\r\n",
 		       krb5_get_err_text(context, ret));
 	    return;
 	}