revert misguided kstash changes
authorMark Eichin <eichin@mit.edu>
Wed, 2 Nov 1994 18:56:46 +0000 (18:56 +0000)
committerMark Eichin <eichin@mit.edu>
Wed, 2 Nov 1994 18:56:46 +0000 (18:56 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4614 dc483132-0cff-0310-8789-dd5450dbe970

src/admin/stash/ChangeLog
src/admin/stash/kdb5_stash.M
src/admin/stash/kdb5_stash.c

index 516cdd791671d5ae0ca333f71a8da71a729391a3..7e09d9375878e0c24e346f17a75cc96a85a41cae 100644 (file)
@@ -1,10 +1,3 @@
-Tue Nov  1 19:19:22 1994  Mark Eichin  (eichin@cygnus.com)
-
-       * kdb5_stash.c (main): added -o option to read a Kerberos V4
-       kstash'ed master key.
-       (usage): mention it in the usage message.
-       * kdb5_stash.M: document it.
-
 Mon Oct  3 19:11:08 1994  Theodore Y. Ts'o  (tytso@dcl)
 
        * Makefile.in: Use $(srcdir) to find manual page for make install.
index e45abb56e48678839e88500fa7fd7645c918ec9f..06d02cc812b33fd9be9e21ea94a8bfcd031946c5 100644 (file)
@@ -43,9 +43,6 @@ kdb5_stash \- store a principal database master key on disk
 ] [
 .B \-f
 .I keyfile
-] [
-.B \-o
-.I v4-stash-file
 ]
 .br
 .SH DESCRIPTION
@@ -94,11 +91,6 @@ The
 .B \-f
 option specifies the file in which the master key should be stored; the
 default is DEFAULT_KEYFILE_STUB ("/.k5." concatenated with the realm name).
-.PP
-The
-.B \-o
-option specifies the file in which an old V4 master key was stored; this is
-usually the file "/.k".
 .SH SEE ALSO
 krb5(3), krb5kdc(8), kdb5_create(8)
 .SH BUGS
index 7aceeb49cb38de4786308d253c49b33b82a3650a..a713e281a70c3819157ae02004d1a6d8648dfd55 100644 (file)
@@ -47,7 +47,7 @@ char *who;
 int status;
 {
     fprintf(stderr, "usage: %s [-d dbpathname] [-r realmname] [-k keytype]\n\
-\t[-e etype] [-M mkeyname] [-f keyfile] [-o v4-stash-file]\n",
+\t[-e etype] [-M mkeyname] [-f keyfile]\n",
            who);
     exit(status);
 }
@@ -67,7 +67,6 @@ char *argv[];
     char *mkey_name = 0;
     char *mkey_fullname;
     char *keyfile = 0;
-    char *v4_stashfile = 0;
 
     int keytypedone = 0;
     krb5_enctype etype = 0xffff;
@@ -77,7 +76,7 @@ char *argv[];
 
     krb5_init_ets();
 
-    while ((optchar = getopt(argc, argv, "d:r:k:M:e:f:o:")) != EOF) {
+    while ((optchar = getopt(argc, argv, "d:r:k:M:e:f:")) != EOF) {
        switch(optchar) {
        case 'd':                       /* set db name */
            dbname = optarg;
@@ -98,9 +97,6 @@ char *argv[];
        case 'f':
            keyfile = optarg;
            break;
-       case 'o':
-           v4_stashfile = optarg;
-           break;
        case '?':
        default:
            usage(argv[0], 1);
@@ -155,44 +151,11 @@ char *argv[];
     }
 
     /* TRUE here means read the keyboard, but only once */
-    if (v4_stashfile) {
-       FILE *kf;
-       krb5_keyblock *key = &master_keyblock;
-
-       key->length = 8;
-
-#ifdef ANSI_STDIO
-#define STDIO_RB "rb"
-#else
-#define STDIO_RB "r"
-#endif
-       if (!(kf = fopen(v4_stashfile, STDIO_RB))) {
-           retval = errno;
-       } else if (!(key->contents = (krb5_octet *)malloc(key->length))) {
-           retval = ENOMEM;
-       } else if (fread((krb5_pointer) key->contents,
-                        sizeof(key->contents[0]), key->length, kf) != key->length) {
-           memset(key->contents, 0, key->length);
-           free(key->contents);
-           key->contents = 0;
-           retval = KRB5_KDB_CANTREAD_STORED;
-       }
-       
-       fclose(kf);
-
-       if (retval)
-       {
-           (void) krb5_db_fini();
-           com_err(argv[0], retval, "trying to open old kstash file");
-           exit(1);
-       }
-    } else {
-       if (retval = krb5_db_fetch_mkey(master_princ, &master_encblock, TRUE,
-                                       FALSE, 0, &master_keyblock)) {
-           com_err(argv[0], retval, "while reading master key");
-           (void) krb5_db_fini();
-           exit(1);
-       }
+    if (retval = krb5_db_fetch_mkey(master_princ, &master_encblock, TRUE,
+                                   FALSE, 0, &master_keyblock)) {
+       com_err(argv[0], retval, "while reading master key");
+       (void) krb5_db_fini();
+       exit(1);
     }
     if (retval = krb5_db_verify_master_key(master_princ, &master_keyblock,
                                           &master_encblock)) {