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

Re: afs-support



Elmar Abeln <elmar.abeln@urz.uni-heidelberg.de> writes:
> Hi,

Hello

> 1. The command "gawk -f roken.awk roken.h.in >make-roken."
> works not on our Solaris 7 but on AIX42 and AIX43.

Could you tell us how it fails?

> 2. in kdc/kaserver.c :
>   a) the include file "kerberos4.h" doesnt exist.
>   b) the statement 
> 
>     server_entry = db_fetch4 ("krbtgt", v4_realm, v4_realm);
>     if (server_entry == NULL) 
> 
> should be 
> 
>     ret = db_fetch4 ("krbtgt", v4_realm, v4_realm, &server_entry);
>     if ( ret )

Yes, that code was bad, the following patch should help.

/assar
Index: kaserver.c
===================================================================
RCS file: /afs/pdc.kth.se/src/packages/kth-krb/SourceRepository/heimdal/kdc/kaserver.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -w -u -w -r1.15 -r1.16
--- kaserver.c	2001/01/28 21:51:05	1.15
+++ kaserver.c	2001/02/05 10:49:43	1.16
@@ -33,11 +33,10 @@
 
 #include "kdc_locl.h"
 
-RCSID("$Id: kaserver.c,v 1.15 2001/01/28 21:51:05 assar Exp $");
+RCSID("$Id: kaserver.c,v 1.16 2001/02/05 10:49:43 assar Exp $");
 
 #ifdef KASERVER
 
-#include "kerberos4.h"
 #include <rx.h>
 
 #define KA_AUTHENTICATION_SERVICE 731
@@ -406,10 +405,10 @@
     snprintf (client_name, sizeof(client_name), "%s.%s@%s",
 	      name, instance, v4_realm);
 
-    client_entry = db_fetch4 (name, instance, v4_realm);
-    if (client_entry == NULL) {
-	kdc_log(0, "Client not found in database: %s",
-		client_name);
+    ret = db_fetch4 (name, instance, v4_realm, &client_entry);
+    if (ret) {
+	kdc_log(0, "Client not found in database: %s: %s",
+		client_name, krb5_get_err_text(context, ret));
 	make_error_reply (hdr, KANOENT, reply);
 	goto out;
     }
@@ -417,9 +416,10 @@
     snprintf (server_name, sizeof(server_name), "%s.%s@%s",
 	      "krbtgt", v4_realm, v4_realm);
 
-    server_entry = db_fetch4 ("krbtgt", v4_realm, v4_realm);
-    if (server_entry == NULL) {
-	kdc_log(0, "Server not found in database: %s", server_name);
+    ret = db_fetch4 ("krbtgt", v4_realm, v4_realm, &server_entry);
+    if (ret) {
+	kdc_log(0, "Server not found in database: %s: %s",
+		server_name, krb5_get_err_text(context, ret));
 	make_error_reply (hdr, KANOENT, reply);
 	goto out;
     }
@@ -599,9 +599,10 @@
     snprintf (server_name, sizeof(server_name),
 	      "%s.%s@%s", name, instance, v4_realm);
 
-    server_entry = db_fetch4 (name, instance, v4_realm);
-    if (server_entry == NULL) {
-	kdc_log(0, "Server not found in database: %s", server_name);
+    ret = db_fetch4 (name, instance, v4_realm, &server_entry);
+    if (ret) {
+	kdc_log(0, "Server not found in database: %s: %s",
+		server_name, krb5_get_err_text(context, ret));
 	make_error_reply (hdr, KANOENT, reply);
 	goto out;
     }
@@ -614,10 +615,10 @@
 	goto out;
     }
 
-    krbtgt_entry = db_fetch4 ("krbtgt", v4_realm, v4_realm);
-    if (krbtgt_entry == NULL) {
-	kdc_log(0, "Server not found in database: %s.%s@%s",
-		"krbtgt", v4_realm, v4_realm);
+    ret = db_fetch4 ("krbtgt", v4_realm, v4_realm, &krbtgt_entry);
+    if (ret) {
+	kdc_log(0, "Server not found in database: %s.%s@%s: %s",
+		"krbtgt", v4_realm, v4_realm, krb5_get_err_text(context, ret));
 	make_error_reply (hdr, KANOENT, reply);
 	goto out;
     }