From owner-freebsd-ports Sat Jun 16 19:50:32 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E12C837B405 for ; Sat, 16 Jun 2001 19:50:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f5H2o2820698; Sat, 16 Jun 2001 19:50:02 -0700 (PDT) (envelope-from gnats) Date: Sat, 16 Jun 2001 19:50:02 -0700 (PDT) Message-Id: <200106170250.f5H2o2820698@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: Patrick Hartling Subject: Re: ports/17489: Zephyr port is broken with Kerberos enabled Reply-To: Patrick Hartling Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR ports/17489; it has been noted by GNATS. From: Patrick Hartling To: freebsd-gnats-submit@FreeBSD.org, patrick@137.org Cc: Subject: Re: ports/17489: Zephyr port is broken with Kerberos enabled Date: Sat, 16 Jun 2001 21:43:26 -0500 This is a multi-part message in MIME format. --------------080803060008000808020708 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I have updated my patch to fix the Kerberos IV support in this port. It works on both 4.3-STABLE and 5.0-CURRENT. Note that the patch to the configure script is meant to replace Revision 1.2 of patch-ac. --------------080803060008000808020708 Content-Type: text/plain; name="patch-configure" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-configure" *** configure.orig Fri Apr 21 16:30:15 2000 --- configure Sat Jun 16 13:56:33 2001 *************** *** 50,56 **** bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' ! datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' --- 50,56 ---- bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' ! datadir='${prefix}/share/zephyr' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' *************** *** 3159,3172 **** fi LDFLAGS="$LDFLAGS -L$krb4/lib" fi ! echo $ac_n "checking for krb_rd_req in -lkrb4""... $ac_c" 1>&6 ! echo "configure:3164: checking for krb_rd_req in -lkrb4" >&5 ac_lib_var=`echo krb4'_'krb_rd_req | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" ! LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err $LIBS" cat > conftest.$ac_ext <&6 ! echo "configure:3164: checking for krb_rd_req in -lkrb" >&5 ac_lib_var=`echo krb4'_'krb_rd_req | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" ! LIBS="-lkrb -ldes425 -lkrb5 -lk5crypto -lcom_err $LIBS" cat > conftest.$ac_ext <&6 ! KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for krb_rd_req in -lkrb""... $ac_c" 1>&6 --- 3194,3200 ---- fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ! KRB4_LIBS="-lkrb -ldes425 -lkrb5 -lk5crypto -lcom_err" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for krb_rd_req in -lkrb""... $ac_c" 1>&6 *************** *** 3204,3210 **** echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" ! LIBS="-lkrb -ldes $LIBS" cat > conftest.$ac_ext <&6 else ac_save_LIBS="$LIBS" ! LIBS="-lkrb -ldes -lcom_err $LIBS" cat > conftest.$ac_ext <&6 ! KRB4_LIBS="-lkrb -ldes" else echo "$ac_t""no" 1>&6 { echo "configure: error: Kerberos 4 libraries not found" 1>&2; exit 1; } --- 3232,3238 ---- fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ! KRB4_LIBS="-lkrb -ldes -lcom_err" else echo "$ac_t""no" 1>&6 { echo "configure: error: Kerberos 4 libraries not found" 1>&2; exit 1; } --------------080803060008000808020708 Content-Type: text/plain; name="patch-kopt.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-kopt.c" *** server/kopt.c.orig Sat Jun 16 14:04:04 2001 --- server/kopt.c Sat Jun 16 14:14:57 2001 *************** *** 33,38 **** --- 33,51 ---- static int krbONE = 1; #define HOST_BYTE_ORDER (* (char *) &krbONE) + #ifndef K_FLAG_ORDER + #define K_FLAG_ORDER 0 /* bit 0 --> lsb */ + #endif + + #ifndef swap_u_long + #define swap_u_long(x) { \ + unsigned int _krb_swap_tmp[4]; \ + swab(((char *)&x) +0, ((char *)_krb_swap_tmp) +2, 2); \ + swab(((char *)&x) +2, ((char *)_krb_swap_tmp) +0, 2); \ + x = _krb_swap_tmp[0]; \ + } + #endif + #define KRB_PROT_VERSION 4 /* Message types , always leave lsb for byte order */ *************** *** 160,166 **** int krb_set_key(key,cvt) ! char *key; int cvt; { #ifdef NOENCRYPTION --- 173,179 ---- int krb_set_key(key,cvt) ! void *key; int cvt; { #ifdef NOENCRYPTION *************** *** 233,239 **** KTEXT authent; /* The received message */ char *service; /* Service name */ char *instance; /* Service instance */ ! unsigned KRB_INT32 from_addr; /* Net address of originating host */ AUTH_DAT *ad; /* Structure to be filled in */ char *fn; /* Filename to get keys from */ { --- 246,252 ---- KTEXT authent; /* The received message */ char *service; /* Service name */ char *instance; /* Service instance */ ! int32_t from_addr; /* Net address of originating host */ AUTH_DAT *ad; /* Structure to be filled in */ char *fn; /* Filename to get keys from */ { *************** *** 541,554 **** char *pname; /* Authentication name */ char *pinstance; /* Principal's instance */ char *prealm; /* Principal's authentication domain */ ! unsigned long *paddress; /* Net address of entity * requesting ticket */ C_Block session; /* Session key inserted in ticket */ int *life; /* Lifetime of the ticket */ ! unsigned long *time_sec; /* Issue time and date */ char *sname; /* Service name */ char *sinstance; /* Service instance */ ! C_Block key; /* Service's secret key * (to decrypt the ticket) */ des_key_schedule key_s; /* The precomputed key schedule */ { --- 554,567 ---- char *pname; /* Authentication name */ char *pinstance; /* Principal's instance */ char *prealm; /* Principal's authentication domain */ ! u_int32_t *paddress; /* Net address of entity * requesting ticket */ C_Block session; /* Session key inserted in ticket */ int *life; /* Lifetime of the ticket */ ! u_int32_t *time_sec; /* Issue time and date */ char *sname; /* Service name */ char *sinstance; /* Service instance */ ! des_cblock* key; /* Service's secret key * (to decrypt the ticket) */ des_key_schedule key_s; /* The precomputed key schedule */ { --------------080803060008000808020708 Content-Type: text/plain; name="patch-Makefile" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-Makefile" *** Makefile.orig Sat Jun 16 21:35:29 2001 --- Makefile Sat Jun 16 13:25:57 2001 *************** *** 18,24 **** USE_BISON= yes GNU_CONFIGURE= yes ! .if exists(/usr/lib/libkrb.a) && defined(MAKE_EBONES) CONFIGURE_ARGS="--with-krb4" .endif --- 18,24 ---- USE_BISON= yes GNU_CONFIGURE= yes ! .if exists(/usr/lib/libkrb.a) && defined(MAKE_KERBEROS4) CONFIGURE_ARGS="--with-krb4" .endif --------------080803060008000808020708 Content-Type: text/plain; name="patch-zserver.h" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-zserver.h" *** server/zserver.h.orig Sat Jun 16 21:02:37 2001 --- server/zserver.h Sat Jun 16 21:03:06 2001 *************** *** 255,263 **** #ifndef NOENCRYPTION Sched *check_key_sched_cache __P((des_cblock key)); void add_to_key_sched_cache __P((des_cblock key, Sched *sched)); ! int krb_set_key __P((char *key, int cvt)); int krb_rd_req __P((KTEXT authent, char *service, char *instance, ! unsigned KRB_INT32 from_addr, AUTH_DAT *ad, char *fn)); int krb_find_ticket __P((KTEXT authent, KTEXT ticket)); int krb_get_lrealm __P((char *r, int n)); #endif --- 255,263 ---- #ifndef NOENCRYPTION Sched *check_key_sched_cache __P((des_cblock key)); void add_to_key_sched_cache __P((des_cblock key, Sched *sched)); ! int krb_set_key __P((void *key, int cvt)); int krb_rd_req __P((KTEXT authent, char *service, char *instance, ! int32_t from_addr, AUTH_DAT *ad, char *fn)); int krb_find_ticket __P((KTEXT authent, KTEXT ticket)); int krb_get_lrealm __P((char *r, int n)); #endif --------------080803060008000808020708-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message