bcrypt keys are in the rxkad list, not the rxgk list
[openafs.git] / src / auth / keys.c
index 9bfa67a..0ab3f29 100644 (file)
@@ -300,20 +300,17 @@ _afsconf_InitKeys(struct afsconf_dir *dir)
  * in the original KeyFile, so that we can continue to be compatible with
  * utilities that directly modify that file.
  *
- * All other keys are stored in the file KeyFileEx, which has the following
+ * All other keys are stored in the file KeyFileExt, which has the following
  * format:
  *    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2
  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *   |                        version number                           |
- *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  *   |                        number of keys                           |
  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  *   | Key data ...
  *   +-+-+-+-+-+-+-+
  *
- * The version number is 1 at present. Version numbers higher than 1
- * indicate a keyfile that is not backwards compatible with this
- * specification.
+ * If the format ever needs to chanage incompatibly, a new file name
+ * will be used.
  *
  * Key data is a sequence of the following records (note that these are
  * not word aligned - the next record begins where the previous one ends)
@@ -522,7 +519,6 @@ _parseExtendedKeyFile(struct afsconf_dir *dir, char *fileName)
        code = read(fd, key->key.val, reclen);
        if (code != reclen) {
            rx_opaque_freeContents(&key->key);
-           free(key);
            goto fail;
        }
        code = addMemoryKey(dir, key, 1);
@@ -934,7 +930,7 @@ pickBestKvno(struct afsconf_dir *dir, afsconf_keyType type)
     /* Except, if we're in the rxkad list, we might have a bcrypt entry that
      * has a kvno of 999. So we need to skip that one
      */
-    while (type == afsconf_rxgk && kvnoEntry->kvno == 999) {
+    while (type == afsconf_rxkad && kvnoEntry->kvno == 999) {
        kvnoEntry = opr_queue_Prev(&typeEntry->kvnoList, struct kvnoList,
                                   link);
        if (opr_queue_IsEnd(&typeEntry->kvnoList, &kvnoEntry->link))