[24053] in Source-Commits
/svn/athena r23655 - in trunk/athena/bin/lert: . debian
daemon@ATHENA.MIT.EDU (Evan Broder)
Sun Mar 29 13:34:52 2009
Date: Sun, 29 Mar 2009 13:33:37 -0400
From: Evan Broder <broder@MIT.EDU>
Message-Id: <200903291733.n2THXbIg001013@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: broder
Date: 2009-03-29 13:33:37 -0400 (Sun, 29 Mar 2009)
New Revision: 23655
Modified:
trunk/athena/bin/lert/debian/changelog
trunk/athena/bin/lert/lertsrv.c
Log:
In lert:
* Don't use krb4 in the lert server if it's not available.
Modified: trunk/athena/bin/lert/debian/changelog
===================================================================
--- trunk/athena/bin/lert/debian/changelog 2009-03-29 15:39:28 UTC (rev 23654)
+++ trunk/athena/bin/lert/debian/changelog 2009-03-29 17:33:37 UTC (rev 23655)
@@ -1,8 +1,9 @@
debathena-lert (10.0.1-0debathena1) unstable; urgency=low
* Fix a double-free in the lert server. (Patch by Garry Zacheiss)
+ * Don't use krb4 in the lert server if it's not available.
- -- Evan Broder <broder@mit.edu> Sun, 29 Mar 2009 11:38:02 -0400
+ -- Evan Broder <broder@mit.edu> Sun, 29 Mar 2009 13:27:58 -0400
debathena-lert (10.0.0-0debathena2) unstable; urgency=low
Modified: trunk/athena/bin/lert/lertsrv.c
===================================================================
--- trunk/athena/bin/lert/lertsrv.c 2009-03-29 15:39:28 UTC (rev 23654)
+++ trunk/athena/bin/lert/lertsrv.c 2009-03-29 17:33:37 UTC (rev 23655)
@@ -19,9 +19,11 @@
#include <stdio.h>
#include <unistd.h>
+#ifdef HAVE_KRB4
#include <krb.h>
+#include <des.h>
+#endif
#include <krb5.h>
-#include <des.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -55,14 +57,16 @@
int fromlen;
int status;
int len;
+#ifdef HAVE_KRB4
AUTH_DAT ad;
KTEXT_ST authent;
KTEXT_ST ktxt;
+ char instance[INST_SZ];
/* for krb_mk_priv */
des_key_schedule sched; /* session key schedule */
+#endif
struct hostent *hp;
struct utsname thishost;
- char instance[INST_SZ];
/* for the krb5-authenticated v2 of the protocol */
krb5_error_code problem;
krb5_auth_context auth_con = NULL;
@@ -124,6 +128,7 @@
fprintf(stderr, "lertsrv: Received packet of length %d\n", plen);
#endif
+#ifdef HAVE_KRB4
if (packet[0] == '1')
{
/* krb4-authenticated version of the protocol. */
@@ -172,7 +177,9 @@
/* Avoid confusion, zeroize now */
memset(&from, 0, sizeof(from));
}
- else if (packet[0] == LERT_VERSION)
+ else
+#endif
+ if (packet[0] == LERT_VERSION)
{
/* krb5-authenticated version of the protocol. */
if (!context)