[66] in Zephyr_Bugs
Some hacks to the released version of zephyr
daemon@ATHENA.MIT.EDU (Paul Traina)
Wed Jul 25 20:44:48 1990
To: raeburn@mit.edu
Cc: zephyr-bugs@ATHENA.MIT.EDU
Reply-To: pst@stanford.edu
Date: Wed, 25 Jul 90 17:44:05 -0700
From: Paul Traina <pst@ack.Stanford.EDU>
I made the following changes to Zephyr PL3 as found on athena-dist.mit.edu.
Please consider them for inclusion in your next public distribution.
First, I'd like to take a (rather long winded, but I wanted to be clear)
look at what we've done to your filesystem layout. I'm overly verbose
because I want to make clear our reasons for the changes. Please consider
passing this part of the note on to other people at Athena so that they
may consider the requirements of non-Athena environments and develop
software in such a way as to be compatible with both our needs. We've
done the same sort of changes with other Athena packages like Kerberos,
but I felt it was time to feedback some comments to you (Kerberos ported
over almost like a dream, where Zephyr needed some serious thought and
hacking).
One of the major changes was a change in the directory structure for Zephyr.
Since we've started in the Athena game rather late in life, we don't make
the same assumptions about workstations at Stanford that you can at MIT.
Most of the workstations on campus are privately held rather than controlled
by us. Many of these people want to take advantage of our work, but it
is too much trouble to try and maintain n*10^3 copies of software.
We don't have software releases, but rather, can maintain binaries under
AFS without local sysadmin intervention. When a user decides to use our
services, we try to make life as simple as possible (we're stuck with
workstation "owners" that are incapable of managing their own systems, but
they don't want anyone mucking about on them either). All a user needs to
do (in the most simplistic case), is load AFS onto the workstation and
set her path to include our "local/bin" and "local/athena" directories.
There are changes to your layout that we must contend with:
(a) We can't usually write on the user's /usr partition or really
anywhere because that involves local system administrator
intervention. This means, we never install software in
/usr/lib, /usr/man, /usr/bin, /usr/include, /usr/etc ...
(b) AFS makes "setuid" programs that can access filesystems with
special privileges difficult to implement, so we must assume
that any program run as root has no further privileges on
non-local filesystems than the anonymous user. We don't have
"mount" under AFS, so we can't protect things by machine that
way either.
(c) Some users buy into our work all the way -- they run X11,
a full set of authenticated Athena-style utilities, and our
collection of programs in local/bin. Some people just get
their X11 from us, and ignore the rest. Some people want
our generic binaries, but don't care to learn about kerberized
rlogin et al. We need to support all three types of user,
so we have things segregated as follows:
(1) on a workstation by workstation basis, root may
run a program called X_install which creates
links into AFS for our version of X
..or.. if they don't want AFS, but want our X tree,
they can tar it off to their machine and run
it on a local disk.
(this is the only exception to our no-/usr write
rule because we wanted our binaries to be portable
to support the ..or.. case)
(2) if a user wants our "normal" software, they add
/afs/ir.stanford.edu/@sys/local/bin into their
path.
(3) if a user want's to take advantage of the athena
model software, they add ..../local/athena into
their path too.
So, here are the changes to the Athena directory structure:
MIT STANFORD
-> include files for athena software
ATHINCDIR /usr/include (none) /afs/ir/@sys/local/include
-> machine specific configuration files and temporary system (foo.pid) files
-> filesystem must be writable by root on workstation
ETCDIR /etc/athena /etc
-> binaries executable by users who take advantage of athena software
CLIENTDIR /usr/athena /afs/ir/@sys/local/athena
-> binaries not to be executed directly by user
ETCATHDIR /etc/athena /afs/ir/@sys/local/etc
-> daemons fired off by inetd (?) [I actually feel that your use of
-> /usr/etc and /etc/athena is not well defined when comparing different
-> packages, but that's the joy of learn-as-you-go development :-) ]
USRETCDIR /usr/etc /afs/ir/@sys/local/etc
-> location of libraries and lint libraries
LIBDIR /usr/athena/lib /afs/ir/@sys/local/lib
LINTLIBDIR /usr/lib/lint /afs/ir/@sys/local/lib/lint
(if a developer wishes to use our lint libraries,
he's stuck unless he symlinks the files into his local
/usr/lib/lint directory. However, our plans are to fix
lint to add the -L flag).
-> manual pages
MANDIR /usr/man /afs/ir/share/local/man
-> Zephyr ACL's
ACLDIR /usr/athena/lib/zephyr /afs/ir/share/local/etc/zephyr
Among the other changes that were made were:
(1) support systems that have void signal types (POSIX)
through the use of -DVOID_SIGS (sunos, ultrix, et al)
(2) create lint libraries properly when running on mips (sigh)
(3) fix version of et distributed to compile with hc on an rt
(rt's don't have stdlib.h but claim to be ansi-c)
(4) fix a printf that was interpreted as a trigraph in the server
(5) install ss includes and libraries if they were built
(6) install zephyr.desc where the Imakefile wanted it to be
(bogus hard coded path removed from Imakefile)
(7) Install zephyr.vars file the same way (added location in Imakefile
and note about making sure it matched the value in zephyr_conf.h.
Changes directly relating to our redesign of the filesystem layout:
(1) move zinit installation from ETCATHDIR to USRETCDIR
move zhm installation from ETCATHDIR to USRETCDIR
(2) include ATHINCDIR in compilation include path
(3) search LIBDIR for standard athena libraries
(kerberos / hesiod / et / ss)
(4) put zhm PID file in ETCDIR, rather than ETCATHDIR,
(5a) (not returned to you, but done here)
put zephyr_srvtab in ETCDIR on the zephyrd servers (which we
do control fully).
Additional changes not being forwarded back to you:
(a) zbrowser fixed for X11R4 (but your new zbrowser makes this moot)
(b) changes to the Imakefiles so Zephyr always uses hes_getservbyname
to pick up service descriptions
If anyone is interested in the current configuration that we use to build
our Zephyr (it's kind of hacked up right now, but I'll clean it up when I
get time), it can be found in /afs/ir.stanford.edu/src/athena/zephyr/src.
Paul
Diffs:
Apply to zephyr PL3 with patch -p1
*** src.orig/clients/syslogd/syslogd.c Thu Apr 13 07:11:19 1989
--- src.2/clients/syslogd/syslogd.c Tue Jul 24 15:41:40 1990
***************
*** 82,87 ****
--- 82,91 ----
#include <zephyr/zephyr.h>
#include <krb.h>
+ #ifdef ultrix
+ #define VOID_SIGS
+ #endif
+
#define CTTY "/dev/console"
char *LogName = "/dev/log";
#ifdef COMPAT42
***************
*** 260,266 ****
#else
char line[MSG_BSIZE + 1];
#endif /* COMPAT42 */
! #ifdef ultrix
extern void die(), domark(), reapchild();
#else
extern int die(), domark(), reapchild();
--- 264,270 ----
#else
char line[MSG_BSIZE + 1];
#endif /* COMPAT42 */
! #ifdef VOID_SIGS
extern void die(), domark(), reapchild();
#else
extern int die(), domark(), reapchild();
***************
*** 927,933 ****
reenter = 0;
}
! #ifdef ultrix
void
#endif
reapchild()
--- 931,937 ----
reenter = 0;
}
! #ifdef VOID_SIGS
void
#endif
reapchild()
***************
*** 966,972 ****
return (hp->h_name);
}
! #ifdef ultrix
void
#endif
domark()
--- 970,976 ----
return (hp->h_name);
}
! #ifdef VOID_SIGS
void
#endif
domark()
***************
*** 1012,1018 ****
logmsg(LOG_SYSLOG|LOG_ERR, buf, LocalHostName, ADDDATE);
}
! #ifdef ultrix
void
#endif
die(sig)
--- 1016,1022 ----
logmsg(LOG_SYSLOG|LOG_ERR, buf, LocalHostName, ADDDATE);
}
! #ifdef VOID_SIGS
void
#endif
die(sig)
*** src.orig/clients/zinit/Imakefile Thu Mar 23 08:16:48 1989
--- src.2/clients/zinit/Imakefile Tue Jul 24 15:41:41 1990
***************
*** 18,21 ****
normal_obj_rule()
! program(zinit,${OBJS},,${LIBS},${ETCATHDIR})
--- 18,21 ----
normal_obj_rule()
! program(zinit,${OBJS},,${LIBS},${USRETCDIR})
*** src.orig/clients/zshutdown_notify/Imakefile Thu Mar 23 08:20:36 1989
--- src.2/clients/zshutdown_notify/Imakefile Tue Jul 24 15:41:42 1990
***************
*** 18,21 ****
normal_obj_rule()
! program(zshutdown_notify,${OBJS},,${LIBS},${ETCATHDIR})
--- 18,21 ----
normal_obj_rule()
! program(zshutdown_notify,${OBJS},,${LIBS},${USRETCDIR})
*** src.orig/config/Imake.template Fri Oct 27 10:29:29 1989
--- src.2/config/Imake.template Tue Jul 24 15:41:43 1990
***************
*** 20,26 ****
BUILDTOP=NEW_TOP
#endif
! INCLUDE= $(LINCLUDES) -I$(BUILDTOP)/include
CFLAGS=$(DBG) $(INCLUDE) $(DEFINES) $(GLOBAL_CDEFS)
LINTFLAGS= -bhz $(LLINTFLAGS) $(INCLUDE) $(DEFINES) $(GLOBAL_CDEFS)
#include "config.Imakefile"
--- 20,26 ----
BUILDTOP=NEW_TOP
#endif
! INCLUDE= $(LINCLUDES) -I$(BUILDTOP)/include -I${ATHINCDIR}
CFLAGS=$(DBG) $(INCLUDE) $(DEFINES) $(GLOBAL_CDEFS)
LINTFLAGS= -bhz $(LLINTFLAGS) $(INCLUDE) $(DEFINES) $(GLOBAL_CDEFS)
#include "config.Imakefile"
*** src.orig/config/config.Imakefile Fri Oct 27 10:29:29 1989
--- src.2/config/config.Imakefile Tue Jul 24 15:50:38 1990
***************
*** 27,33 ****
/* For Ultrix version 2, put -DULTRIX22 on this line */
/* If your C Library doesn't have strcasecmp() and strncasecmp()
(case-insensitive string comparisons), put -DSTRCASE on this line */
! GLOBALCDEFS=/* -DULTRIX22 */ /* -DSTRCASE */
/* OPTION SELECTION: */
--- 27,34 ----
/* For Ultrix version 2, put -DULTRIX22 on this line */
/* If your C Library doesn't have strcasecmp() and strncasecmp()
(case-insensitive string comparisons), put -DSTRCASE on this line */
! /* If you have void * as the return type for signals, define VOID_SIGS */
! GLOBALCDEFS=/* -DULTRIX22 */ /* -DSTRCASE */ /* -DVOID_SIGS */
/* OPTION SELECTION: */
***************
*** 47,53 ****
--- 48,56 ----
/*
* Define DO_SYSLOG if you want to build a Zephyr syslogd.
*/
+ #ifndef ultrix
#define DO_SYSLOG
+ #endif
/*
* If you want a 4.3BSD syslogd which can run on a system already running
* a 4.2BSD syslog, define SYSLOG_COMPAT42 on this line. Otherwise, it
***************
*** 112,117 ****
--- 115,123 ----
* These are the directories into which various programs and files are
* installed.
*/
+ ATHINCDIR= /usr/include
+ ETCDIR= /etc
+
CLIENTDIR= /usr/athena
ETCATHDIR= /etc/athena
USRETCDIR= /usr/etc
***************
*** 131,137 ****
--- 137,147 ----
* LINTLIBFLAG should be the flag used to tell lint to create a lint
* library. On most BSD systems, this is -C
*/
+ #if defined(ultrix) && defined(mips)
+ LINTLIBFLAG=-o
+ #else
LINTLIBFLAG=-C
+ #endif
/* XXX END LIKELY SITE-SPECIFIC CONFIGURATION XXX */
***************
*** 167,175 ****
#ifdef KERBEROS
KRB_CDEFS=-DKERBEROS
! KRB_LIB=-lkrb
KRB_LINTLIB=-lkrb
! DES_LIB=-ldes
DES_LINTLIB=-ldes
#else /* !KERBEROS */
KRB_CDEFS=
--- 177,185 ----
#ifdef KERBEROS
KRB_CDEFS=-DKERBEROS
! KRB_LIB=-L${LIBDIR} -lkrb
KRB_LINTLIB=-lkrb
! DES_LIB=-L${LIBDIR} -ldes
DES_LINTLIB=-ldes
#else /* !KERBEROS */
KRB_CDEFS=
***************
*** 181,187 ****
#ifdef HESIOD
HES_CDEFS=-DHESIOD
! HES_LIB=-lhesiod
HES_LINTLIB=-lhesiod
#else /* !HESIOD */
HES_CDEFS=
--- 191,197 ----
#ifdef HESIOD
HES_CDEFS=-DHESIOD
! HES_LIB=-L${LIBDIR} -lhesiod
HES_LINTLIB=-lhesiod
#else /* !HESIOD */
HES_CDEFS=
***************
*** 214,222 ****
COMPILE_ET=$(BUILDTOP)/et/compile_et/compile_et
MAKE_COMMANDS=$(BUILDTOP)/ss/make_commands/mk_cmds
#else /* !LOCAL_LIBS */
! SS_LIB=-lss
SS_LINTLIB=-lss
! COMERR_LIB=-lcom_err
COMERR_LINTLIB=-lcom_err
COMPILE_ET=compile_et
MAKE_COMMANDS=mk_cmds
--- 224,232 ----
COMPILE_ET=$(BUILDTOP)/et/compile_et/compile_et
MAKE_COMMANDS=$(BUILDTOP)/ss/make_commands/mk_cmds
#else /* !LOCAL_LIBS */
! SS_LIB=-L${LIBDIR} -lss
SS_LINTLIB=-lss
! COMERR_LIB=-L${LIBDIR} -lcom_err
COMERR_LINTLIB=-lcom_err
COMPILE_ET=compile_et
MAKE_COMMANDS=mk_cmds
*** src.orig/et/compile_et/error_table.y Fri Oct 27 10:29:31 1989
--- src.2/et/compile_et/error_table.y Tue Jul 24 15:41:45 1990
***************
*** 1,7 ****
%{
#include <stdio.h>
char *str_concat(), *ds(), *quote();
! #ifdef __STDC__
#include <stdlib.h>
#else
char *malloc(), *realloc();
--- 1,7 ----
%{
#include <stdio.h>
char *str_concat(), *ds(), *quote();
! #if defined(__STDC__) && !defined(ibm032)
#include <stdlib.h>
#else
char *malloc(), *realloc();
*** src.orig/lib/Imakefile Fri Oct 27 10:29:32 1989
--- src.2/lib/Imakefile Tue Jul 24 15:41:46 1990
***************
*** 229,243 ****
fi
install::
! -mkdir ${DESTDIR}/usr/include/zephyr
! install -c -m 0644 ../include/zephyr/zephyr.h ${DESTDIR}/usr/include/zephyr/zephyr.h
! install -c -m 0644 ../include/zephyr/zephyr_conf.h ${DESTDIR}/usr/include/zephyr/zephyr_conf.h
! install -c -m 0644 ../include/zephyr/zephyr_internal.h ${DESTDIR}/usr/include/zephyr/zephyr_internal.h
! install -c -m 0644 zephyr_err.h ${DESTDIR}/usr/include/zephyr/zephyr_err.h
#ifdef KERBEROS
! install -c -m 0644 krb_err.h ${DESTDIR}/usr/include/zephyr/krb_err.h
#endif /* KERBEROS */
! install -c -m 0644 ../include/zephyr/mit-copyright.h ${DESTDIR}/usr/include/zephyr/mit-copyright.h
/* this is to install the lint lib This must end */
/* up in the resulting Makefile AFTER the other lint lib stuff. */
--- 229,244 ----
fi
install::
! -mkdir ${DESTDIR}${AINCDIR}
! -mkdir ${DESTDIR}${AINCDIR}/zephyr
! ${INSTALLFILE} ../include/zephyr/zephyr.h ${DESTDIR}${AINCDIR}/zephyr.h
! ${INSTALLFILE} ../include/zephyr/zephyr_conf.h ${DESTDIR}${AINCDIR}/zephyr/zephyr_conf.h
! ${INSTALLFILE} ../include/zephyr/zephyr_internal.h ${DESTDIR}${AINCDIR}/zephyr/zephyr_internal.h
! ${INSTALLFILE} zephyr_err.h ${DESTDIR}${AINCDIR}/zephyr/zephyr_err.h
#ifdef KERBEROS
! ${INSTALLFILE} krb_err.h ${DESTDIR}${AINCDIR}/zephyr/krb_err.h
#endif /* KERBEROS */
! ${INSTALLFILE} ../include/zephyr/mit-copyright.h ${DESTDIR}${AINCDIR}/zephyr/mit-copyright.h
/* this is to install the lint lib This must end */
/* up in the resulting Makefile AFTER the other lint lib stuff. */
*** src.orig/server/uloc.c Tue Dec 26 10:11:05 1989
--- src.2/server/uloc.c Tue Jul 24 15:41:49 1990
***************
*** 1338,1344 ****
--- 1338,1348 ----
fputs("/NET_ANN/", fp);
break;
default:
+ #ifdef __STDC__ /* trigraphs suck */
+ fprintf(fp, "/\?\? %d \?\?/", locations[i].zlt_exposure);
+ #else
fprintf(fp, "/?? %d ??/", locations[i].zlt_exposure);
+ #endif
break;
}
fputs(inet_ntoa(locations[i].zlt_addr), fp);
*** src.orig/ss/lib/Imakefile Wed May 31 06:59:29 1989
--- src.2/ss/lib/Imakefile Tue Jul 24 15:41:50 1990
***************
*** 35,37 ****
--- 35,44 ----
command_table(std_rqs)
install_library_target(ss, ${OBJS}, ${SRCS},)
+
+ install:: ss.h ss_err.h mit-sipb-copyright.h
+ -mkdir ${DESTDIR}${AINCDIR}
+ -mkdir ${DESTDIR}${AINCDIR}/ss
+ ${INSTALLFILE} ss.h ${DESTDIR}${AINCDIR}/ss/ss.h
+ ${INSTALLFILE} ss_err.h ${DESTDIR}${AINCDIR}/ss/ss_err.h
+ ${INSTALLFILE} mit-sipb-copyright.h ${DESTDIR}${AINCDIR}/ss/mit-sipb-copyright.h
*** src.orig/zhm/Imakefile Tue Dec 26 10:11:07 1989
--- src.2/zhm/Imakefile Tue Jul 24 15:41:50 1990
***************
*** 26,35 ****
/*
* The pathname for the pid file.
*/
! ZHMPIDFILE=$(ETCATHDIR)/zhm.pid
DEFINES=-DPIDFILE=\"$(ZHMPIDFILE)\"
normal_obj_rule()
! program(zhm,${OBJS},,${LIBS},${ETCATHDIR})
--- 26,35 ----
/*
* The pathname for the pid file.
*/
! ZHMPIDFILE=$(ETCDIR)/zhm.pid
DEFINES=-DPIDFILE=\"$(ZHMPIDFILE)\"
normal_obj_rule()
! program(zhm,${OBJS},,${LIBS},${USRETCDIR})
*** src.orig/zwgc/Imakefile Tue May 30 06:40:44 1989
--- src.2/zwgc/Imakefile Tue Jul 24 15:41:51 1990
***************
*** 50,55 ****
--- 50,61 ----
*/
ZCTLDESC=$(ETCATHDIR)/zephyr.desc
+ /*
+ * The pathname for the installed variables file.
+ * *Note:* this must match what is in ...include/zephyr/zephyr_conf.h
+ */
+ ZEPHVARS=$(ETCATHDIR)/zephyr.vars
+
DEFINES= -DZCTLPROG=\"$(ZCTLPROG)\" -DDEFDESC=\"$(ZCTLDESC)\"
/**/# -I. should do, but makedepend bug screws up with X11/X11/X.h
***************
*** 80,86 ****
#endif ibm032
install::
! $(RM) $(DESTDIR)$(ETCATHDIR)/zephyr.desc
! $(CP) zephyr.desc $(DESTDIR)$(ETCATHDIR)/zephyr.desc
! $(RM) $(DESTDIR)$(ETCATHDIR)/zephyr.vars
! $(CP) zephyr.vars $(DESTDIR)$(ETCATHDIR)/zephyr.vars
--- 86,92 ----
#endif ibm032
install::
! $(RM) $(DESTDIR)$(ZCTLDESC)
! $(CP) zephyr.desc $(DESTDIR)$(ZCTLDESC)
! $(RM) $(DESTDIR)$(ZEPHVARS)
! $(CP) zephyr.vars $(DESTDIR)$(ZEPHVARS)