From 16f151834e63d8df9f852b7e265f17c689553c35 Mon Sep 17 00:00:00 2001 From: Michael Weiser Date: Mon, 16 Apr 2012 06:49:21 -0400 Subject: Add -l option to gssd to force legacy behaviour Implement a new option -l to force gssd to ignore its kernel's crypto capabilities and use just the Single DES legacy encryption types to be compatible with old servers. This is only relevant if those servers have strong keys in their keytab. Signed-off-by: Steve Dickson Tested-by: Michael Weiser --- utils/gssd/gssd.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'utils/gssd/gssd.c') diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c index d53795e..7825255 100644 --- a/utils/gssd/gssd.c +++ b/utils/gssd/gssd.c @@ -85,7 +85,7 @@ sig_hup(int signal) static void usage(char *progname) { - fprintf(stderr, "usage: %s [-f] [-M] [-n] [-v] [-r] [-p pipefsdir] [-k keytab] [-d ccachedir] [-t timeout] [-R preferred realm]\n", + fprintf(stderr, "usage: %s [-f] [-l] [-M] [-n] [-v] [-r] [-p pipefsdir] [-k keytab] [-d ccachedir] [-t timeout] [-R preferred realm]\n", progname); exit(1); } @@ -102,7 +102,7 @@ main(int argc, char *argv[]) char *progname; memset(ccachesearch, 0, sizeof(ccachesearch)); - while ((opt = getopt(argc, argv, "fvrmnMp:k:d:t:R:")) != -1) { + while ((opt = getopt(argc, argv, "fvrlmnMp:k:d:t:R")) != -1) { switch (opt) { case 'f': fg = 1; @@ -143,6 +143,13 @@ main(int argc, char *argv[]) case 'R': preferred_realm = strdup(optarg); break; + case 'l': +#ifdef HAVE_SET_ALLOWABLE_ENCTYPES + limit_to_legacy_enctypes = 1; +#else + errx(1, "Setting encryption type not support by Kerberos libraries."); +#endif + break; default: usage(argv[0]); break; -- cgit