bozo: Ignore ListKeys ka_KeyCheckSum return value
[openafs.git] / src / bozo / bosoprocs.c
index b7d6410..20dd956 100644 (file)
@@ -29,6 +29,7 @@
 #include <afs/kautils.h>
 
 #include "bnode.h"
+#include "bnode_internal.h"
 #include "bosint.h"
 #include "bosprototypes.h"
 
@@ -251,7 +252,7 @@ SaveOldFiles(char *aname)
 
     if (bakTime && (oldTime == 0 || bakTime < now - BOZO_OLDTIME)) {
        /* no .OLD file, or .BAK is at least a week old */
-       code = rk_rename(bbuffer, obuffer);
+       rk_rename(bbuffer, obuffer);
     }
 
     /* finally rename to .BAK extension */
@@ -611,8 +612,11 @@ SBOZO_ListKeys(struct rx_call *acall, afs_int32 an, afs_int32 *akvno,
     if (code == 0) {
        akeyinfo->mod_sec = tstat.st_mtime;
     }
-    ka_KeyCheckSum(tkeys.key[an].key, &akeyinfo->keyCheckSum);
-    /* only errors is bad key parity */
+
+    /* This will return an error if the key is 'bad' (bad checksum, weak DES
+     * key, etc). But we don't care, since we can still return the other
+     * information about the key, so ignore the result. */
+    (void)ka_KeyCheckSum(tkeys.key[an].key, &akeyinfo->keyCheckSum);
 
   fail:
     if (noauth)
@@ -1005,9 +1009,6 @@ SBOZO_Restart(struct rx_call *acall, char *ainstance)
        goto fail;
     }
 
-    /* setup return code */
-    code = 0;
-
     bnode_Hold(tb);
     bnode_SetStat(tb, BSTAT_SHUTDOWN);
     code = bnode_WaitStatus(tb, BSTAT_SHUTDOWN);       /* this can fail */