This is patch #1 to the Zephyr sources. Besides this patch, you also want to pick up the file src.zwgc.zwgc.el, and place it into src/zwgc/zwgc.el (replacing the existing contents) [this isn't done via patch because the old version has control characters in it]. BE SURE TO APPLY THIS PATCH WITH patch -p TO PRESERVE THE DIRECTORY HIERARCHY. CHANGES in this patch file: - null-pointer bug fixes in zephyrd code and library code - zaway now ignores PING messages - zshutdown_notify sends messages authenticated (if possible) - Imakefile fixes for lib/ - lint fix for lib/strcasecmp.c - Imake.rules fixes for install steps, ranlib steps - lint library flag is now configurable in config.Imakefile - updated Kerberos error code table - updated manual page for reverse stacking option on zwgc(1) - move version ID of server to separate file - turn on keepalive in server brain-dumps - ICCCM-compliant window restack request code for zwgc NOTE: Due to some changes in config/config.Imakefile, I recommend that you recopy this file into any configurations you have build and re-edit it with your local changes. You will want to re-build your entire source tree with 'make world' after applying this patchlevel. Prereq: 0 diff -rc src/patchlevel.h /mit/zephyr/src/patchlevel.h *** patchlevel0/patchlevel.h Thu Apr 20 11:01:29 1989 --- src/patchlevel.h Tue Oct 17 16:14:00 1989 *************** *** 1 **** ! #define PATCHLEVEL 0 --- 1 ---- ! #define PATCHLEVEL 1 diff -rc src/clients/zaway/zaway.c /mit/zephyr/src/clients/zaway/zaway.c *** patchlevel0/clients/zaway/zaway.c Mon Dec 5 16:31:38 1988 --- src/clients/zaway/zaway.c Wed Sep 6 15:06:26 1989 *************** *** 3,9 **** * * Created by: Robert French * ! * $Source: /mit/zephyr/src/clients/zaway/RCS/zaway.c,v $ * $Author: jtkohl $ * * Copyright (c) 1987,1988 by the Massachusetts Institute of Technology. --- 3,9 ---- * * Created by: Robert French * ! * $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/clients/zaway/RCS/zaway.c,v $ * $Author: jtkohl $ * * Copyright (c) 1987,1988 by the Massachusetts Institute of Technology. *************** *** 20,26 **** #include #ifndef lint ! static char rcsid_zaway_c[] = "$Header: zaway.c,v 1.6 88/12/05 16:31:25 jtkohl Exp $"; #endif lint #define MESSAGE_CLASS "MESSAGE" --- 20,26 ---- #include #ifndef lint ! static char rcsid_zaway_c[] = "$Header: /afs/athena.mit.edu/astaff/project/zephyr/src/clients/zaway/RCS/zaway.c,v 1.7 89/09/06 15:06:16 jtkohl Exp $"; #endif lint #define MESSAGE_CLASS "MESSAGE" *************** *** 99,111 **** com_err(argv[0],retval,"while receiving notice"); continue; } ! if (!strcmp(notice.z_sender,ZGetSender())) ! continue; ! if (!strcmp(notice.z_message,"Automated reply:")) ! continue; if (fp) { ! if (!(ptr = find_message(¬ice,fp))) continue; } else { ptr = malloc(sizeof(DEFAULT_MSG)+1); --- 99,117 ---- com_err(argv[0],retval,"while receiving notice"); continue; } ! ! if (strcmp(notice.z_sender,ZGetSender()) == 0 || ! strcmp(notice.z_opcode,"PING") == 0 || ! strcmp(notice.z_message,"Automated reply:") == 0) { ! ZFreeNotice(¬ice); ! continue; ! } ! if (fp) { ! if (!(ptr = find_message(¬ice,fp))) { ! ZFreeNotice(¬ice); continue; + } } else { ptr = malloc(sizeof(DEFAULT_MSG)+1); *************** *** 125,131 **** notice.z_message_len = strlen(notice.z_message)+1; if ((retval = ZSendList(¬ice,msg,2,ZNOAUTH)) != ZERR_NONE) { com_err(argv[0],retval,"while sending notice"); - continue; } free(ptr); ZFreeNotice(¬ice); --- 131,136 ---- diff -rc src/clients/zshutdown_notify/zshutdown_notify.c /mit/zephyr/src/clients/zshutdown_notify/zshutdown_notify.c *** patchlevel0/clients/zshutdown_notify/zshutdown_notify.c Tue Jun 28 16:19:43 1988 --- src/clients/zshutdown_notify/zshutdown_notify.c Fri Jul 28 16:38:39 1989 *************** *** 4,10 **** * * Created by: C. Anthony Della Fera * ! * $Source: /mit/zephyr/src/clients/zshutdown_notify/RCS/zshutdown_notify.c,v $ * $Author: jtkohl $ * * Copyright (c) 1987 by the Massachusetts Institute of Technology. --- 4,10 ---- * * Created by: C. Anthony Della Fera * ! * $Source: /afs/athena.mit.edu/mit/zephyr/src/clients/zshutdown_notify/RCS/zshutdown_notify.c,v $ * $Author: jtkohl $ * * Copyright (c) 1987 by the Massachusetts Institute of Technology. *************** *** 23,29 **** #ifndef lint #ifndef SABER ! static char *rcsid_zshutdown_notify_c = "$Header: zshutdown_notify.c,v 1.5 88/06/28 16:19:34 jtkohl Exp $"; #endif SABER #endif lint --- 23,29 ---- #ifndef lint #ifndef SABER ! static char *rcsid_zshutdown_notify_c = "$Header: /afs/athena.mit.edu/mit/zephyr/src/clients/zshutdown_notify/RCS/zshutdown_notify.c,v 1.6 89/07/28 16:38:24 jtkohl Exp $"; #endif SABER #endif lint *************** *** 30,38 **** #define N_KIND UNSAFE #define N_CLASS "FILSRV" #define N_OPCODE "SHUTDOWN" ! #define N_DEF_FORMAT "@bold(Shutdown message from $1 at $time)\n@center(System going down, message is:)\n\n$2\n\n@center(@bold($3))" #define N_FIELD_CNT 3 /* * Standard warning strings appended as extra fields to * the message body. --- 30,42 ---- #define N_KIND UNSAFE #define N_CLASS "FILSRV" #define N_OPCODE "SHUTDOWN" ! #define N_DEF_FORMAT "From $sender:\n@bold(Shutdown message from $1 at $time)\n@center(System going down, message is:)\n\n$2\n\n@center(@bold($3))" #define N_FIELD_CNT 3 + #ifdef KERBEROS + #define SVC_NAME "rcmd" + #endif + /* * Standard warning strings appended as extra fields to * the message body. *************** *** 51,56 **** --- 55,67 ---- char hostname[MAXHOSTNAMELEN]; char msgbuff[BUFSIZ], message[Z_MAXPKTLEN], *ptr; char *msg[N_FIELD_CNT]; + #ifdef KERBEROS + char tkt_filename[MAXPATHLEN]; + char rlm[REALM_SZ]; + char hn2[MAXHOSTNAMELEN]; + char *cp; + extern char *krb_get_phost(); + #endif msg[0] = hostname; msg[1] = message; *************** *** 69,74 **** --- 80,110 ---- if ((hp = gethostbyname(hostname)) != NULL) (void) strcpy(hostname, hp->h_name); + #ifdef KERBEROS + (void) sprintf(tkt_filename, "/tmp/tkt_zshut_%d", getpid()); + krb_set_tkt_string(tkt_filename); + + cp = krb_get_phost(hostname); + if (cp) + (void) strcpy(hn2, cp); + else { + fprintf(stderr, "%s: can't figure out canonical hostname\n",argv[0]); + exit(1); + } + if (retval = krb_get_lrealm(rlm, 1)) { + fprintf(stderr, "%s: can't get local realm: %s\n", + argv[0], krb_err_txt[retval]); + exit(1); + } + if (retval = krb_get_svc_in_tkt(SVC_NAME, hn2, rlm, + SERVER_SERVICE, SERVER_INSTANCE, 1, + KEYFILE)) { + fprintf(stderr, "%s: can't get tickets: %s\n", + argv[0], krb_err_txt[retval]); + exit(1); + } + #endif + ptr = message; for (;;) { *************** *** 93,100 **** notice.z_recipient = ""; notice.z_default_format = N_DEF_FORMAT; ! if ((retval = ZSendList(¬ice, msg, N_FIELD_CNT, ZNOAUTH)) != ZERR_NONE) { com_err(argv[0], retval, "while sending notice"); exit(1); } } --- 129,142 ---- notice.z_recipient = ""; notice.z_default_format = N_DEF_FORMAT; ! if ((retval = ZSendList(¬ice, msg, N_FIELD_CNT, ZAUTH)) != ZERR_NONE) { com_err(argv[0], retval, "while sending notice"); + #ifdef KERBEROS + (void) dest_tkt(); + #endif exit(1); } + #ifdef KERBEROS + (void) dest_tkt(); + #endif } diff -rc src/config/Imake.rules /mit/zephyr/src/config/Imake.rules *** patchlevel0/config/Imake.rules Wed May 31 11:30:28 1989 --- src/config/Imake.rules Tue Jul 25 13:39:24 1989 *************** *** 3,11 **** /**/# For copying and distribution information, see the file /**/# "mit-copyright.h". /**/# ! /**/# $Source: /mit/zephyr/src/config/RCS/Imake.rules,v $ /**/# $Author: jtkohl $ ! /**/# $Header: Imake.rules,v 1.14 89/05/31 11:30:00 jtkohl Exp $ /**/# #ifdef __STDC__ --- 3,11 ---- /**/# For copying and distribution information, see the file /**/# "mit-copyright.h". /**/# ! /**/# $Source: /afs/athena.mit.edu/mit/zephyr/src/config/RCS/Imake.rules,v $ /**/# $Author: jtkohl $ ! /**/# $Header: Imake.rules,v 1.17 89/07/25 13:39:18 jtkohl Exp $ /**/# #ifdef __STDC__ *************** *** 95,101 **** lint:: concat3(llib-l,libname,.ln) @@\ @@\ concat3(llib-l,libname,.ln):: srcs @@\ ! $(LINT) concat(-C,libname) $(LINTFLAGS) srcs lintlibs @@\ @@\ clean:: @@\ $(RM) concat3(lib,libname,.a) concat3(lib,libname,_p.a) @@\ --- 95,101 ---- lint:: concat3(llib-l,libname,.ln) @@\ @@\ concat3(llib-l,libname,.ln):: srcs @@\ ! $(LINT) concat($(LINTLIBFLAG),libname) $(LINTFLAGS) srcs lintlibs @@\ @@\ clean:: @@\ $(RM) concat3(lib,libname,.a) concat3(lib,libname,_p.a) @@\ *************** *** 104,114 **** $(RM) profiled/?*.o @@\ @@\ install:: @@\ ! $(INSTALLRAW) -m 644 concat3(lib,libname,.a) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\ ! $(RANLIB) -t concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\ $(CHMOD) 444 concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\ ! $(INSTALLRAW) -m 644 concat3(lib,libname,_p.a) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,_p.a) @@\ ! $(RANLIB) -t concat4($(DESTDIR)$(LIBDIR)/,lib,libname,_p.a) @@\ $(CHMOD) 444 concat4($(DESTDIR)$(LIBDIR)/,lib,libname,_p.a) @@\ $(INSTALLFILE) concat3(llib-l,libname,.ln) concat4($(DESTDIR)$(LINTLIBDIR)/,llib-l,libname,.ln) #else /* !PROFILED_LIBS */ --- 104,114 ---- $(RM) profiled/?*.o @@\ @@\ install:: @@\ ! $(INSTALLRAW) -c -m 644 concat3(lib,libname,.a) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\ ! $(RANLIB) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\ $(CHMOD) 444 concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\ ! $(INSTALLRAW) -c -m 644 concat3(lib,libname,_p.a) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,_p.a) @@\ ! $(RANLIB) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,_p.a) @@\ $(CHMOD) 444 concat4($(DESTDIR)$(LIBDIR)/,lib,libname,_p.a) @@\ $(INSTALLFILE) concat3(llib-l,libname,.ln) concat4($(DESTDIR)$(LINTLIBDIR)/,llib-l,libname,.ln) #else /* !PROFILED_LIBS */ *************** *** 125,131 **** lint:: concat3(llib-l,libname,.ln) @@\ @@\ concat3(llib-l,libname,.ln):: srcs @@\ ! $(LINT) concat(-C,libname) $(LINTFLAGS) srcs lintlibs @@\ @@\ clean:: @@\ $(RM) concat3(lib,libname,.a) @@\ --- 125,131 ---- lint:: concat3(llib-l,libname,.ln) @@\ @@\ concat3(llib-l,libname,.ln):: srcs @@\ ! $(LINT) concat($(LINTLIBFLAG),libname) $(LINTFLAGS) srcs lintlibs @@\ @@\ clean:: @@\ $(RM) concat3(lib,libname,.a) @@\ *************** *** 133,140 **** $(RM) objs @@\ @@\ install:: @@\ ! $(INSTALLRAW) -m 644 concat3(lib,libname,.a) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\ ! $(RANLIB) -t concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\ $(CHMOD) 444 concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\ $(INSTALLFILE) concat3(llib-l,libname,.ln) concat4($(DESTDIR)$(LINTLIBDIR)/,llib-l,libname,.ln) #endif /* PROFILED_LIBS */ --- 133,140 ---- $(RM) objs @@\ @@\ install:: @@\ ! $(INSTALLRAW) -c -m 644 concat3(lib,libname,.a) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\ ! $(RANLIB) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\ $(CHMOD) 444 concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\ $(INSTALLFILE) concat3(llib-l,libname,.ln) concat4($(DESTDIR)$(LINTLIBDIR)/,llib-l,libname,.ln) #endif /* PROFILED_LIBS */ *************** *** 253,259 **** #define depend_target() @@\ depend:: $(CODE) @@\ @echo "### Now computing dependencies" @@\ ! @$(DEPEND) -s "# DO NOT DELETE" $(CFLAGS) $(SRCS) #define clean_target() @@\ clean:: @@\ --- 253,259 ---- #define depend_target() @@\ depend:: $(CODE) @@\ @echo "### Now computing dependencies" @@\ ! @$(DEPEND) -s "# DO NOT DELETE" -- $(CFLAGS) -- $(SRCS) #define clean_target() @@\ clean:: @@\ diff -rc src/config/config.Imakefile /mit/zephyr/src/config/config.Imakefile *** patchlevel0/config/config.Imakefile Tue May 30 23:29:51 1989 --- src/config/config.Imakefile Tue Aug 29 17:04:08 1989 *************** *** 3,11 **** /**/# For copying and distribution information, see the file /**/# "mit-copyright.h". /**/# ! /**/# $Source: /mit/zephyr/src/config/RCS/config.Imakefile,v $ /**/# $Author: jtkohl $ ! /**/# $Header: config.Imakefile,v 1.13 89/05/30 23:29:32 jtkohl Exp $ /**/# /* --- 3,11 ---- /**/# For copying and distribution information, see the file /**/# "mit-copyright.h". /**/# ! /**/# $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/config/RCS/config.Imakefile,v $ /**/# $Author: jtkohl $ ! /**/# $Header: /afs/athena.mit.edu/astaff/project/zephyr/src/config/RCS/config.Imakefile,v 1.17 89/08/29 17:03:56 jtkohl Exp $ /**/# /* *************** *** 15,21 **** /* XXX BEGIN LIKELY SITE-SPECIFIC CONFIGURATION XXX */ /* This should be set to the root of your Zephyr source tree */ ! SRCTOP=/mit/zephyr/src /* IMAKE names the command to be used to build Makefiles from Imakefiles. If you have Imake installed somewhere else, --- 15,21 ---- /* XXX BEGIN LIKELY SITE-SPECIFIC CONFIGURATION XXX */ /* This should be set to the root of your Zephyr source tree */ ! SRCTOP=/afs/athena.mit.edu/astaff/project/zephyr/src /* IMAKE names the command to be used to build Makefiles from Imakefiles. If you have Imake installed somewhere else, *************** *** 119,124 **** --- 119,130 ---- LINTLIBDIR= /usr/lib/lint MANDIR=/usr/man ACLDIR=/usr/athena/lib/zephyr + + /* + * LINTLIBFLAG should be the flag used to tell lint to create a lint + * library. On most BSD systems, this is -C + */ + LINTLIBFLAG=-C /* XXX END LIKELY SITE-SPECIFIC CONFIGURATION XXX */ diff -rc src/lib/Imakefile /mit/zephyr/src/lib/Imakefile *** patchlevel0/lib/Imakefile Wed May 31 10:17:57 1989 --- src/lib/Imakefile Tue Jul 25 13:40:30 1989 *************** *** 3,11 **** /**/# For copying and distribution information, see the file /**/# "mit-copyright.h". /**/# ! /**/# $Source: /mit/zephyr/src/lib/RCS/Imakefile,v $ /**/# $Author: jtkohl $ ! /**/# $Header: Imakefile,v 1.5 89/05/31 10:17:40 jtkohl Exp $ /**/# #define no_curdir_lint --- 3,11 ---- /**/# For copying and distribution information, see the file /**/# "mit-copyright.h". /**/# ! /**/# $Source: /afs/athena.mit.edu/mit/zephyr/src/lib/RCS/Imakefile,v $ /**/# $Author: jtkohl $ ! /**/# $Header: Imakefile,v 1.7 89/07/25 13:40:27 jtkohl Exp $ /**/# #define no_curdir_lint *************** *** 68,74 **** ZSubscriptions.c \ ZVariables.c \ Zinternal.c \ ! acl_files.c #ifdef KERBEROS OLIST= \ --- 68,75 ---- ZSubscriptions.c \ ZVariables.c \ Zinternal.c \ ! acl_files.c \ ! strcasecmp.c #ifdef KERBEROS OLIST= \ *************** *** 202,211 **** all:: $(RM) ../libs/libzephyr.a ../libs/libzephyr_p.a $(CP) libzephyr.a ../libs/libzephyr.a ! $(RANLIB) -t ../libs/libzephyr.a #ifdef PROFILED_LIBS $(CP) libzephyr_p.a ../libs/libzephyr_p.a ! $(RANLIB) -t ../libs/libzephyr_p.a #endif --- 203,212 ---- all:: $(RM) ../libs/libzephyr.a ../libs/libzephyr_p.a $(CP) libzephyr.a ../libs/libzephyr.a ! $(RANLIB) ../libs/libzephyr.a #ifdef PROFILED_LIBS $(CP) libzephyr_p.a ../libs/libzephyr_p.a ! $(RANLIB) ../libs/libzephyr_p.a #endif diff -rc src/lib/ZMakeAuthentication.c /mit/zephyr/src/lib/ZMakeAuthentication.c *** patchlevel0/lib/ZMakeAuthentication.c Thu May 25 16:09:52 1989 --- src/lib/ZMakeAuthentication.c Mon Oct 2 08:38:24 1989 *************** *** 10,19 **** * For copying and distribution information, see the file * "mit-copyright.h". */ ! /* $Header: ZMakeAuthentication.c,v 1.7 89/05/25 16:09:37 jtkohl Exp $ */ #ifndef lint ! static char rcsid_ZMakeAuthentication_c[] = "$Header: ZMakeAuthentication.c,v 1.7 89/05/25 16:09:37 jtkohl Exp $"; #endif lint #include --- 10,19 ---- * For copying and distribution information, see the file * "mit-copyright.h". */ ! /* $Id: ZMakeAuthentication.c,v 1.9 89/10/02 08:38:23 jtkohl Exp $ */ #ifndef lint ! static char rcsid_ZMakeAuthentication_c[] = "$Id: ZMakeAuthentication.c,v 1.9 89/10/02 08:38:23 jtkohl Exp $"; #endif lint #include *************** *** 56,61 **** --- 56,62 ---- #else notice->z_auth = 1; notice->z_authent_len = 0; + notice->z_ascii_authent = ""; return (Z_FormatRawHeader(notice, buffer, buffer_len, len, (char **) 0)); #endif } diff -rc src/lib/krb_err.et /mit/zephyr/src/lib/krb_err.et *** patchlevel0/lib/krb_err.et Tue Aug 2 09:35:06 1988 --- src/lib/krb_err.et Tue Oct 10 15:23:17 1989 *************** *** 3,258 **** # For copying and distribution information, see the file # "mit-copyright.h". # ! # $Source: /mit/zephyr/src/lib/RCS/krb_err.et,v $ # $Author: jtkohl $ ! # $Header: krb_err.et,v 1.3 88/08/02 09:34:55 jtkohl Exp $ # error_table krb ! ec KSUCCESS, "Kerberos successful" ! ec KDC_NAME_EXP, "Kerberos principal expired" ! ec KDC_SERVICE_EXP, "Kerberos service expired" ! ec KDC_AUTH_EXP, "Kerberos auth expired" ! ec KDC_PKT_VER, "Incorrect kerberos master key version" ! ec KDC_P_MKEY_VER, "Incorrect kerberos master key version" ! ec KDC_S_MKEY_VER, "Incorrect kerberos master key version" ! ec KDC_BYTE_ORDER, "Kerberos error: byte order unknown" ! ec KDC_PR_UNKNOWN, "Kerberos principal unknown" ! ec KDC_PR_N_UNIQUE, "Kerberos principal not unique" ! ec KDC_NULL_KEY, "Kerberos principal has null key" ! ec KRB_RES11, "Reserved 11" ! ec KRB_RES12, "Reserved 12" ! ec KRB_RES13, "Reserved 13" ! ec KRB_RES14, "Reserved 14" ! ec KRB_RES15, "Reserved 15" ! ec KRB_RES16, "Reserved 16" ! ec KRB_RES17, "Reserved 17" ! ec KRB_RES18, "Reserved 18" ! ec KRB_RES19, "Reserved 19" ! ec KDC_GEN_ERR, "Generic error from Kerberos KDC" ! ec GC_TKFIL, "Can't read Kerberos ticket file" ! ec GC_NOTKT, "Can't find Kerberos ticket or TGT" ! ec KRB_RES23, "Reserved 23" ! ec KRB_RES24, "Reserved 24" ! ec KRB_RES25, "Reserved 25" ! ec MK_AP_TGTEXP, "Kerberos TGT Expired" ! ec KRB_RES27, "Reserved 27" ! ec KRB_RES28, "Reserved 28" ! ec KRB_RES29, "Reserved 29" ! ec KRB_RES30, "Reserved 30" ! ec RD_AP_UNDEC, "Kerberos error: Can't decode authenticator" ! ec RD_AP_EXP, "Kerberos ticket expired" ! ec RD_AP_NYV, "Kerberos ticket not yet valid" ! ec RD_AP_REPEAT, "Kerberos error: Repeated request" ! ec RD_AP_NOT_US, "The kerberos ticket isn't for us" ! ec RD_AP_INCON, "Kerberos request inconsistent" ! ec RD_AP_TIME, "Kerberos error: delta_t too big" ! ec RD_AP_BADD, "Kerberos error: incorrect net address" ! ec RD_AP_VERSION, "Kerberos protocol version mismatch" ! ec RD_AP_MSG_TYPE, "Kerberos error: invalid msg type" ! ec RD_AP_MODIFIED, "Kerberos error: message stream modified" ! ec RD_AP_ORDER, "Kerberos error: message out of order" ! ec RD_AP_UNAUTHOR, "Kerberos error: unauthorized request" ! ec KRB_RES44, "Reserved 44" ! ec KRB_RES45, "Reserved 45" ! ec KRB_RES46, "Reserved 46" ! ec KRB_RES47, "Reserved 47" ! ec KRB_RES48, "Reserved 48" ! ec KRB_RES49, "Reserved 49" ! ec KRB_RES50, "Reserved 50" ! ec GT_PW_NULL, "Kerberos error: current PW is null" ! ec GT_PW_BADPW, "Kerberos error: Incorrect current password" ! ec GT_PW_PROT, "Kerberos protocol error" ! ec GT_PW_KDCERR, "Error returned by Kerberos KDC" ! ec GT_PW_NULLTKT, "Null Kerberos ticket returned by KDC" ! ec SKDC_RETRY, "Kerberos error: Retry count exceeded" ! ec SKDC_CANT, "Kerberos error: Can't send request" ! ec KRB_RES58, "Reserved 58" ! ec KRB_RES59, "Reserved 59" ! ec KRB_RES60, "Reserved 60" ! ec INTK_W_NOTALL, "Kerberos error: not all tickets returned" ! ec INTK_BADPW, "Kerberos error: incorrect password" ! ec INTK_PROT, "Kerberos error: Protocol Error" ! ec KRB_RES64, "Reserved 64" ! ec KRB_RES65, "Reserved 65" ! ec KRB_RES66, "Reserved 66" ! ec KRB_RES67, "Reserved 67" ! ec KRB_RES68, "Reserved 68" ! ec KRB_RES69, "Reserved 69" ! ec INTK_ERR, "Other error" ! ec AD_NOTGT, "Don't have Kerberos ticket-granting ticket" ! ec KRB_RES72, "Reserved 72" ! ec KRB_RES73, "Reserved 73" ! ec KRB_RES74, "Reserved 74" ! ec KRB_RES75, "Reserved 75" ! ec NO_TKT_FIL, "No ticket file found" ! ec TKT_FIL_ACC, "Couldn't access ticket file" ! ec TKT_FIL_LCK, "Couldn't lock ticket file" ! ec TKT_FIL_FMT, "Bad ticket file format" ! ec TKT_FIL_INI, "tf_init not called first" ! ec KNAME_FMT, "Bad Kerberos name format" end --- 3,258 ---- # For copying and distribution information, see the file # "mit-copyright.h". # ! # $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/lib/RCS/krb_err.et,v $ # $Author: jtkohl $ ! # $Header: /afs/athena.mit.edu/astaff/project/zephyr/src/lib/RCS/krb_err.et,v 1.4 89/10/10 15:23:05 jtkohl Exp $ # error_table krb ! ec KRBET_KSUCCESS, "Kerberos successful" ! ec KRBET_KDC_NAME_EXP, "Kerberos principal expired" ! ec KRBET_KDC_SERVICE_EXP, "Kerberos service expired" ! ec KRBET_KDC_AUTH_EXP, "Kerberos auth expired" ! ec KRBET_KDC_PKT_VER, "Incorrect kerberos master key version" ! ec KRBET_KDC_P_MKEY_VER, "Incorrect kerberos master key version" ! ec KRBET_KDC_S_MKEY_VER, "Incorrect kerberos master key version" ! ec KRBET_KDC_BYTE_ORDER, "Kerberos error: byte order unknown" ! ec KRBET_KDC_PR_UNKNOWN, "Kerberos principal unknown" ! ec KRBET_KDC_PR_N_UNIQUE, "Kerberos principal not unique" ! ec KRBET_KDC_NULL_KEY, "Kerberos principal has null key" ! ec KRBET_KRB_RES11, "Reserved 11" ! ec KRBET_KRB_RES12, "Reserved 12" ! ec KRBET_KRB_RES13, "Reserved 13" ! ec KRBET_KRB_RES14, "Reserved 14" ! ec KRBET_KRB_RES15, "Reserved 15" ! ec KRBET_KRB_RES16, "Reserved 16" ! ec KRBET_KRB_RES17, "Reserved 17" ! ec KRBET_KRB_RES18, "Reserved 18" ! ec KRBET_KRB_RES19, "Reserved 19" ! ec KRBET_KDC_GEN_ERR, "Generic error from Kerberos KDC" ! ec KRBET_GC_TKFIL, "Can't read Kerberos ticket file" ! ec KRBET_GC_NOTKT, "Can't find Kerberos ticket or TGT" ! ec KRBET_KRB_RES23, "Reserved 23" ! ec KRBET_KRB_RES24, "Reserved 24" ! ec KRBET_KRB_RES25, "Reserved 25" ! ec KRBET_MK_AP_TGTEXP, "Kerberos TGT Expired" ! ec KRBET_KRB_RES27, "Reserved 27" ! ec KRBET_KRB_RES28, "Reserved 28" ! ec KRBET_KRB_RES29, "Reserved 29" ! ec KRBET_KRB_RES30, "Reserved 30" ! ec KRBET_RD_AP_UNDEC, "Kerberos error: Can't decode authenticator" ! ec KRBET_RD_AP_EXP, "Kerberos ticket expired" ! ec KRBET_RD_AP_NYV, "Kerberos ticket not yet valid" ! ec KRBET_RD_AP_REPEAT, "Kerberos error: Repeated request" ! ec KRBET_RD_AP_NOT_US, "The kerberos ticket isn't for us" ! ec KRBET_RD_AP_INCON, "Kerberos request inconsistent" ! ec KRBET_RD_AP_TIME, "Kerberos error: delta_t too big" ! ec KRBET_RD_AP_BADD, "Kerberos error: incorrect net address" ! ec KRBET_RD_AP_VERSION, "Kerberos protocol version mismatch" ! ec KRBET_RD_AP_MSG_TYPE, "Kerberos error: invalid msg type" ! ec KRBET_RD_AP_MODIFIED, "Kerberos error: message stream modified" ! ec KRBET_RD_AP_ORDER, "Kerberos error: message out of order" ! ec KRBET_RD_AP_UNAUTHOR, "Kerberos error: unauthorized request" ! ec KRBET_KRB_RES44, "Reserved 44" ! ec KRBET_KRB_RES45, "Reserved 45" ! ec KRBET_KRB_RES46, "Reserved 46" ! ec KRBET_KRB_RES47, "Reserved 47" ! ec KRBET_KRB_RES48, "Reserved 48" ! ec KRBET_KRB_RES49, "Reserved 49" ! ec KRBET_KRB_RES50, "Reserved 50" ! ec KRBET_GT_PW_NULL, "Kerberos error: current PW is null" ! ec KRBET_GT_PW_BADPW, "Kerberos error: Incorrect current password" ! ec KRBET_GT_PW_PROT, "Kerberos protocol error" ! ec KRBET_GT_PW_KDCERR, "Error returned by Kerberos KDC" ! ec KRBET_GT_PW_NULLTKT, "Null Kerberos ticket returned by KDC" ! ec KRBET_SKDC_RETRY, "Kerberos error: Retry count exceeded" ! ec KRBET_SKDC_CANT, "Kerberos error: Can't send request" ! ec KRBET_KRB_RES58, "Reserved 58" ! ec KRBET_KRB_RES59, "Reserved 59" ! ec KRBET_KRB_RES60, "Reserved 60" ! ec KRBET_INTK_W_NOTALL, "Kerberos error: not all tickets returned" ! ec KRBET_INTK_BADPW, "Kerberos error: incorrect password" ! ec KRBET_INTK_PROT, "Kerberos error: Protocol Error" ! ec KRBET_KRB_RES64, "Reserved 64" ! ec KRBET_KRB_RES65, "Reserved 65" ! ec KRBET_KRB_RES66, "Reserved 66" ! ec KRBET_KRB_RES67, "Reserved 67" ! ec KRBET_KRB_RES68, "Reserved 68" ! ec KRBET_KRB_RES69, "Reserved 69" ! ec KRBET_INTK_ERR, "Other error" ! ec KRBET_AD_NOTGT, "Don't have Kerberos ticket-granting ticket" ! ec KRBET_KRB_RES72, "Reserved 72" ! ec KRBET_KRB_RES73, "Reserved 73" ! ec KRBET_KRB_RES74, "Reserved 74" ! ec KRBET_KRB_RES75, "Reserved 75" ! ec KRBET_NO_TKT_FIL, "No ticket file found" ! ec KRBET_TKT_FIL_ACC, "Couldn't access ticket file" ! ec KRBET_TKT_FIL_LCK, "Couldn't lock ticket file" ! ec KRBET_TKT_FIL_FMT, "Bad ticket file format" ! ec KRBET_TKT_FIL_INI, "tf_init not called first" ! ec KRBET_KNAME_FMT, "Bad Kerberos name format" end diff -rc src/lib/krb_err.h /mit/zephyr/src/lib/krb_err.h *** patchlevel0/lib/krb_err.h Tue Jun 27 17:19:28 1989 --- src/lib/krb_err.h Tue Oct 17 16:24:28 1989 *************** *** 0 **** --- 1,92 ---- + /* + * krb_err.h: + * This file is automatically generated; please do not edit it. + */ + #define KRBET_KSUCCESS (39525376L) + #define KRBET_KDC_NAME_EXP (39525377L) + #define KRBET_KDC_SERVICE_EXP (39525378L) + #define KRBET_KDC_AUTH_EXP (39525379L) + #define KRBET_KDC_PKT_VER (39525380L) + #define KRBET_KDC_P_MKEY_VER (39525381L) + #define KRBET_KDC_S_MKEY_VER (39525382L) + #define KRBET_KDC_BYTE_ORDER (39525383L) + #define KRBET_KDC_PR_UNKNOWN (39525384L) + #define KRBET_KDC_PR_N_UNIQUE (39525385L) + #define KRBET_KDC_NULL_KEY (39525386L) + #define KRBET_KRB_RES11 (39525387L) + #define KRBET_KRB_RES12 (39525388L) + #define KRBET_KRB_RES13 (39525389L) + #define KRBET_KRB_RES14 (39525390L) + #define KRBET_KRB_RES15 (39525391L) + #define KRBET_KRB_RES16 (39525392L) + #define KRBET_KRB_RES17 (39525393L) + #define KRBET_KRB_RES18 (39525394L) + #define KRBET_KRB_RES19 (39525395L) + #define KRBET_KDC_GEN_ERR (39525396L) + #define KRBET_GC_TKFIL (39525397L) + #define KRBET_GC_NOTKT (39525398L) + #define KRBET_KRB_RES23 (39525399L) + #define KRBET_KRB_RES24 (39525400L) + #define KRBET_KRB_RES25 (39525401L) + #define KRBET_MK_AP_TGTEXP (39525402L) + #define KRBET_KRB_RES27 (39525403L) + #define KRBET_KRB_RES28 (39525404L) + #define KRBET_KRB_RES29 (39525405L) + #define KRBET_KRB_RES30 (39525406L) + #define KRBET_RD_AP_UNDEC (39525407L) + #define KRBET_RD_AP_EXP (39525408L) + #define KRBET_RD_AP_NYV (39525409L) + #define KRBET_RD_AP_REPEAT (39525410L) + #define KRBET_RD_AP_NOT_US (39525411L) + #define KRBET_RD_AP_INCON (39525412L) + #define KRBET_RD_AP_TIME (39525413L) + #define KRBET_RD_AP_BADD (39525414L) + #define KRBET_RD_AP_VERSION (39525415L) + #define KRBET_RD_AP_MSG_TYPE (39525416L) + #define KRBET_RD_AP_MODIFIED (39525417L) + #define KRBET_RD_AP_ORDER (39525418L) + #define KRBET_RD_AP_UNAUTHOR (39525419L) + #define KRBET_KRB_RES44 (39525420L) + #define KRBET_KRB_RES45 (39525421L) + #define KRBET_KRB_RES46 (39525422L) + #define KRBET_KRB_RES47 (39525423L) + #define KRBET_KRB_RES48 (39525424L) + #define KRBET_KRB_RES49 (39525425L) + #define KRBET_KRB_RES50 (39525426L) + #define KRBET_GT_PW_NULL (39525427L) + #define KRBET_GT_PW_BADPW (39525428L) + #define KRBET_GT_PW_PROT (39525429L) + #define KRBET_GT_PW_KDCERR (39525430L) + #define KRBET_GT_PW_NULLTKT (39525431L) + #define KRBET_SKDC_RETRY (39525432L) + #define KRBET_SKDC_CANT (39525433L) + #define KRBET_KRB_RES58 (39525434L) + #define KRBET_KRB_RES59 (39525435L) + #define KRBET_KRB_RES60 (39525436L) + #define KRBET_INTK_W_NOTALL (39525437L) + #define KRBET_INTK_BADPW (39525438L) + #define KRBET_INTK_PROT (39525439L) + #define KRBET_KRB_RES64 (39525440L) + #define KRBET_KRB_RES65 (39525441L) + #define KRBET_KRB_RES66 (39525442L) + #define KRBET_KRB_RES67 (39525443L) + #define KRBET_KRB_RES68 (39525444L) + #define KRBET_KRB_RES69 (39525445L) + #define KRBET_INTK_ERR (39525446L) + #define KRBET_AD_NOTGT (39525447L) + #define KRBET_KRB_RES72 (39525448L) + #define KRBET_KRB_RES73 (39525449L) + #define KRBET_KRB_RES74 (39525450L) + #define KRBET_KRB_RES75 (39525451L) + #define KRBET_NO_TKT_FIL (39525452L) + #define KRBET_TKT_FIL_ACC (39525453L) + #define KRBET_TKT_FIL_LCK (39525454L) + #define KRBET_TKT_FIL_FMT (39525455L) + #define KRBET_TKT_FIL_INI (39525456L) + #define KRBET_KNAME_FMT (39525457L) + extern void initialize_krb_error_table (); + #define ERROR_TABLE_BASE_krb (39525376L) + + /* for compatibility with older versions... */ + #define init_krb_err_tbl initialize_krb_error_table + #define krb_err_base ERROR_TABLE_BASE_krb diff -rc src/lib/strcasecmp.c /mit/zephyr/src/lib/strcasecmp.c *** patchlevel0/lib/strcasecmp.c Mon Nov 14 11:28:12 1988 --- src/lib/strcasecmp.c Tue Oct 17 16:15:50 1989 *************** *** 14,19 **** --- 14,23 ---- static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87"; #endif /* LIBC_SCCS and not lint */ + #ifdef lint + #include + #endif + /* * This array is designed for mapping upper and lower case letter * together for a case independent comparison. The mappings are diff -rc src/man/man1/zwgc.1 /mit/zephyr/src/man/man1/zwgc.1 *** patchlevel0/man/man1/zwgc.1 Wed May 10 10:19:47 1989 --- src/man/man1/zwgc.1 Thu Jul 20 14:40:06 1989 *************** *** 1,6 **** .\" $Source: /mit/zephyr/src/man/man1/RCS/zwgc.1,v $ .\" $Author: jtkohl $ ! .\" $Header: zwgc.1,v 1.14 89/05/10 10:19:33 jtkohl Exp $ .\" .\" Copyright 1987,1988 by the Massachusetts Institute of Technology .\" All rights reserved. The file /usr/include/zephyr/mit-copyright.h --- 1,6 ---- .\" $Source: /mit/zephyr/src/man/man1/RCS/zwgc.1,v $ .\" $Author: jtkohl $ ! .\" $Header: zwgc.1,v 1.15 89/07/20 14:39:35 jtkohl Exp $ .\" .\" Copyright 1987,1988 by the Massachusetts Institute of Technology .\" All rights reserved. The file /usr/include/zephyr/mit-copyright.h *************** *** 194,200 **** it is running on a terminal without window support. .TP $fromhost ! Returns the full name of the host that the notice was sent from. .TP $message Returns the message contained in the notice. --- 194,203 ---- it is running on a terminal without window support. .TP $fromhost ! Returns the full name of the host that the notice appears to have been ! sent from. This is not fully reliable, as the information used to ! determine this hostname is not guaranteed to be correct (even for ! authentic messages). .TP $message Returns the message contained in the notice. *************** *** 298,308 **** (logical) Force screen to unsave when a message first appears. [default True] .TP reverseStack ! (logical) Stack WindowGram windows such that the oldest messages ! normally show on top. This option only works correctly with X window ! managers that do not reparent top-level windows, and has some unusual ! interactions with other windows if the user manaully restacks either the ! other windows or the WindowGram windows. [default False] .TP name (string) window name [default "Zwgc"] --- 301,312 ---- (logical) Force screen to unsave when a message first appears. [default True] .TP reverseStack ! (logical) Attempt to stack WindowGram windows such that the oldest messages ! normally show on top. Some X window managers may silently ignore ! .IR zwgc 's ! attempts to restack its windows. This option can cause some unusual ! interactions with other windows if the user manually restacks either the ! other windows or the WindowGram windows. [default False] .TP name (string) window name [default "Zwgc"] diff -rc src/server/Imakefile /mit/zephyr/src/server/Imakefile *** patchlevel0/server/Imakefile Tue Apr 4 11:23:14 1989 --- src/server/Imakefile Mon Sep 18 14:24:35 1989 *************** *** 3,11 **** /**/# For copying and distribution information, see the file /**/# "mit-copyright.h". /**/# ! /**/# $Source: /mit/zephyr/src/server/RCS/Imakefile,v $ /**/# $Author: jtkohl $ ! /**/# $Header: Imakefile,v 1.5 89/04/04 11:22:55 jtkohl Exp $ /**/# #if defined(DO_SYSLOG) && defined(SYSLOG_COMPAT42) --- 3,11 ---- /**/# For copying and distribution information, see the file /**/# "mit-copyright.h". /**/# ! /**/# $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/Imakefile,v $ /**/# $Author: jtkohl $ ! /**/# $Header: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/Imakefile,v 1.6 89/09/18 14:24:28 jtkohl Exp $ /**/# #if defined(DO_SYSLOG) && defined(SYSLOG_COMPAT42) *************** *** 34,40 **** subscr.c \ timer.c \ uloc.c \ ! kstuff.c OBJS= zsrv_err.o \ access.o \ --- 34,41 ---- subscr.c \ timer.c \ uloc.c \ ! kstuff.c \ ! version.c OBJS= zsrv_err.o \ access.o \ *************** *** 49,55 **** subscr.o \ timer.o \ uloc.o \ ! kstuff.o OTHERSRCS= zsrv_err.et CONFIG_FILES= default.subscriptions --- 50,57 ---- subscr.o \ timer.o \ uloc.o \ ! kstuff.o \ ! version.c OTHERSRCS= zsrv_err.et CONFIG_FILES= default.subscriptions diff -rc src/server/bdump.c /mit/zephyr/src/server/bdump.c *** patchlevel0/server/bdump.c Thu May 4 17:36:28 1989 --- src/server/bdump.c Thu Aug 31 15:33:44 1989 *************** *** 3,9 **** * * Created by: John T. Kohl * ! * $Source: /mit/zephyr/src/server/RCS/bdump.c,v $ * $Author: jtkohl $ * * Copyright (c) 1987,1988 by the Massachusetts Institute of Technology. --- 3,9 ---- * * Created by: John T. Kohl * ! * $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/bdump.c,v $ * $Author: jtkohl $ * * Copyright (c) 1987,1988 by the Massachusetts Institute of Technology. *************** *** 15,21 **** #ifndef lint #ifndef SABER ! static char rcsid_bdump_c[] = "$Header: bdump.c,v 1.31 89/05/04 17:36:06 jtkohl Exp $"; #endif /* SABER */ #endif /* lint */ --- 15,21 ---- #ifndef lint #ifndef SABER ! static char rcsid_bdump_c[] = "$Header: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/bdump.c,v 1.32 89/08/31 15:33:35 jtkohl Exp $"; #endif /* SABER */ #endif /* lint */ *************** *** 173,178 **** --- 173,179 ---- Code_t retval; int fromlen = sizeof(from); int omask; + int on = 1; #ifdef KERBEROS KTEXT_ST ticket; AUTH_DAT kdata; *************** *** 187,192 **** --- 188,196 ---- syslog(LOG_ERR,"accept: %m"); return; } + if (setsockopt(live_socket, SOL_SOCKET, SO_KEEPALIVE, (char *)&on, + sizeof (on)) < 0) + syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %m"); #ifndef KERBEROS fromport = ntohs(from.sin_port); *************** *** 302,307 **** --- 306,312 ---- struct sockaddr_in from; Code_t retval; int omask; + int on = 1; #ifdef KERBEROS KTEXT_ST ticket; AUTH_DAT kdata; *************** *** 368,373 **** --- 373,381 ---- cleanup(server, omask); return; } + if (setsockopt(live_socket, SOL_SOCKET, SO_KEEPALIVE, (char *)&on, + sizeof (on)) < 0) + syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %m"); zdbug((LOG_DEBUG, "gbd connected")); /* Now begin the brain dump. */ diff -rc src/server/main.c /mit/zephyr/src/server/main.c *** patchlevel0/server/main.c Mon May 15 14:29:52 1989 --- src/server/main.c Mon Sep 18 14:23:37 1989 *************** *** 3,9 **** * * Created by: John T. Kohl * ! * $Source: /mit/zephyr/src/server/RCS/main.c,v $ * $Author: jtkohl $ * * Copyright (c) 1987,1988 by the Massachusetts Institute of Technology. --- 3,9 ---- * * Created by: John T. Kohl * ! * $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/main.c,v $ * $Author: jtkohl $ * * Copyright (c) 1987,1988 by the Massachusetts Institute of Technology. *************** *** 13,34 **** #include - #ifdef DEBUG - char version[] = "Zephyr Server (DEBUG) 3.10"; - #else - char version[] = "Zephyr Server 3.10"; - #endif DEBUG #ifndef lint #ifndef SABER ! static char rcsid_main_c[] = "$Header: main.c,v 1.37 89/05/15 14:29:42 jtkohl Exp $"; ! char copyright[] = "Copyright (c) 1987,1988 Massachusetts Institute of Technology.\n"; ! #ifdef CONCURRENT ! char concurrent[] = "Brain-dump concurrency enabled"; ! #else ! char concurrent[] = "no brain-dump concurrency"; ! #endif CONCURRENT #endif SABER #endif lint /* * Server loop for Zephyr. */ --- 13,24 ---- #include #ifndef lint #ifndef SABER ! static char rcsid_main_c[] = "$Id: main.c,v 1.38 89/09/18 14:23:31 jtkohl Exp $"; #endif SABER #endif lint + /* * Server loop for Zephyr. */ diff -rc src/server/server.c /mit/zephyr/src/server/server.c *** patchlevel0/server/server.c Wed Oct 19 23:10:34 1988 --- src/server/server.c Tue Oct 17 16:05:32 1989 *************** *** 3,10 **** * * Created by: John T. Kohl * ! * $Source: /paris/source/4.3/athena.lib/zephyr/server/RCS/server.c,v $ ! * $Author: raeburn $ * * Copyright (c) 1987 by the Massachusetts Institute of Technology. * For copying and distribution information, see the file --- 3,10 ---- * * Created by: John T. Kohl * ! * $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/server.c,v $ ! * $Author: jtkohl $ * * Copyright (c) 1987 by the Massachusetts Institute of Technology. * For copying and distribution information, see the file *************** *** 15,21 **** #ifndef lint #ifndef SABER ! static char rcsid_server_c[] = "$Header: server.c,v 1.38 88/10/19 22:44:27 raeburn Exp $"; #endif SABER #endif lint --- 15,21 ---- #ifndef lint #ifndef SABER ! static char rcsid_server_c[] = "$Header: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/server.c,v 1.39 89/10/17 16:05:08 jtkohl Exp $"; #endif SABER #endif lint *************** *** 918,923 **** --- 918,926 ---- #ifdef sun (void) strcat(buf, "SUN"); #endif sun + #ifdef mips + (void) strcat(buf, "MIPS"); + #endif mips vers = strsave(buf); (void) sprintf(buf, "%d pkts", npackets); *************** *** 1035,1042 **** if (newline = index(buf, '\n')) *newline = '\0'; ! if (nused >= nhosts) { /* get more pointer space if necessary */ ret_list = (char **)realloc((char *)ret_list, (unsigned) nhosts * 2); nhosts = nhosts * 2; --- 1038,1046 ---- if (newline = index(buf, '\n')) *newline = '\0'; ! if (nused+1 >= nhosts) { /* get more pointer space if necessary */ + /* +1 to leave room for null pointer */ ret_list = (char **)realloc((char *)ret_list, (unsigned) nhosts * 2); nhosts = nhosts * 2; *************** *** 1044,1049 **** --- 1048,1054 ---- ret_list[nused++] = strsave(buf); } (void) fclose(fp); + ret_list[nused] = (char *)0; return(ret_list); } *************** *** 1052,1065 **** */ static void free_server_list(list) ! char **list; { register int i; if (!nhosts) /* nothing allocated */ return; ! for (i = 0; i < nhosts; i++) ! xfree(list[i]); xfree(list); return; } --- 1057,1070 ---- */ static void free_server_list(list) ! register char **list; { register int i; if (!nhosts) /* nothing allocated */ return; ! for (; *list; list++) ! xfree(*list); xfree(list); return; } diff -rc src/server/subscr.c /mit/zephyr/src/server/subscr.c *** patchlevel0/server/subscr.c Thu Oct 20 10:32:54 1988 --- src/server/subscr.c Mon Oct 2 15:31:23 1989 *************** *** 3,9 **** * * Created by: John T. Kohl * ! * $Source: /source/4.3/athena.lib/zephyr/server/RCS/subscr.c,v $ * $Author: jtkohl $ * * Copyright (c) 1987,1988 by the Massachusetts Institute of Technology. --- 3,9 ---- * * Created by: John T. Kohl * ! * $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/subscr.c,v $ * $Author: jtkohl $ * * Copyright (c) 1987,1988 by the Massachusetts Institute of Technology. *************** *** 15,21 **** #ifndef lint #ifndef SABER ! static char rcsid_subscr_c[] = "$Header: subscr.c,v 1.34 88/10/20 10:32:32 jtkohl Exp $"; #endif SABER #endif lint --- 15,21 ---- #ifndef lint #ifndef SABER ! static char rcsid_subscr_c[] = "$Header: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/subscr.c,v 1.35 89/10/02 15:31:08 jtkohl Exp $"; #endif SABER #endif lint *************** *** 91,98 **** (ZSubscr_t *) 0, (ZSubscr_t *) 0, MATCHALL_CLASS, ! NULL, ! NULL }; /* WARNING: make sure this is the same as the number of strings you */ /* plan to hand back to the user in response to a subscription check, */ --- 91,98 ---- (ZSubscr_t *) 0, (ZSubscr_t *) 0, MATCHALL_CLASS, ! "", ! "" }; /* WARNING: make sure this is the same as the number of strings you */ /* plan to hand back to the user in response to a subscription check, */ diff -rc /dev/null /mit/zephyr/src/server/subscr.c *** /dev/null Tue Oct 17 14:42:35 1989 --- src/server/version.c Tue Oct 17 16:07:39 1989 *************** *** 0 **** --- 1,31 ---- + /* This file is part of the Project Athena Zephyr Notification System. + * It contains the version identification of the Zephyr server + * + * Created by: John T. Kohl + * + * $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/version.c,v $ + * $Author: jtkohl $ + * + * Copyright (c) 1989 by the Massachusetts Institute of Technology. + * For copying and distribution information, see the file + * "mit-copyright.h". + */ + + #include + + #ifdef DEBUG + char version[] = "Zephyr Server (DEBUG) $Id: version.c,v 3.13 89/10/17 16:07:27 jtkohl Exp $"; + #else + char version[] = "Zephyr Server $Id: version.c,v 3.13 89/10/17 16:07:27 jtkohl Exp $"; + #endif DEBUG + #ifndef lint + #ifndef SABER + static char rcsid_version_c[] = "$Id: version.c,v 3.13 89/10/17 16:07:27 jtkohl Exp $"; + char copyright[] = "Copyright (c) 1987,1988,1989 Massachusetts Institute of Technology.\n"; + #ifdef CONCURRENT + char concurrent[] = "Brain-dump concurrency enabled"; + #else + char concurrent[] = "no brain-dump concurrency"; + #endif CONCURRENT + #endif SABER + #endif lint diff -rc src/tools/makeconfig /mit/zephyr/src/tools/makeconfig *** patchlevel0/tools/makeconfig Tue Apr 11 11:51:11 1989 --- src/tools/makeconfig Sat Jul 29 22:34:05 1989 *************** *** 1,6 **** ! # $Source: /mit/zephyr/src/tools/RCS/makeconfig,v $ # $Author: jtkohl $ ! # $Header: makeconfig,v 1.7 89/04/11 11:50:37 jtkohl Exp $ # # Makefile for creating a Zephyr configuration # --- 1,6 ---- ! # $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/tools/RCS/makeconfig,v $ # $Author: jtkohl $ ! # $Header: makeconfig,v 1.9 89/07/29 22:33:59 jtkohl Exp $ # # Makefile for creating a Zephyr configuration # *************** *** 17,23 **** # make -f makeconfig SRCDIR=/u2/lockers/zephyr DESTDIR=myconfig DESTDIR = . ! SRCDIR = /mit/zephyr/src LN = ln -s CP = cp --- 17,23 ---- # make -f makeconfig SRCDIR=/u2/lockers/zephyr DESTDIR=myconfig DESTDIR = . ! SRCDIR = /afs/athena.mit.edu/astaff/project/zephyr/src LN = ln -s CP = cp diff -rc src/zwgc/draw.c /mit/zephyr/src/zwgc/draw.c *** patchlevel0/zwgc/draw.c Tue May 16 15:32:09 1989 --- src/zwgc/draw.c Thu Jul 20 10:32:38 1989 *************** *** 9,15 **** */ #include #ifndef lint ! static char rcsid[] = "$Header: draw.c,v 2.26 89/05/16 15:31:21 jtkohl Exp $"; #endif lint #define FONTSPEEDHACK --- 9,15 ---- */ #include #ifndef lint ! static char rcsid[] = "$Header: draw.c,v 2.27 89/07/20 10:32:23 jtkohl Exp $"; #endif lint #define FONTSPEEDHACK *************** *** 107,114 **** --- 107,121 ---- typedef struct _winlist { struct _winlist *next; Window win; + unsigned long serial; /* serial # of the stack request + used when this window was mapped */ } winlist; + typedef struct _config_stack { + struct _config_stack *next; + Window under, over; /* Windows involved */ + } config_stack; + struct _master { int bwidth; /* borderWidth */ int inbwid; /* internalBorder */ *************** *** 135,140 **** --- 142,148 ---- int debugback; /* debugging background flash? */ Atom tagatom; /* atom number for tag type */ winlist *winlist; /* window stacking list */ + config_stack *cstack; /* WM redirect configure stack */ } master = { 1, 0, 0, 0, /* x, y */ *************** *** 155,160 **** --- 163,169 ---- 1, 0, (Atom) 0, (winlist *) 0, + (config_stack *) 0, }; void xtx_shutdown() *************** *** 666,671 **** --- 675,681 ---- winlist *wn = New(winlist); wn->next = NULL; wn->win = 0; + wn->serial = 0; return(wn); } *************** *** 675,690 **** free(wl); } ! void stackunder(me, with) Window me, with; { XWindowChanges xwc; xwc.sibling = with; xwc.stack_mode = Below; XConfigureWindow(dpy, me, CWSibling|CWStackMode, &xwc); } void append_win(list, win) winlist *list; Window win; --- 685,797 ---- free(wl); } ! unsigned long stackunder(me, with) Window me, with; { XWindowChanges xwc; + unsigned long nextreq; xwc.sibling = with; xwc.stack_mode = Below; + nextreq = NextRequest(dpy); XConfigureWindow(dpy, me, CWSibling|CWStackMode, &xwc); + /* This may generate an error on reparenting window managers... + Hopefully XFlush() will cause the error to appear before we try another + restack */ + XFlush(dpy); + return(nextreq); } + + config_stack *new_config_stack() + { + config_stack *cs = New(config_stack); + cs->next = NULL; + return(cs); + } + + void append_cstack(cstack, under, over) + config_stack *cstack; + Window under, over; + { + register config_stack *cs = cstack; + + while(cs->next) { + cs = cs->next; + } + cs->next = new_config_stack(); + cs = cs->next; + cs->under = under; + cs->over = over; + } + + /* get called here if the ConfigureWindow request generated a BadMatch + (means we were reparented) */ + void wmerror_stackunder(serial) + unsigned long serial; + { + /* we are not allowed to do Xlib calls here... grr */ + + winlist *ww = master.winlist, *ow=NULL; + extern int do_x_configwindow; + + while(ww->next && (ww->serial != serial)) { + ow = ww; + ww = ww->next; + } + if (!ow || !ww->next) /* the window has already gone away, + or there is only one left */ + return; + + /* ww points to the window to bury + ow points to the window to bury under */ + + if (!master.cstack) { + master.cstack = new_config_stack(); + master.cstack->over = ow->win; + master.cstack->under = ww->win; + } else + append_cstack(master.cstack, ww->win, ow->win); + + do_x_configwindow = 1; + return; + } + + #define free_config_stack(cs) free((char *)cs); + + void handle_x_configwindow() + { + /* + * This is per ICCCM, Sec 4.1.5. + * Under some window managers (e.g. reparenting wm's), + * the XConfigureWindow above fails because the two windows aren't + * siblings. In such a case, we need to send a synthetic event + * to the root window as specified in Sec. 4.1.5 + */ + register config_stack *cs = master.cstack; + register config_stack *ncs; + XConfigureRequestEvent config_event; + + while (cs) { + config_event.type = ConfigureRequest; + config_event.display = dpy; + config_event.parent = DefaultRootWindow(dpy); + config_event.window = cs->under; + config_event.above = cs->over; + config_event.detail = Below; + config_event.value_mask = CWSibling|CWStackMode; + XSendEvent(dpy, DefaultRootWindow(dpy), False, + (SubstructureRedirectMask|SubstructureNotifyMask), + (XEvent *)&config_event); + ncs = cs->next; + free_config_stack(cs); + cs = ncs; + } + master.cstack = 0; + do_x_configwindow = 0; + return; + } + void append_win(list, win) winlist *list; Window win; *************** *** 698,704 **** } if(ow) { /* printf("[stacking 0x%x with 0x%x]", win, ow->win); */ ! stackunder(win, ow->win); } /* printf("stuffing 0x%x\n", win); */ ww->win = win; --- 805,811 ---- } if(ow) { /* printf("[stacking 0x%x with 0x%x]", win, ow->win); */ ! ww->serial = stackunder(win, ow->win); } /* printf("stuffing 0x%x\n", win); */ ww->win = win; *************** *** 1036,1043 **** --- 1143,1154 ---- { XSizeHints sizeHints; XWMHints wmHints; + XClassHint classHint; + extern int saved_argc; extern char** saved_argv; + register char *cp; + sizeHints.flags = USSize | USPosition; sizeHints.x = thisx; sizeHints.y = thisy; sizeHints.width = wid+BRD; sizeHints.height = hi+BRD; *************** *** 1044,1051 **** XSetStandardProperties(dpy, w, master.name, master.iconname, None, saved_argv, saved_argc, &sizeHints); wmHints.flags = InputHint; ! wmHints.input = True; XSetWMHints(dpy, w, &wmHints); } if(master.usebackground) { --- 1155,1170 ---- XSetStandardProperties(dpy, w, master.name, master.iconname, None, saved_argv, saved_argc, &sizeHints); wmHints.flags = InputHint; ! wmHints.input = False; /* never need keyboard input */ XSetWMHints(dpy, w, &wmHints); + cp = rindex(saved_argv[0], '/'); + if (cp) + cp++; + else + cp = saved_argv[0]; + classHint.res_name = cp; + classHint.res_class = "Zwgc"; + XSetClassHint(dpy, w, &classHint); } if(master.usebackground) { diff -rc src/zwgc/main.c /mit/zephyr/src/zwgc/main.c *** patchlevel0/zwgc/main.c Wed May 10 15:48:28 1989 --- src/zwgc/main.c Thu Jul 20 10:15:10 1989 *************** *** 15,21 **** #include #ifndef lint ! static char rcsid_stubx_c[] = "$Header: main.c,v 2.18 89/05/10 15:48:08 jtkohl Exp $"; #include "zwgc.vers" #endif lint --- 15,21 ---- #include #ifndef lint ! static char rcsid_stubx_c[] = "$Header: main.c,v 2.19 89/07/20 10:14:48 jtkohl Exp $"; #include "zwgc.vers" #endif lint *************** *** 311,316 **** --- 311,321 ---- char **saved_argv; /* for setting WM_COMMAND property */ int saved_argc; /* for setting WM_COMMAND property */ + int do_x_configwindow = 0; /* set if we need to react to a + ConfigureWindow error (it's set at + "interrupt" level) */ + extern void handle_x_configwindow(); + main(argc,argv) int argc; char **argv; *************** *** 412,419 **** /* have to arrive via the file descriptor. */ #ifdef X11 ! while ((!ttymode && XPending(dpy)) || ZPending()>0) { if (!ttymode && XPending(dpy)) handle_x_event(); if (ZPending()>0) handle_z_event(); } --- 417,425 ---- /* have to arrive via the file descriptor. */ #ifdef X11 ! while (do_x_configwindow || (!ttymode && XPending(dpy)) || ZPending()>0) { + if (do_x_configwindow) handle_x_configwindow(); if (!ttymode && XPending(dpy)) handle_x_event(); if (ZPending()>0) handle_z_event(); } diff -rc src/zwgc/wg_errors.c /mit/zephyr/src/zwgc/wg_errors.c *** patchlevel0/zwgc/wg_errors.c Wed Apr 26 15:25:29 1989 --- src/zwgc/wg_errors.c Thu Jul 20 10:06:32 1989 *************** *** 17,23 **** #endif /* X11 */ #ifndef lint ! static char rcsid_wg_errors_c[] = "$Header: wg_errors.c,v 2.6 89/04/26 15:25:22 jtkohl Exp $"; #endif lint --- 17,23 ---- #endif /* X11 */ #ifndef lint ! static char rcsid_wg_errors_c[] = "$Header: wg_errors.c,v 2.7 89/07/20 10:06:16 jtkohl Exp $"; #endif lint *************** *** 107,112 **** --- 107,113 ---- { /* Well, we got an error... what now? this time, we ignore it... */ char erf[1024], errn[32]; + extern void wmerror_stackunder(); x_recent_error++; *************** *** 115,120 **** --- 116,127 ---- return(0); } + if (rep->request_code == X_ConfigureWindow && rep->error_code == BadMatch) { + /* got an error while restacking, use ICCCM method */ + wmerror_stackunder(rep->serial); + return(0); + } + XGetErrorText(dpy, rep->error_code, erf, 1024); fprintf(stderr, "zwgc:X11 Error: %s\n", erf); sprintf(errn,"%d",rep->request_code); diff -rc src/zwgc/zwgc.vers /mit/zephyr/src/zwgc/zwgc.vers *** patchlevel0/zwgc/zwgc.vers Tue May 30 11:27:09 1989 --- src/zwgc/zwgc.vers Thu Jul 20 10:23:15 1989 *************** *** 12,21 **** */ static char rcsid_zwgc[] = ! "$Header: ZWGC [ZEPH0PT2o] [jtkohl:19890530.1126EDT]$"; /* * Copy the header line to the top of this list, and include a * one-line comment on why the change was made. * * "$Header: ZWGC [ZEPH0PT2o] [jtkohl:19890530.1126EDT]$"; * Two bug fixes: 1) null terminate fields that aren't, so trailing junk --- 12,26 ---- */ static char rcsid_zwgc[] = ! "$Header: ZWGC [ZEPH0PT2p] [jtkohl:19890720.1018EST]$"; /* * Copy the header line to the top of this list, and include a * one-line comment on why the change was made. + * + * "$Header: ZWGC [ZEPH0PT2p] [jtkohl:19890720.1018EST]$"; + * Fixes for re-parenting window managers and restacking + * set the class hint to make sure certain WM's are able to work properly + * Don't set wmHints.input (zwgc never takes keyboard input) * * "$Header: ZWGC [ZEPH0PT2o] [jtkohl:19890530.1126EDT]$"; * Two bug fixes: 1) null terminate fields that aren't, so trailing junk