summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2002-03-19 16:44:11 +0000
committerdes <des@FreeBSD.org>2002-03-19 16:44:11 +0000
commit2423fff46fa1d2f7925c0dddf4dbcaa47a8c7e2c (patch)
tree2142ba423d15b4102aebe3bd1c05ef099cab36dc /crypto
parent4a8299a7c08572453d002ef2b84b9967ee5ebfe8 (diff)
downloadFreeBSD-src-2423fff46fa1d2f7925c0dddf4dbcaa47a8c7e2c.zip
FreeBSD-src-2423fff46fa1d2f7925c0dddf4dbcaa47a8c7e2c.tar.gz
Unbreak for KRB4 ^ KRB5 case.
Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'crypto')
-rw-r--r--crypto/openssh/servconf.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/crypto/openssh/servconf.c b/crypto/openssh/servconf.c
index ac806c6..18f223d 100644
--- a/crypto/openssh/servconf.c
+++ b/crypto/openssh/servconf.c
@@ -13,9 +13,12 @@
RCSID("$OpenBSD: servconf.c,v 1.101 2002/02/04 12:15:25 markus Exp $");
RCSID("$FreeBSD$");
-#if defined(KRB4) || defined(KRB5)
+#if defined(KRB4)
#include <krb.h>
#endif
+#if defined(KRB5)
+#include <krb5.h>
+#endif
#ifdef AFS
#include <kafs.h>
#endif
@@ -178,9 +181,20 @@ fill_default_server_options(ServerOptions *options)
options->rsa_authentication = 1;
if (options->pubkey_authentication == -1)
options->pubkey_authentication = 1;
-#if defined(KRB4) || defined(KRB5)
+#if defined(KRB4) && defined(KRB5)
+ if (options->kerberos_authentication == -1)
+ options->kerberos_authentication =
+ (access(KEYFILE, R_OK) == 0 ||
+ (access(krb5_defkeyname, R_OK) == 0);
+#elif defined(KRB4)
if (options->kerberos_authentication == -1)
options->kerberos_authentication = (access(KEYFILE, R_OK) == 0);
+#elif defined(KRB5)
+ if (options->kerberos_authentication == -1)
+ options->kerberos_authentication =
+ (access(krb5_defkeyname, R_OK) == 0);
+#endif
+#if defined(KRB4) || defined(KRB5)
if (options->kerberos_or_local_passwd == -1)
options->kerberos_or_local_passwd = 1;
if (options->kerberos_ticket_cleanup == -1)
OpenPOWER on IntegriCloud