[906] in Zephyr_Bugs
configure.in patch for KTH eBones (Kerberos)
daemon@ATHENA.MIT.EDU (Derrick J Brashear)
Tue Feb 17 14:09:59 1998
Date: Tue, 17 Feb 1998 14:09:48 -0500 (EST)
From: Derrick J Brashear <shadow@DEMENTIA.ORG>
Reply-To: Derrick J Brashear <shadow@DEMENTIA.ORG>
To: zephyr-bugs@MIT.EDU
---559023410-851401618-887742588=:14554
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
The first attached patch makes configure detect the use of KTH Kerberos. The
definition of HAVE_KTH_KERBEROS (or whatever) is for the second, which makes
kopt.c's version of krb_rd_req deal with KTH's removal of swap_u_long in krb.h
after their version 0.9.8. The fuzz on the second patch will be due to other
local changes we have. It changes server/kopt.c to use krb_get_int when that
exists in libkrb instead of using swap_u_long
-D
---559023410-851401618-887742588=:14554
Content-Type: TEXT/plain; CHARSET=US-ASCII
Content-Description: zpatch
*** ./configure.in Fri Sep 5 20:45:27 1997
--- /usr/tmp/configure.in Tue Feb 17 14:01:55 1998
***************
*** 155,163 ****
LDFLAGS="${LDFLAGS} -L${kerberos}/lib"
fi
AC_DEFINE(ZEPHYR_USES_KERBEROS)
! AC_CHECK_LIB(krb, krb_mk_req,,
[AC_ERROR(Kerberos library not found)], -ldes)
! LIBS="-lkrb -ldes ${LIBS}"
else
AC_WARN(compiling without Kerberos support; Zephyr will be insecure.)
fi
--- 155,165 ----
LDFLAGS="${LDFLAGS} -L${kerberos}/lib"
fi
AC_DEFINE(ZEPHYR_USES_KERBEROS)
! AC_CHECK_LIB(krb, krb_mk_req, KLIBS="-lkrb -ldes",
[AC_ERROR(Kerberos library not found)], -ldes)
! AC_CHECK_LIB(resolv, dns_lookup,KLIBS="${KLIBS} -lresolv",,-lkrb -ldes)
! AC_CHECK_LIB(krb, krb_get_int, [AC_DEFINE(HAVE_KRB_GET_INT)],,-ldes)
! LIBS="${KLIBS} ${LIBS}"
else
AC_WARN(compiling without Kerberos support; Zephyr will be insecure.)
fi
---559023410-851401618-887742588=:14554
Content-Type: TEXT/plain; CHARSET=US-ASCII
Content-Description: zpatch2
*** server/kopt.c Fri Sep 19 16:05:47 1997
--- /afs/andrew/system/src/local/zephyr/047/zephyr-2.0.2/server/kopt.c Mon Feb 16 17:53:22 1998
***************
*** 387,397 ****
--- 396,412 ----
strcpy(r_realm,ptr); /* Authentication name */
ptr += strlen(r_realm) + 1;
check_ptr();
+ #ifdef HAVE_KRB_GET_INT
+ krb_get_int(ptr, &ad->checksum, 4, swap_bytes);
+ #else
memcpy(&ad->checksum, ptr, 4); /* Checksum */
+ #endif
ptr += 4;
check_ptr();
+ #ifndef HAVE_KRB_GET_INT
if (swap_bytes)
swap_u_long(ad->checksum);
+ #endif
r_time_ms = *(ptr++); /* Time (fine) */
#ifdef lint
/* XXX r_time_ms is set but not used. why??? */
***************
*** 401,409 ****
--- 416,428 ----
#endif /* lint */
check_ptr();
/* assume sizeof(r_time_sec) == 4 ?? */
+ #ifdef HAVE_KRB_GET_INT
+ krb_get_int(ptr, &r_time_sec, 4, swap_bytes);
+ #else
memcpy(&r_time_sec,ptr,4); /* Time (coarse) */
if (swap_bytes)
swap_u_long(r_time_sec);
+ #endif
/* Check for authenticity of the request */
if (krb_ap_req_debug)
---559023410-851401618-887742588=:14554--