fix some broken error fprintfs
authorMark Eichin <eichin@mit.edu>
Sun, 14 Aug 1994 04:40:48 +0000 (04:40 +0000)
committerMark Eichin <eichin@mit.edu>
Sun, 14 Aug 1994 04:40:48 +0000 (04:40 +0000)
move MAXPATHLEN check until after includes that might set it...

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4136 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/client/kadmin.c
src/kadmin/client/kadmin_msnd.c

index 50f5c27362988030a10eac22f36d9e9b31bfc8f3..c7f48fcf5131b12215843c3dd5f55bfc0cb9eb77 100644 (file)
@@ -169,7 +169,7 @@ main(argc,argv)
     (void) sprintf(cache_name, "FILE:/tmp/tkt_adm_%d", getpid());
 
     if ((retval = krb5_cc_resolve(cache_name, &cache))) {
-       fprintf(stderr, "Unable to Resolve Cache: !\n", cache_name);
+       fprintf(stderr, "Unable to Resolve Cache: %s!\n", cache_name);
     }
     
     if ((retval = krb5_cc_initialize(cache, client))) {
@@ -565,7 +565,8 @@ OLDDECLARG(krb5_principal, client)
                                        client->realm.data, 
                                           /* instance is <realm> */
                                         0))) {
-        fprintf(stderr, "Error %s while building client name!\n");
+        fprintf(stderr, "Error %s while building client name!\n",
+               error_message(retval));
        krb5_free_addresses(my_addresses);
         return(1);
     }
index e0d990448f73a8971c8c2d0730093cc7c30e5a4e..d81f1327a98025015c646676156f293808c635bb 100644 (file)
@@ -35,10 +35,6 @@ static char rcsid_kadmin[] =
 #include <string.h>
 #include <com_err.h>
 
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 1024
-#endif
-
 #include <sys/param.h>
 #include <pwd.h>
 
@@ -63,6 +59,10 @@ static char rcsid_kadmin[] =
 #include <krb5/kdb5_err.h>
 #include <krb5/krb5_err.h>
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 1024
+#endif
+
 krb5_error_code
 kadm_snd_mod(my_creds, rep_ret, local_addr, foreign_addr, local_socket, seqno)
 krb5_creds *my_creds;
@@ -78,7 +78,6 @@ krb5_int32 *seqno;
     char version[10];
     int value;
     int valid_command;
-    extern int errno;
     int i;
 
     for ( ; ; ) {