Skip site navigation (1)Skip section navigation (2)
Date:      19 Mar 2002 16:39:31 +0100
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        Peter Pentchev <roam@ringlet.net>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/crypto/openssh auth-chall.c auth-krb4.c auth-krb5.c auth-pam.c auth-passwd.c auth-rh-rsa.c auth-rsa.c auth.c auth.h auth1.c auth2.c authfd.c authfile.c bufaux.c canohost.c channels.c channels.h cipher.c cipher.h compat.c ...
Message-ID:  <xzp1yegefd8.fsf@flood.ping.uio.no>
In-Reply-To: <20020319115435.J9136@straylight.oblivion.bg>
References:  <200203181009.g2IA9jI22591@freefall.freebsd.org> <xzppu22np1m.fsf@flood.ping.uio.no> <20020319115435.J9136@straylight.oblivion.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=

Peter Pentchev <roam@ringlet.net> writes:
> Well, I really hate to be a bearer of bad news (lucky for me that
> I never got 'round to putting a place marker in the xearth file ;),
> but.. servconf.c has quite a lot of #if defined(KRB4) || defined(KRB5).
> Those break, like, badly, if KRB5 is defined *without* KRB4 :(

See attached patch.

DES
-- 
Dag-Erling Smorgrav - des@ofug.org


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=krb4or5.diff

Index: servconf.c
===================================================================
RCS file: /home/ncvs/src/crypto/openssh/servconf.c,v
retrieving revision 1.23
diff -u -r1.23 servconf.c
--- servconf.c	18 Mar 2002 10:09:42 -0000	1.23
+++ servconf.c	19 Mar 2002 15:26:16 -0000
@@ -13,9 +13,12 @@
 RCSID("$OpenBSD: servconf.c,v 1.101 2002/02/04 12:15:25 markus Exp $");
 RCSID("$FreeBSD: src/crypto/openssh/servconf.c,v 1.23 2002/03/18 10:09:42 des Exp $");
 
-#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 @@
 		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)

--=-=-=--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzp1yegefd8.fsf>