From f20a8d6a42832bb0ca28a89c6ed27ca739bd01bf Mon Sep 17 00:00:00 2001 From: Barry Jaspan Date: Mon, 12 Aug 1996 15:43:42 +0000 Subject: [PATCH] * kdb5_util.c: make mkey_password non-static * kdb5_create.c: use global mkey_password git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8925 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/dbutil/ChangeLog | 6 ++++++ src/kadmin/dbutil/kdb5_create.c | 11 ++--------- src/kadmin/dbutil/kdb5_util.c | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/kadmin/dbutil/ChangeLog b/src/kadmin/dbutil/ChangeLog index afc9c3909..203b6c6e7 100644 --- a/src/kadmin/dbutil/ChangeLog +++ b/src/kadmin/dbutil/ChangeLog @@ -1,3 +1,9 @@ +Mon Aug 12 11:41:57 1996 Barry Jaspan + + * kdb5_util.c: make mkey_password non-static + + * kdb5_create.c: use global mkey_password + Mon Aug 5 21:24:47 1996 Ezra Peisach * kdb5_stash.c (kdb5_stash): Ignore (expected) failure in stashing diff --git a/src/kadmin/dbutil/kdb5_create.c b/src/kadmin/dbutil/kdb5_create.c index 73ca72a44..7fe7b0fef 100644 --- a/src/kadmin/dbutil/kdb5_create.c +++ b/src/kadmin/dbutil/kdb5_create.c @@ -113,7 +113,7 @@ krb5_principal_data db_create_princ = { KRB5_NT_SRV_INST /* int type */ }; -static char *mkey_password = 0; +extern char *mkey_password; extern char *progname; extern int exit_status; @@ -125,8 +125,6 @@ void kdb5_create(argc, argv) int argc; char *argv[]; { - extern char *optarg; - extern int optind; int optchar; krb5_error_code retval; @@ -139,16 +137,11 @@ void kdb5_create(argc, argv) if (strrchr(argv[0], '/')) argv[0] = strrchr(argv[0], '/')+1; - mkey_password = NULL; - optind = 1; - while ((optchar = getopt(argc, argv, "P:s")) != EOF) { + while ((optchar = getopt(argc, argv, "s")) != EOF) { switch(optchar) { case 's': do_stash++; break; - case 'P': /* Only used for testing!!! */ - mkey_password = optarg; - break; case '?': default: usage(); diff --git a/src/kadmin/dbutil/kdb5_util.c b/src/kadmin/dbutil/kdb5_util.c index d15a2dc2f..6a0824a80 100644 --- a/src/kadmin/dbutil/kdb5_util.c +++ b/src/kadmin/dbutil/kdb5_util.c @@ -37,7 +37,7 @@ char *Err_no_database = "Database not currently opened!\n"; /* * XXX Ick, ick, ick. These global variables shouldn't be global.... */ -static char *mkey_password = 0; +char *mkey_password = 0; /* * I can't figure out any way for this not to be global, given how ss -- 2.26.2