From: Ezra Peisach Date: Thu, 31 Oct 1996 16:30:40 +0000 (+0000) Subject: * main.c (main): Add -T keyfile and -D debug_level X-Git-Tag: krb5-1.0-freeze1~160 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e1c461ae9d51bb237ce8279d9bd8767c48d1c6f5;p=krb5.git * main.c (main): Add -T keyfile and -D debug_level options. [krb5-admin/42] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9262 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kadmin/v5passwdd/ChangeLog b/src/kadmin/v5passwdd/ChangeLog index d329893c9..7950f8f74 100644 --- a/src/kadmin/v5passwdd/ChangeLog +++ b/src/kadmin/v5passwdd/ChangeLog @@ -1,3 +1,8 @@ +Thu Oct 31 11:20:22 1996 Ezra Peisach + + * main.c (main): Add -T keyfile and -D debug_level + options. [krb5-admin/42] + Tue Sep 10 14:37:23 1996 Tom Yu * v5passwd.M: remove extra args to .TH diff --git a/src/kadmin/v5passwdd/main.c b/src/kadmin/v5passwdd/main.c index a37e67bfc..eda3a51e1 100644 --- a/src/kadmin/v5passwdd/main.c +++ b/src/kadmin/v5passwdd/main.c @@ -40,13 +40,14 @@ unhandled_signal(signo) void usage() { fprintf(stderr, "Usage: kadmind [-r realm] [-m] [-nofork] " - "[-port port-number]\n"); + "[-D debuglevel] [-T keytable] [-port port-number]\n"); exit(1); } int main(int argc, char *argv[]) { int ret, rlen, nofork, oldnames = 0; + int timeout = -1; krb5_error_code code; int debug_level = 0; #if POSIX_SIGNALS @@ -81,6 +82,19 @@ int main(int argc, char *argv[]) usage(); params.kadmind_port = atoi(*argv); params.mask |= KADM5_CONFIG_KADMIND_PORT; + } else if (strcmp(*argv, "-T") == 0) { + argc--; argv++; + if (!argc) + usage(); + params.admin_keytab = *argv; + params.mask |= KADM5_CONFIG_ADMIN_KEYTAB; + argc--; argv++; + continue; + } else if (strcmp(*argv, "-D") == 0) { + if (!argc) + usage(); + argc--; argv++; + debug_level = atoi(*argv); } else break; argc--; argv++; @@ -168,6 +182,12 @@ int main(int argc, char *argv[]) exit(1); } + if (code = proto_init(context, debug_level, timeout)) { + krb5_klog_syslog(LOG_ERR, "%s: %s while initializing proto", + programname, error_message(code)); + fprintf(stderr, "%s: %s while initializing proto\n", + programname, error_message(code)); + } if ( #if POSIX_SETJMP