From b6a203fa06087c2eb6250dd997aa5d8f6ae94eb7 Mon Sep 17 00:00:00 2001 From: Karl Ramm Date: Fri, 28 Dec 2007 03:23:47 +0000 Subject: ostensibly accept both sorts of authentication when offering brain dumps, and have a command line switch to choose between the sort you use when getting them --- server/main.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'server/main.c') diff --git a/server/main.c b/server/main.c index 0f2aa4c..aa7516e 100644 --- a/server/main.c +++ b/server/main.c @@ -124,6 +124,16 @@ static int nofork; struct in_addr my_addr; char *bdump_version = "1.2"; +#ifdef HAVE_KRB5 +int bdump_auth_proto = 5; +#else /* HAVE_KRB5 */ +#ifdef HAVE_KRB4 +int bdump_auth_proto = 4; +#else /* HAVE_KRB4 */ +int bdump_auth_proto = 0; +#endif /* HAVE_KRB4 */ +#endif /* HAVE_KRB5 */ + #ifdef HAVE_KRB5 krb5_ccache Z_krb5_ccache; krb5_keyblock *__Zephyr_keyblock; @@ -167,7 +177,7 @@ main(argc, argv) programname = (programname) ? programname + 1 : argv[0]; /* process arguments */ - while ((optchar = getopt(argc, argv, "dsnv:f:k:")) != EOF) { + while ((optchar = getopt(argc, argv, "dsnv4:f:k:")) != EOF) { switch(optchar) { case 'd': zdebug = 1; @@ -192,6 +202,9 @@ main(argc, argv) init_from_dump = 0; dumpfile = optarg; break; + case '4': + bdump_auth_proto = 4; + break; case '?': default: usage(); -- cgit v1.2.3