[3459] in Zephyr_Bugs

home help back first fref pref prev next nref lref last post

Patches for zephyr-20010518

daemon@ATHENA.MIT.EDU (Hubert Feyrer)
Thu Sep 18 21:45:09 2003

Date: Fri, 19 Sep 2003 03:45:04 +0200 (MEST)
From: Hubert Feyrer <hubert@feyrer.de>
Message-Id: <200309190145.h8J1j4222505@miyu.feyrer.net>
To: bug-zephyr@mit.edu

Hi!

below you will find some patches against zephyr-20010518 that are
currently part of the NetBSD Packages Collection, pkgsrc, to get your
software build properly on NetBSD and maybe some other platforms. We'd
be pleased if you could include as much of these patches into your next
release as possible, thanks!

FWIW, your software has a webpage at the NetBSD site, see

	http://www.NetBSD.org/packages/chat/zephyr/README.html

See http://www.NetBSD.org/Documentation/software/packages.html
to learn more about the NetBSD Packages Collection, to find out
more about the NetBSD operating system, see http://www.NetBSD.org/.


--- 8X --- 8X --- 8X --- 8X --- 8X --- 8X --- 8X --- 8X --- 8X --- 8X ---

$NetBSD: patch-aa,v 1.1.1.1 2003/09/16 19:41:50 seb Exp $

--- lib/Makefile.in.orig	Sat Jan 31 18:55:07 1998
+++ lib/Makefile.in
@@ -42,7 +42,7 @@ libzephyr.a: ${OBJS}
 
 zephyr_err.c ${BUILDTOP}/h/zephyr/zephyr_err.h: zephyr_err.et
 	compile_et ${srcdir}/zephyr_err.et
-	mv zephyr_err.h ${BUILDTOP}/h/zephyr
+	cp zephyr_err.h ${BUILDTOP}/h/zephyr
 
 .c.o:
 	${CC} -c ${ALL_CFLAGS} $<
$NetBSD: patch-ab,v 1.1.1.1 2003/09/16 19:41:50 seb Exp $

--- lib/ZMkAuth.c.orig	Fri Jan 22 18:19:16 1999
+++ lib/ZMkAuth.c
@@ -42,7 +42,9 @@ Code_t ZMakeAuthentication(notice, buffe
     char *cstart, *cend;
     ZChecksum_t checksum;
     CREDENTIALS cred;
-    extern unsigned long des_quad_cksum();
+#ifdef ERROR_TABLE_BASE_krb
+#define krb_err_base ERROR_TABLE_BASE_krb
+#endif
 
     now = time(0);
     if (last_authent_time == 0 || (now - last_authent_time > 120)) {
$NetBSD: patch-ac,v 1.1.1.1 2003/09/16 19:41:50 seb Exp $

--- clients/zctl/zctl.c.orig	Thu Aug 12 20:19:38 1999
+++ clients/zctl/zctl.c
@@ -12,7 +12,7 @@
 
 #include <sysdep.h>
 #include <zephyr/zephyr.h>
-#include <ss/ss.h>
+#include <ss.h>
 #include <com_err.h>
 #include <pwd.h>
 #include <netdb.h>
$NetBSD: patch-ad,v 1.1.1.1 2003/09/16 19:41:50 seb Exp $

--- server/zserver.h.orig	Mon Feb 26 23:58:14 2001
+++ server/zserver.h
@@ -268,9 +268,9 @@ void sweep_ticket_hash_table __P((void *
 #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_set_key __P((void *key, int cvt));
 int krb_rd_req __P((KTEXT authent, char *service, char *instance,
-		    unsigned KRB_INT32 from_addr, AUTH_DAT *ad, char *fn));
+		    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
$NetBSD: patch-ae,v 1.1.1.1 2003/09/16 19:41:50 seb Exp $

--- server/kopt.c.orig	Mon Feb 26 23:48:01 2001
+++ server/kopt.c
@@ -161,7 +161,7 @@ void add_to_key_sched_cache(key, sched)
 
 int
 krb_set_key(key,cvt)
-    char *key;
+    void *key;
     int cvt;
 {
 #ifdef NOENCRYPTION
@@ -172,7 +172,7 @@ krb_set_key(key,cvt)
     int ret;
 
     if (cvt)
-	string_to_key(key,serv_key);
+	string_to_key((char *)key,serv_key);
     else
 	memcpy((char *)serv_key,key,8);
 
@@ -187,6 +187,14 @@ krb_set_key(key,cvt)
 #endif /* NOENCRYPTION */
 }
 
+static u_long
+swap_u_long(u_long x)
+{
+	return ((x & 0xff000000) >> 24) |
+	    ((x & 0x00ff0000) >> 8) |
+	    ((x & 0x0000ff00) << 8) |
+	    ((x & 0x000000ff) << 24);
+}
 
 /*
  * krb_rd_req() takes an AUTH_MSG_APPL_REQUEST or
@@ -234,7 +242,7 @@ krb_rd_req(authent,service,instance,from
     KTEXT authent;			/* The received message */
     char *service;			/* Service name */
     char *instance;			/* Service instance */
-    unsigned KRB_INT32 from_addr;	/* Net address of originating host */
+    KRB_INT32 from_addr;		/* Net address of originating host */
     AUTH_DAT *ad;			/* Structure to be filled in */
     char *fn;				/* Filename to get keys from */
 {
$NetBSD: patch-af,v 1.1.1.1 2003/09/16 19:41:50 seb Exp $

--- server/kstuff.c.orig	Tue Apr 10 19:28:20 2001
+++ server/kstuff.c
@@ -124,6 +124,9 @@ SendKerberosData(fd, ticket, service, ho
     char p[32];
     int written;
     int size_to_write;
+#ifdef ERROR_TABLE_BASE_krb
+#define krb_err_base ERROR_TABLE_BASE_krb
+#endif
 
     rem = krb_mk_req(ticket, service, host, ZGetRealm(), (u_long) 0);
     if (rem != KSUCCESS)
$NetBSD: patch-ag,v 1.1.1.1 2003/09/16 19:41:50 seb Exp $

--- server/realm.c.orig	2001-02-27 05:51:07.000000000 +0100
+++ server/realm.c
@@ -498,7 +498,7 @@ realm_init()
     char list_file[128];
     char rlmprinc[ANAME_SZ+INST_SZ+REALM_SZ+3];
 
-    sprintf(list_file, "%s/zephyr/%s", SYSCONFDIR, REALM_LIST_FILE);
+    sprintf(list_file, "%s/%s", SYSCONFDIR, REALM_LIST_FILE);
     rlmnames = get_realm_lists(list_file);
     if (!rlmnames) {
 	zdbug((LOG_DEBUG, "No other realms"));
@@ -1096,6 +1096,10 @@ realm_dump_realms(fp)
 }
 
 #ifdef HAVE_KRB4
+#ifdef ERROR_TABLE_BASE_krb
+#define krb_err_base ERROR_TABLE_BASE_krb
+#endif
+
 static void
 realm_sendit_auth(notice, who, auth, realm, ack_to_sender)
     ZNotice_t *notice;
$NetBSD: patch-ah,v 1.1.1.1 2003/09/16 19:41:50 seb Exp $

--- zhm/zhm.c.orig	Fri May 19 19:19:21 2000
+++ zhm/zhm.c
@@ -22,7 +22,9 @@ int use_hesiod = 0;
 #define srandom srand48
 #endif
 
-#define PIDDIR "/var/athena/"
+#ifndef PIDDIR
+#define PIDDIR "/var/run/"
+#endif
 
 int hmdebug, rebootflag, noflushflag, errflg, dieflag, inetd, oldpid, nofork;
 int no_server = 1, nservchang, nserv, nclt;
$NetBSD: patch-ai,v 1.1.1.1 2003/09/16 19:41:50 seb Exp $

--- Makefile.in.orig	1998-06-11 21:10:02.000000000 +0200
+++ Makefile.in
@@ -31,8 +31,6 @@ install:
 	${ENSUREDIR} ${DESTDIR}${libdir} 755
 	${ENSUREDIR} ${DESTDIR}${datadir} 755
 	${ENSUREDIR} ${DESTDIR}${datadir}/zephyr 755
-	${ENSUREDIR} ${DESTDIR}${sysconfdir} 755
-	${ENSUREDIR} ${DESTDIR}${sysconfdir}/zephyr/acl 755
 	${ENSUREDIR} ${DESTDIR}${sbindir} 755
 	${ENSUREDIR} ${DESTDIR}${includedir} 755
 	${ENSUREDIR} ${DESTDIR}${includedir}/zephyr 755
$NetBSD: patch-aj,v 1.1.1.1 2003/09/16 19:41:50 seb Exp $

--- server/main.c.orig	2001-02-27 05:50:08.000000000 +0100
+++ server/main.c
@@ -140,14 +140,14 @@ main(argc, argv)
     extern int optind;
 
 #ifndef HAVE_HESIOD
-    sprintf(list_file, "%s/zephyr/%s", SYSCONFDIR, SERVER_LIST_FILE);
+    sprintf(list_file, "%s/%s", SYSCONFDIR, SERVER_LIST_FILE);
 #endif
 #ifdef HAVE_KRB4
-    sprintf(srvtab_file, "%s/zephyr/%s", SYSCONFDIR, ZEPHYR_SRVTAB);
-    sprintf(tkt_file, "%s/zephyr/%s", SYSCONFDIR, ZEPHYR_TKFILE);
+    sprintf(srvtab_file, "%s/%s", SYSCONFDIR, ZEPHYR_SRVTAB);
+    sprintf(tkt_file, "%s/%s", SYSCONFDIR, ZEPHYR_TKFILE);
 #endif
-    sprintf(acl_dir, "%s/zephyr/%s", SYSCONFDIR, ZEPHYR_ACL_DIR);
-    sprintf(subs_file, "%s/zephyr/%s", SYSCONFDIR, DEFAULT_SUBS_FILE);
+    sprintf(acl_dir, "%s/%s", SYSCONFDIR, ZEPHYR_ACL_DIR);
+    sprintf(subs_file, "%s/%s", SYSCONFDIR, DEFAULT_SUBS_FILE);
 
     /* set name */
     programname = strrchr(argv[0],'/');
$NetBSD: patch-ak,v 1.1.1.1 2003/09/16 19:41:50 seb Exp $

--- server/Makefile.in.orig	2003-07-29 20:46:05.000000000 +0200
+++ server/Makefile.in
@@ -52,7 +52,7 @@ install:
 	${INSTALL} -m 755 -s zephyrd ${DESTDIR}${sbindir}
 	${INSTALL} -m 644 ${srcdir}/zephyrd.8 ${DESTDIR}${mandir}/man8
 	${INSTALL} -m 644 ${srcdir}/default.subscriptions \
-		${DESTDIR}${sysconfdir}/zephyr
+		${DESTDIR}${datadir}/examples/zephyr
 
 clean:
 	rm -f ${OBJS} zephyrd zsrv_err.[ch]

home help back first fref pref prev next nref lref last post