Move stash file #define to osconf.h and add stash file name handling
authorPaul Park <pjpark@mit.edu>
Mon, 17 Jul 1995 19:34:26 +0000 (19:34 +0000)
committerPaul Park <pjpark@mit.edu>
Mon, 17 Jul 1995 19:34:26 +0000 (19:34 +0000)
to krb5_db_fetch_mkey().

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

src/lib/kdb/ChangeLog
src/lib/kdb/fetch_mkey.c
src/lib/kdb/store_mkey.c

index bdd7bfd3fe44f4f1d2c8002d3e8cd120b497407a..2788a436e5ed7496dbaf009edbaa77837e787741 100644 (file)
@@ -1,3 +1,10 @@
+
+Mon Jul 17 15:17:53 EDT 1995   Paul Park       (pjpark@mit.edu)
+       * fetch_mkey.c - Remove inclusion of kdbint.h and add handling of
+               stash file argument.
+       * store_mkey.c - Remove inclusion of kdbint.h.  The default name of
+               the stash file is in osconf.h now.
+
 Sat Jul  8 22:37:14 1995  Theodore Y. Ts'o  (tytso@dcl)
 
        * kdb_dbm.c (kdb5_kdbm_db_create): Make sure the dbm context is
index cae97569f48bf4da8e12ea329db9906405f44e44..2ef3526512d325526dfd953b35c3a74555eb172f 100644 (file)
@@ -26,7 +26,6 @@
  */
 
 #include "k5-int.h"
-#include "kdbint.h"
 
 /* these are available to other funcs, and the pointers may be reassigned */
 
@@ -53,12 +52,13 @@ char *krb5_mkey_pwd_prompt2 = KRB5_KDC_MKEY_2;
 #endif
 
 krb5_error_code
-krb5_db_fetch_mkey(context, mname, eblock, fromkeyboard, twice, salt, key)
+krb5_db_fetch_mkey(context, mname, eblock, fromkeyboard, twice, keyfile, salt, key)
     krb5_context context;
     krb5_principal mname;
     krb5_encrypt_block * eblock;
     krb5_boolean fromkeyboard;
     krb5_boolean twice;
+    char *keyfile;
     krb5_data * salt;
     krb5_keyblock * key;
 {
@@ -108,9 +108,9 @@ krb5_db_fetch_mkey(context, mname, eblock, fromkeyboard, twice, salt, key)
        (void) strcat(defkeyfile, "");
        
 #ifdef ANSI_STDIO
-       if (!(kf = fopen(defkeyfile, "rb")))
+       if (!(kf = fopen((keyfile) ? keyfile : defkeyfile, "rb")))
 #else
-       if (!(kf = fopen(defkeyfile, "r")))
+       if (!(kf = fopen((keyfile) ? keyfile : defkeyfile, "r")))
 #endif
            return KRB5_KDB_CANTREAD_STORED;
        if (fread((krb5_pointer) &keytype, 2, 1, kf) != 1) {
index ddec7d203500741af2e18eaa8be99cbef88c351b..a58d2fe7ea0798874f1120ba941a8907e09a8683 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <errno.h>
 #include "k5-int.h"
-#include "kdbint.h"
 
 /* Just in case sysincl.h didn't get it */