[1262] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

krb5b4pl3: clients/ksu/authorization.c: don't use dbm_an_to_ln when USE_DBM_LNAME is unset

daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Thu Mar 23 18:57:17 1995

From: "Jonathan I. Kamens" <jik@cam.ov.com>
Date: Thu, 23 Mar 1995 19:00:29 -0500
To: krb5-bugs@MIT.EDU

clients/ksu/authorization.c won't compile when USE_DBM_LNAME isn't
set.  Here's a fix:

--- authorization.c	1995/03/23 23:50:28	1.1
+++ authorization.c	1995/03/23 23:53:39
@@ -27,7 +27,9 @@
 
 #include "ksu.h"
 
+#ifdef USE_DBM_LNAME
 static krb5_error_code _dbm_an_to_ln();
+#endif
 static krb5_error_code _username_an_to_ln();
 static void auth_cleanup();
 
@@ -179,6 +181,7 @@
 
 	char * kuser =  (char *) calloc (strlen(princname), sizeof(char));
 
+#ifdef USE_DBM_LNAME
 #ifdef DEBUG 	
 	printf("krb5_lname_file %s\n", krb5_lname_file); 
 #endif
@@ -189,7 +192,8 @@
 			retbool = TRUE; /* found the right one in db */
 		}
 	}
-	
+#endif /* USE_DBM_LNAME */
+
 	if (local_realm_name && (retbool == FALSE)){ 
 		char * realm;	
 		int used_def = 0;
@@ -726,6 +730,8 @@
 return out_ptr;
 }
 
+#ifdef USE_DBM_LNAME
+
 /********************************************************************
  * Implementation:  This version uses a DBM database, indexed by aname,
  * to generate a lname.
@@ -775,6 +781,8 @@
     (void) dbm_close(db);
     return retval;
 }
+
+#endif USE_DBM_LNAME
 
 /*****************************************************************
  * Implementation:  This version checks the realm to see if it is the 

home help back first fref pref prev next nref lref last post