*BSD News Article 61015


Return to BSD News archive

Newsgroups: comp.bugs.2bsd
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!inferno.mpx.com.au!news.unimelb.EDU.AU!munnari.OZ.AU!news.hawaii.edu!ames!usenet.kornet.nm.kr!news.kreonet.re.kr!usenet.seri.re.kr!news.cais.net!ringer.cs.utsa.edu!swrinde!cssun.mathcs.emory.edu!gatech!news.mathworks.com!uunet!in2.uu.net!news.new-york.net!wlbr!sms
From: sms@wlv.iipo.gtegsc.com (Steven M. Schultz)
Subject: mount(8) options, !/etc/mtab, libkern.a, MANY others (#296 part 5 of 8)
Sender: news@wlbr.iipo.gtegsc.com (Steven M. Schultz)
Organization: GTE Government Systems, Thousand Oaks CA USA
Message-ID: <DM4rrp.M4A@wlbr.iipo.gtegsc.com>
X-Nntp-Posting-Host: wlv.iipo.gtegsc.com
Date: Fri, 2 Feb 1996 04:14:13 GMT
Lines: 1718

Subject: mount(8) options, !/etc/mtab, libkern.a, MANY others (#296 part 5 of 8)
Index:	many/many 2.11BSD

Description:
	Mount(8) does not pass options other than 'readonly' thru to the
	kernel even though the kernel understands many more options than
	that.

	/etc/mtab is not needed any longer because applications (mount, umount,
	others) can obtain the list of mounted filesystems via getmntinfo(3),
	or getfsstat(2)

	There are copies of 15 libc routines in the kernel directories.  These
	are invariant but nevertheless are always being recompiled/assembled
	whenever a kernel is built.

Repeat-By:
	It sounds inadequate, but, "observation".

Fix:
	This is #296 (part 5 of 8).

	Please refer to part 1 (#292) for detailed instructions and a
	description of contents.

----------------------------cut here-------------------------
*** /etc/rc.old	Sat Feb  4 00:19:33 1995
--- /etc/rc	Wed Jan 24 23:26:39 1996
***************
*** 1,3 ****
--- 1,7 ----
+ 
+ #
+ #	@(#)rc	1.1 (2.111BSD) 1996/1/24
+ #
  HOME=/; export HOME
  PATH=/etc:/bin:/usr/ucb:/usr/bin; export PATH
  
***************
*** 67,74 ****
   	echo 'password file may be incorrect' > /dev/console
  fi
  
  umount -a
! cp /dev/null /etc/mtab
  mount -a						>/dev/console 2>&1
  
  if [ ${RAMSIZE} != 0 ]
--- 71,86 ----
   	echo 'password file may be incorrect' > /dev/console
  fi
  
+ #
+ # First umount everything in case the system is going back into multiuser
+ # mode.  If the system is being booted for the first time nothing is mounted
+ # except the root filesystem and umount ignores attempts to unmount /.
+ #
  umount -a
! #
! # Now mount everything mentioned in /etc/fstab *except* filesystems with the
! # 'na' (noauto) option.
! #
  mount -a						>/dev/console 2>&1
  
  if [ ${RAMSIZE} != 0 ]
***************
*** 78,84 ****
  fi
  
  	echo -n 'checking quotas:'	>/dev/console 2>&1
! /etc/quotacheck -a -p			>/dev/console 2>&1
  	echo ' done.'			>/dev/console 2>&1
  /etc/quotaon -a
  
--- 90,96 ----
  fi
  
  	echo -n 'checking quotas:'	>/dev/console 2>&1
! /etc/quotacheck -a 			>/dev/console 2>&1
  	echo ' done.'			>/dev/console 2>&1
  /etc/quotaon -a
  
*** /usr/include/stdio.h.old	Fri Oct  7 11:07:29 1988
--- /usr/include/stdio.h	Mon Jan 15 21:53:03 1996
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)stdio.h	5.3 (Berkeley) 3/15/86
   */
  
  # ifndef FILE
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)stdio.h	5.3.1 (2.11BSD) 1996/1/15
   */
  
  # ifndef FILE
***************
*** 26,32 ****
--- 26,36 ----
  #define	_IOSTRG	0100
  #define	_IOLBF	0200
  #define	_IORW	0400
+ 
+ #ifndef	NULL
  #define	NULL	0
+ #endif
+ 
  #define	FILE	struct _iobuf
  #define	EOF	(-1)
  
***************
*** 59,65 ****
  long	ftell();
  char	*fgets();
  char	*gets();
! #ifdef vax
! char	*sprintf();		/* too painful to do right */
! #endif
! # endif
--- 63,66 ----
  long	ftell();
  char	*fgets();
  char	*gets();
! # endif /* _FILE */
*** /usr/include/stdlib.h.old	Tue Dec 26 16:01:58 1995
--- /usr/include/stdlib.h	Fri Jan 12 17:58:21 1996
***************
*** 30,36 ****
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   *
!  *	@(#)stdlib.h	8.3.1 (2.11BSD) 12995/12/26
   *
   * Adapted from the 4.4-Lite CD.  The odds of a ANSI C compiler for 2.11BSD
   * being slipped under the door are not distinguishable from 0 - so the 
--- 30,36 ----
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   *
!  *	@(#)stdlib.h	8.3.2 (2.11BSD) 1996/1/12
   *
   * Adapted from the 4.4-Lite CD.  The odds of a ANSI C compiler for 2.11BSD
   * being slipped under the door are not distinguishable from 0 - so the 
***************
*** 99,108 ****
  extern int opterr, optind, optopt;
  int	getopt();
  
- #ifdef	notyet
  extern char *suboptarg;			/* getsubopt(3) external variable */
  int	getsubopt();
- #endif
  
  long	random();
  char	*setstate();
--- 99,106 ----
*** /usr/include/string.h.old	Sun Feb  8 13:35:17 1987
--- /usr/include/string.h	Mon Jan 15 20:29:08 1996
***************
*** 3,29 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)string.h	5.1 (Berkeley) 85/08/05
   */
  
! #include <strings.h>
  
! /*
!  * these next few are obsolete trash
!  */
  
! extern char *strcpyn();
! extern char *strcatn();
! extern int strcmpn();
  
! /*
!  * and the rest are Sys5 functions supported just so
!  * Sys5 progs will compile easily.
!  */
  
! extern char *strchr();
! extern char *strrchr();
! extern char *strpbrk();
! extern int strspn();
! extern int strcspn();
! extern char *strtok();
--- 3,24 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)string.h	5.1.2 (2.11BSD) 1996/1/15
   */
  
! #include <sys/types.h>
  
! #ifndef	NULL
! #define	NULL	0
! #endif
  
! extern	char	*strcat(), *strncat(), *strcpy(), *strncpy(), *index();
! extern	char	*rindex(), *strstr();
! extern	int	strcmp(), strncmp(), strcasecmp(), strncasecmp(), strlen();
! extern	int	memcmp();
  
! extern	char	*memccpy(), *memchr(), *memcpy(), *memset(), *strchr();
! extern	char	*strdup(), *strpbrk(), *strrchr(), *strsep(), *strtok();
! extern	size_t	strcspn(), strspn();
  
! extern	char	*strerror();
*** /usr/lib/lint/llib-lc.old	Mon Jan  1 14:35:45 1996
--- /usr/lib/lint/llib-lc	Sun Jan 28 00:28:33 1996
***************
*** 1,4 ****
! /*	@(#)llib-lc	1.41 (2.11BSD GTE) 1996/1/1 */
  
  /* LINTLIBRARY */
  
--- 1,4 ----
! /*	@(#)llib-lc	1.42 (2.11BSD GTE) 1996/1/27 */
  
  /* LINTLIBRARY */
  
***************
*** 224,230 ****
  datum	dbm_nextkey(db) DBM *db; { datum key; return key; }
  char *	ecvt(v, n, d, s) double v; int *d, *s; { return(""); }
  	encrypt(s, i) char *s; {}
! int	endfsent() { return 0; }
  int	endgrent() { return 0; }
  	endhostent() { ; }
  	endnetent() { ; }
--- 224,230 ----
  datum	dbm_nextkey(db) DBM *db; { datum key; return key; }
  char *	ecvt(v, n, d, s) double v; int *d, *s; { return(""); }
  	encrypt(s, i) char *s; {}
! void	endfsent() { }
  int	endgrent() { return 0; }
  	endhostent() { ; }
  	endnetent() { ; }
*** /usr/src/bin/ar/strmode.c.old	Thu Jan  5 20:00:31 1995
--- /usr/src/bin/ar/strmode.c	Sat Jan 27 00:59:53 1996
***************
*** 32,52 ****
   */
  
  #if defined(LIBC_SCCS) && !defined(lint)
! static char sccsid[] = "@(#)strmode.c	5.3.1 (2.11BSD GTE) 1/5/95";
  #endif /* LIBC_SCCS and not lint */
  
  #include <sys/types.h>
  #include <sys/stat.h>
- 
- #define	S_IRUSR	S_IREAD
- #define	S_IWUSR	S_IWRITE
- #define	S_IXUSR	S_IEXEC
- #define	S_IRGRP (S_IREAD >> 3)
- #define	S_IWGRP (S_IWRITE >> 3)
- #define	S_IXGRP	(S_IEXEC >> 3)
- #define	S_IROTH	(S_IREAD >> 6)
- #define	S_IWOTH	(S_IWRITE >> 6)
- #define	S_IXOTH	(S_IEXEC >> 6)
  
  void
  strmode(mode, p)
--- 32,42 ----
   */
  
  #if defined(LIBC_SCCS) && !defined(lint)
! static char sccsid[] = "@(#)strmode.c	5.3.2 (2.11BSD GTE) 1996/1/27";
  #endif /* LIBC_SCCS and not lint */
  
  #include <sys/types.h>
  #include <sys/stat.h>
  
  void
  strmode(mode, p)
*** /usr/src/bin/chflags/Makefile.old	Mon Dec 26 17:32:44 1994
--- /usr/src/bin/chflags/Makefile	Sat Jan 27 00:51:59 1996
***************
*** 1,13 ****
  #
  # Public Domain.  12/3/1994 - Steven Schultz
  #
! #	@(#)Makefile	1.1 (2.11BSD GTE) 12/26/94
  #
  CFLAGS=	 -O
  SEPFLAG= -i
  VPATH= ../ls
! SRCS=	chflags.c stat_flags.c strsep.c
! OBJS=	chflags.o stat_flags.o strsep.o
  MAN=	chflags.0
  MANSRC=	chflags.1
  
--- 1,13 ----
  #
  # Public Domain.  12/3/1994 - Steven Schultz
  #
! #	@(#)Makefile	1.2 (2.11BSD GTE) 1996/1/27
  #
  CFLAGS=	 -O
  SEPFLAG= -i
  VPATH= ../ls
! SRCS=	chflags.c stat_flags.c
! OBJS=	chflags.o stat_flags.o
  MAN=	chflags.0
  MANSRC=	chflags.1
  
*** /usr/src/bin/chpass/Makefile.old	Mon Jan 18 08:45:19 1993
--- /usr/src/bin/chpass/Makefile	Sat Jan 27 23:30:47 1996
***************
*** 14,20 ****
  # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  #
! #	@(#)Makefile	5.1 (Berkeley) 2/22/89
  #
  CFLAGS=	-I. -O
  SEPFLAG= -i
--- 14,20 ----
  # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  #
! #	@(#)Makefile	5.1.1 (2.11BSD) 1996/1/27
  #
  CFLAGS=	-I. -O
  SEPFLAG= -i
***************
*** 24,30 ****
  MAN=	chpass.0
  MANSRC=	chpass.1
  
! all: chpass
  
  chpass: ${LIBC} ${OBJS}
  	${CC} ${CFLAGS} ${SEPFLAG} -o $@ ${OBJS}
--- 24,30 ----
  MAN=	chpass.0
  MANSRC=	chpass.1
  
! all: chpass ${MAN}
  
  chpass: ${LIBC} ${OBJS}
  	${CC} ${CFLAGS} ${SEPFLAG} -o $@ ${OBJS}
*** /usr/src/bin/chpass/chpass.c.old	Sun May 14 22:09:06 1989
--- /usr/src/bin/chpass/chpass.c	Fri Jan 12 18:43:11 1996
***************
*** 15,28 ****
   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #ifndef lint
  char copyright[] =
  "@(#) Copyright (c) 1988 The Regents of the University of California.\n\
   All rights reserved.\n";
- #endif /* not lint */
  
! #ifndef lint
! static char sccsid[] = "@(#)chpass.c	5.10 (Berkeley) 3/26/89";
  #endif /* not lint */
  
  #include <sys/param.h>
--- 15,26 ----
   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #if	!defined(lint) && defined(DOSCCS)
  char copyright[] =
  "@(#) Copyright (c) 1988 The Regents of the University of California.\n\
   All rights reserved.\n";
  
! static char sccsid[] = "@(#)chpass.c	5.10.1 (2.11BSD) 1996/1/12";
  #endif /* not lint */
  
  #include <sys/param.h>
***************
*** 37,42 ****
--- 35,41 ----
  #include <ctype.h>
  #include <chpass.h>
  #include <strings.h>
+ #include <stdlib.h>
  
  char e1[] = ": ";
  char e2[] = ":,";
***************
*** 425,452 ****
  	register struct passwd *pw;
  {
  	register char *cp;
! 	long atol();
! 	char *strsep();
  
! 	pw->pw_name = strsep(arg, ":");
! 	pw->pw_passwd = strsep((char *)NULL, ":");
! 	if (!(cp = strsep((char *)NULL, ":")))
  		goto bad;
  	pw->pw_uid = atoi(cp);
! 	if (!(cp = strsep((char *)NULL, ":")))
  		goto bad;
  	pw->pw_gid = atoi(cp);
! 	pw->pw_class = strsep((char *)NULL, ":");
! 	if (!(cp = strsep((char *)NULL, ":")))
  		goto bad;
  	pw->pw_change = atol(cp);
! 	if (!(cp = strsep((char *)NULL, ":")))
  		goto bad;
  	pw->pw_expire = atol(cp);
! 	pw->pw_gecos = strsep((char *)NULL, ":");
! 	pw->pw_dir = strsep((char *)NULL, ":");
! 	pw->pw_shell = strsep((char *)NULL, ":");
! 	if (!pw->pw_shell || strsep((char *)NULL, ":")) {
  bad:		(void)fprintf(stderr, "chpass: bad password list.\n");
  		exit(1);
  	}
--- 424,450 ----
  	register struct passwd *pw;
  {
  	register char *cp;
! 	char	*bp = arg;
  
! 	pw->pw_name = strsep(&bp, ":");
! 	pw->pw_passwd = strsep(&bp, ":");
! 	if (!(cp = strsep(&bp, ":")))
  		goto bad;
  	pw->pw_uid = atoi(cp);
! 	if (!(cp = strsep(&bp, ":")))
  		goto bad;
  	pw->pw_gid = atoi(cp);
! 	pw->pw_class = strsep(&bp, ":");
! 	if (!(cp = strsep(&bp, ":")))
  		goto bad;
  	pw->pw_change = atol(cp);
! 	if (!(cp = strsep(&bp, ":")))
  		goto bad;
  	pw->pw_expire = atol(cp);
! 	pw->pw_gecos = strsep(&bp, ":");
! 	pw->pw_dir = strsep(&bp, ":");
! 	pw->pw_shell = strsep(&bp, ":");
! 	if (!pw->pw_shell || strsep(&bp, ":")) {
  bad:		(void)fprintf(stderr, "chpass: bad password list.\n");
  		exit(1);
  	}
*** /usr/src/bin/chpass/util.c.old	Sun May 14 22:09:07 1989
--- /usr/src/bin/chpass/util.c	Fri Jan 12 18:47:13 1996
***************
*** 15,23 ****
   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #ifndef lint
! static char sccsid[] = "@(#)util.c	5.9 (Berkeley) 3/27/89";
! #endif /* not lint */
  
  #include <sys/types.h>
  #include <sys/time.h>
--- 15,23 ----
   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)util.c	5.9.1 (2.11BSD) 1996/1/12";
! #endif
  
  #include <sys/types.h>
  #include <sys/time.h>
***************
*** 28,34 ****
  #include <ctype.h>
  #include "pathnames.h"
  
! static int dmsize[] =
  	{ -1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
  static char *months[] =
  	{ "January", "February", "March", "April", "May", "June",
--- 28,34 ----
  #include <ctype.h>
  #include "pathnames.h"
  
! static char dmsize[] =
  	{ -1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
  static char *months[] =
  	{ "January", "February", "March", "April", "May", "June",
***************
*** 38,44 ****
  ttoa(tval)
  	time_t tval;
  {
! 	struct tm *tp;
  	static char tbuf[50];
  
  	if (tval) {
--- 38,44 ----
  ttoa(tval)
  	time_t tval;
  {
! 	register struct tm *tp;
  	static char tbuf[50];
  
  	if (tval) {
***************
*** 115,124 ****
  }
  
  print(fp, pw)
! 	FILE *fp;
  	struct passwd *pw;
  {
  	register char *p;
  	char *getusershell(), *ttoa();
  
  	fprintf(fp, "#Changing user database information for %s.\n",
--- 115,125 ----
  }
  
  print(fp, pw)
! 	register FILE *fp;
  	struct passwd *pw;
  {
  	register char *p;
+ 	char	*bp;
  	char *getusershell(), *ttoa();
  
  	fprintf(fp, "#Changing user database information for %s.\n",
***************
*** 147,158 ****
  				break;
  			}
  	}
! 	p = strsep(pw->pw_gecos, ",");
  	fprintf(fp, "Full Name: %s\n", p ? p : "");
! 	p = strsep((char *)NULL, ",");
  	fprintf(fp, "Location: %s\n", p ? p : "");
! 	p = strsep((char *)NULL, ",");
  	fprintf(fp, "Office Phone: %s\n", p ? p : "");
! 	p = strsep((char *)NULL, ",");
  	fprintf(fp, "Home Phone: %s\n", p ? p : "");
  }
--- 148,160 ----
  				break;
  			}
  	}
! 	bp = pw->pw_gecos;
! 	p = strsep(&bp, ",");
  	fprintf(fp, "Full Name: %s\n", p ? p : "");
! 	p = strsep(&bp, ",");
  	fprintf(fp, "Location: %s\n", p ? p : "");
! 	p = strsep(&bp, ",");
  	fprintf(fp, "Office Phone: %s\n", p ? p : "");
! 	p = strsep(&bp, ",");
  	fprintf(fp, "Home Phone: %s\n", p ? p : "");
  }
*** /usr/src/bin/df.c.old	Tue Dec 26 21:12:51 1995
--- /usr/src/bin/df.c	Thu Jan 18 22:03:56 1996
***************
*** 41,47 ****
  "@(#) Copyright (c) 1980, 1990, 1993, 1994\n\
  	The Regents of the University of California.  All rights reserved.\n";
  
! static char sccsid[] = "@(#)df.c	8.7.1 (2.11BSD) 1995/12/26";
  #endif
  
  #include <sys/param.h>
--- 41,47 ----
  "@(#) Copyright (c) 1980, 1990, 1993, 1994\n\
  	The Regents of the University of California.  All rights reserved.\n";
  
! static char sccsid[] = "@(#)df.c	8.7.2 (2.11BSD) 1996/1/18";
  #endif
  
  #include <sys/param.h>
***************
*** 249,255 ****
  	sfsp->f_flags = 0;
  	sfsp->f_bsize = MAXBSIZE;
  	sfsp->f_iosize = MAXBSIZE;
! 	sfsp->f_blocks = sblock.fs_fsize;
  	sfsp->f_bfree = sblock.fs_tfree;
  	sfsp->f_bavail = sblock.fs_tfree;
  	if (sfsp->f_bavail < 0)
--- 249,255 ----
  	sfsp->f_flags = 0;
  	sfsp->f_bsize = MAXBSIZE;
  	sfsp->f_iosize = MAXBSIZE;
! 	sfsp->f_blocks = sblock.fs_fsize - sblock.fs_isize;
  	sfsp->f_bfree = sblock.fs_tfree;
  	sfsp->f_bavail = sblock.fs_tfree;
  	if (sfsp->f_bavail < 0)
*** /usr/src/bin/login/Makefile.old	Mon Jan 18 08:45:20 1993
--- /usr/src/bin/login/Makefile	Sun Jan 28 19:57:02 1996
***************
*** 14,32 ****
  # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
  # FITNESS FOR A PARTICULAR PURPOSE.
  #
! # @(#)Makefile	5.3 (Berkeley) 5/9/89
  #
  
  CFLAGS=	-O -i
  LIBC=	/lib/libc.a
  SRCS=	login.c
! OBJS=
  MAN=
  
  all: login
  
! login: ${LIBC}
! 	${CC} -o $@ ${CFLAGS} $@.c -lutil
  
  clean:
  	rm -f ${OBJS} core login
--- 14,32 ----
  # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
  # FITNESS FOR A PARTICULAR PURPOSE.
  #
! # @(#)Makefile	5.3.1 (2.11BSD) 1996/1/28
  #
  
  CFLAGS=	-O -i
  LIBC=	/lib/libc.a
  SRCS=	login.c
! OBJS=	login.o
  MAN=
  
  all: login
  
! login: ${LIBC} ${OBJS}
! 	${CC} -o $@ ${CFLAGS} ${OBJS} -lutil
  
  clean:
  	rm -f ${OBJS} core login
***************
*** 35,41 ****
  	rm -f ${MAN} tags .depend
  
  depend: ${SRCS}
! 	mkdep -p ${CFLAGS} ${SRCS}
  
  install: login
  	install -s -o root -g bin -m 4755 login ${DESTDIR}/bin/login
--- 35,41 ----
  	rm -f ${MAN} tags .depend
  
  depend: ${SRCS}
! 	mkdep ${CFLAGS} ${SRCS}
  
  install: login
  	install -s -o root -g bin -m 4755 login ${DESTDIR}/bin/login
*** /usr/src/bin/ls/Makefile.old	Sat Dec  3 22:02:32 1994
--- /usr/src/bin/ls/Makefile	Fri Jan 12 18:06:26 1996
***************
*** 1,12 ****
  #
  # Public Domain.  12/3/1994 - Steven Schultz
  #
! #	@(#)Makefile	1.0 (2.11BSD GTE) 12/3/94
  #
  CFLAGS=	 -O
  SEPFLAG= -i
! SRCS=	ls.c stat_flags.c strsep.c
! OBJS=	ls.o stat_flags.o strsep.o
  
  all: ls
  
--- 1,12 ----
  #
  # Public Domain.  12/3/1994 - Steven Schultz
  #
! #	@(#)Makefile	1.1 (2.11BSD GTE) 1996/1/12
  #
  CFLAGS=	 -O
  SEPFLAG= -i
! SRCS=	ls.c stat_flags.c
! OBJS=	ls.o stat_flags.o
  
  all: ls
  
*** /usr/src/bin/mail.c.old	Sat Jun 11 17:38:36 1994
--- /usr/src/bin/mail.c	Sat Jan 27 00:41:36 1996
***************
*** 1,5 ****
  #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)mail.c	4.33.2 (2.11BSD GTE) 6/11/94";
  #endif
  
  #include <sys/param.h>
--- 1,5 ----
  #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)mail.c	4.33.3 (2.11BSD GTE) 1996/1/27";
  #endif
  
  #include <sys/param.h>
***************
*** 453,459 ****
  				usage();
  			truename = argv[1];
  			fgets(line, LSIZE, stdin);
! 			if (strcmpn("From", line, 4) == 0)
  				line[0] = '\0';
  			argv++;
  			argc--;
--- 453,459 ----
  				usage();
  			truename = argv[1];
  			fgets(line, LSIZE, stdin);
! 			if (strncmp("From", line, 4) == 0)
  				line[0] = '\0';
  			argv++;
  			argc--;
*** /usr/src/bin/passwd/Makefile.old	Mon Jan 18 08:45:22 1993
--- /usr/src/bin/passwd/Makefile	Sun Jan 28 19:57:08 1996
***************
*** 14,20 ****
  # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  #
! #	@(#)Makefile	5.4 (Berkeley) 2/22/89
  #
  CFLAGS=	-I. -O
  SEPFLAG= -i
--- 14,20 ----
  # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  #
! #	@(#)Makefile	5.4.1 (2.11BSD) 1996/1/27
  #
  CFLAGS=	-I. -O
  SEPFLAG= -i
***************
*** 24,30 ****
  MAN=	passwd.0
  MANSRC=	passwd.1
  
! all: passwd
  
  passwd: ${LIBC} ${OBJS}
  	${CC} ${CFLAGS} ${SEPFLAG} -o $@ ${OBJS}
--- 24,30 ----
  MAN=	passwd.0
  MANSRC=	passwd.1
  
! all: passwd ${MAN}
  
  passwd: ${LIBC} ${OBJS}
  	${CC} ${CFLAGS} ${SEPFLAG} -o $@ ${OBJS}
***************
*** 39,45 ****
  	rm -f tags .depend
  
  depend: ${SRCS}
! 	mkdep -p ${CFLAGS} ${SRCS}
  
  install: ${MAN} passwd
  	install -s -o root -g bin -m 4755 passwd ${DESTDIR}/bin/passwd
--- 39,45 ----
  	rm -f tags .depend
  
  depend: ${SRCS}
! 	mkdep ${CFLAGS} ${SRCS}
  
  install: ${MAN} passwd
  	install -s -o root -g bin -m 4755 passwd ${DESTDIR}/bin/passwd
*** /usr/src/bin/sysctl/Makefile.old	Fri Feb  3 23:15:07 1995
--- /usr/src/bin/sysctl/Makefile	Fri Jan 12 18:54:16 1996
***************
*** 1,13 ****
  #
  # Public Domain.  1/15/1995 - Steven Schultz
  #
! #	@(#)Makefile	1.1 (2.11BSD GTE) 2/3/95
  #
  CFLAGS=	 -O
  SEPFLAG= -i
! VPATH= ../ls
! SRCS=	sysctl.c strsep.c
! OBJS=	sysctl.o strsep.o
  MAN=	sysctl.0
  MANSRC=	sysctl.8
  
--- 1,12 ----
  #
  # Public Domain.  1/15/1995 - Steven Schultz
  #
! #	@(#)Makefile	1.2 (2.11BSD GTE) 1996/1/12
  #
  CFLAGS=	 -O
  SEPFLAG= -i
! SRCS=	sysctl.c
! OBJS=	sysctl.o
  MAN=	sysctl.0
  MANSRC=	sysctl.8
  
*** /usr/src/etc/Makefile.old	Tue Dec 26 21:15:50 1995
--- /usr/src/etc/Makefile	Tue Jan 23 19:30:37 1996
***************
*** 3,9 ****
  # All rights reserved.  The Berkeley software License Agreement
  # specifies the terms and conditions for redistribution.
  #
! #	@(#)Makefile	5.14.4 (2.11BSD GTE) 1995/12/26
  #
  DESTDIR=
  CFLAGS=	-O
--- 3,9 ----
  # All rights reserved.  The Berkeley software License Agreement
  # specifies the terms and conditions for redistribution.
  #
! #	@(#)Makefile	5.14.5 (2.11BSD GTE) 1996/1/15
  #
  DESTDIR=
  CFLAGS=	-O
***************
*** 13,19 ****
  #
  SUBDIR=	chroot config dev_mkdb dump fingerd fsck ftpd getty htable implog \
  	named restor routed talkd termcap tftpd timed tzone XNSrouted \
! 	mkpasswd ping vipw rlogind rshd tcpd
  
  # Shell scripts that need only be installed and are never removed.
  #
--- 13,19 ----
  #
  SUBDIR=	chroot config dev_mkdb dump fingerd fsck ftpd getty htable implog \
  	named restor routed talkd termcap tftpd timed tzone XNSrouted \
! 	mkpasswd mount ping quotacheck vipw rlogind rshd tcpd umount
  
  # Shell scripts that need only be installed and are never removed.
  #
***************
*** 25,33 ****
  STD=	ac accton arff bad144 badsect catman chown clri comsat \
  	cron dcheck diskpart dumpfs edquota flcopy \
  	gettable ifconfig icheck inetd init newfs mkfs mknod \
! 	mkproto mount ncheck quotaon quotacheck reboot renice \
  	repquota rexecd rmt route rwhod rxformat sa savecore \
! 	shutdown slattach swapon syslogd telnetd tunefs umount update
  
  # C programs that live in the current directory and need explicit make lines.
  #
--- 25,33 ----
  STD=	ac accton arff bad144 badsect catman chown clri comsat \
  	cron dcheck diskpart dumpfs edquota flcopy \
  	gettable ifconfig icheck inetd init newfs mkfs mknod \
! 	mkproto ncheck quotaon reboot renice \
  	repquota rexecd rmt route rwhod rxformat sa savecore \
! 	shutdown slattach swapon syslogd telnetd tunefs update
  
  # C programs that live in the current directory and need explicit make lines.
  #
*** /usr/src/etc/chroot/Makefile.old	Wed Feb  3 20:59:29 1993
--- /usr/src/etc/chroot/Makefile	Sun Jan 28 19:57:14 1996
***************
*** 14,20 ****
  # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  #
! #	@(#)Makefile	5.2 (Berkeley) 4/18/89
  #
  
  CFLAGS=	-O
--- 14,20 ----
  # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  #
! #	@(#)Makefile	5.2.1 (2.11BSD) 1996/1/27
  #
  
  CFLAGS=	-O
***************
*** 21,34 ****
  SEPFLAG= -i
  LIBC=	/lib/libc.a
  SRCS=	chroot.c
! OBJS=
  MAN=	chroot.0
  MANSRC=	chroot.8
  
! all: chroot
  
! chroot: ${LIBC}
! 	${CC} ${SEPFLAG} -o $@ ${CFLAGS} $@.c
  
  chroot.0: ${MANSRC}
  	/usr/man/manroff ${MANSRC} > ${MAN}
--- 21,34 ----
  SEPFLAG= -i
  LIBC=	/lib/libc.a
  SRCS=	chroot.c
! OBJS=	chroot.o
  MAN=	chroot.0
  MANSRC=	chroot.8
  
! all: chroot ${MAN}
  
! chroot: ${LIBC} ${OBJS}
! 	${CC} ${SEPFLAG} -o $@ ${CFLAGS} ${OBJS}
  
  chroot.0: ${MANSRC}
  	/usr/man/manroff ${MANSRC} > ${MAN}
***************
*** 40,46 ****
  	rm -f tags .depend
  
  depend: ${SRCS}
! 	mkdep -p ${CFLAGS} ${SRCS}
  
  install: ${MAN} chroot
  	install -s -o root -g bin -m 4751 chroot ${DESTDIR}/etc
--- 40,46 ----
  	rm -f tags .depend
  
  depend: ${SRCS}
! 	mkdep ${CFLAGS} ${SRCS}
  
  install: ${MAN} chroot
  	install -s -o root -g bin -m 4751 chroot ${DESTDIR}/etc
*** /usr/src/etc/ftpd/Makefile.old	Mon Jan 25 21:26:30 1993
--- /usr/src/etc/ftpd/Makefile	Sun Jan 28 01:01:12 1996
***************
*** 14,20 ****
  # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  #
! #	@(#)Makefile	based on 5.10 (Berkeley) 4/20/89
  #
  CFLAGS=	-O -I../ftp -I. -DSETPROCTITLE -I/usr/local/include
  SEPFLAG= -i
--- 14,20 ----
  # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  #
! #	@(#)Makefile	1.2 (2.11BSD) 1996/1/28
  #
  CFLAGS=	-O -I../ftp -I. -DSETPROCTITLE -I/usr/local/include
  SEPFLAG= -i
***************
*** 26,32 ****
  
  all: ftpd
  
! ftpd: ${OBJS} ${LIBC}
  	${CC} ${SEPFLAG} -o $@ ${OBJS}
  
  vers.o: ftpd.c ftpcmd.y
--- 26,32 ----
  
  all: ftpd
  
! ftpd: ${OBJS} ${LIBC} ${MAN}
  	${CC} ${SEPFLAG} -o $@ ${OBJS}
  
  vers.o: ftpd.c ftpcmd.y
*** /usr/src/etc/mkpasswd/mkpasswd.c.old	Sun May 14 22:18:10 1989
--- /usr/src/etc/mkpasswd/mkpasswd.c	Fri Jan 12 20:41:28 1996
***************
*** 15,28 ****
   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #ifndef lint
  char copyright[] =
  "@(#) Copyright (c) 1980, 1983 Regents of the University of California.\n\
   All rights reserved.\n";
- #endif /* not lint */
  
! #ifndef lint
! static char sccsid[] = "@(#)mkpasswd.c	5.4 (Berkeley) 2/22/89";
  #endif /* not lint */
  
  #include <sys/param.h>
--- 15,26 ----
   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #if	!defined(lint) && defined(DOSCCS)
  char copyright[] =
  "@(#) Copyright (c) 1980, 1983 Regents of the University of California.\n\
   All rights reserved.\n";
  
! static char sccsid[] = "@(#)mkpasswd.c	5.4.1 (2.11BSD) 1996/1/12";
  #endif /* not lint */
  
  #include <sys/param.h>
***************
*** 30,35 ****
--- 28,35 ----
  #include <ndbm.h>
  #include <pwd.h>
  #include <stdio.h>
+ #include <strings.h>
+ #include <stdlib.h>
  
  static FILE *_pw_fp;
  static struct passwd _pw_passwd;
***************
*** 60,66 ****
  	DBM *dp;
  	datum key, content;
  	int ch;
! 	char buf[256], nbuf[50], *strerror();
  
  	makeold = 0;
  	while ((ch = getopt(argc, argv, "pv")) != EOF)
--- 60,66 ----
  	DBM *dp;
  	datum key, content;
  	int ch;
! 	char buf[256], nbuf[50];
  
  	makeold = 0;
  	while ((ch = getopt(argc, argv, "pv")) != EOF)
***************
*** 167,173 ****
  	char *fname;
  {
  	register char *p;
! 	char buf[MAXPATHLEN], *strcpy();
  
  	for (p = strcpy(buf, fname); *p; ++p);
  	bcopy(".pag", p, 5);
--- 167,173 ----
  	char *fname;
  {
  	register char *p;
! 	char buf[MAXPATHLEN];
  
  	for (p = strcpy(buf, fname); *p; ++p);
  	bcopy(".pag", p, 5);
***************
*** 190,204 ****
  scanpw()
  {
  	register char *cp;
! 	long atol(), ftell();
! 	char *fgets(), *strsep(), *index();
  
  	for (;;) {
  		offset = ftell(_pw_fp);
  		if (!(fgets(line, sizeof(line), _pw_fp)))
  			return(0);
  		/* skip lines that are too big */
! 		if (!index(line, '\n')) {
  			int ch;
  
  			while ((ch = getc(_pw_fp)) != '\n' && ch != EOF)
--- 190,204 ----
  scanpw()
  {
  	register char *cp;
! 	char	*bp;
  
  	for (;;) {
  		offset = ftell(_pw_fp);
  		if (!(fgets(line, sizeof(line), _pw_fp)))
  			return(0);
+ 		bp = line;
  		/* skip lines that are too big */
! 		if (!(cp = index(line, '\n'))) {
  			int ch;
  
  			while ((ch = getc(_pw_fp)) != '\n' && ch != EOF)
***************
*** 205,229 ****
  				;
  			continue;
  		}
! 		_pw_passwd.pw_name = strsep(line, ":\n");
! 		_pw_passwd.pw_passwd = strsep((char *)NULL, ":\n");
  		offset += _pw_passwd.pw_passwd - line;
! 		if (!(cp = strsep((char *)NULL, ":\n")))
  			continue;
  		_pw_passwd.pw_uid = atoi(cp);
! 		if (!(cp = strsep((char *)NULL, ":\n")))
  			continue;
  		_pw_passwd.pw_gid = atoi(cp);
! 		_pw_passwd.pw_class = strsep((char *)NULL, ":\n");
! 		if (!(cp = strsep((char *)NULL, ":\n")))
  			continue;
  		_pw_passwd.pw_change = atol(cp);
! 		if (!(cp = strsep((char *)NULL, ":\n")))
  			continue;
  		_pw_passwd.pw_expire = atol(cp);
! 		_pw_passwd.pw_gecos = strsep((char *)NULL, ":\n");
! 		_pw_passwd.pw_dir = strsep((char *)NULL, ":\n");
! 		_pw_passwd.pw_shell = strsep((char *)NULL, ":\n");
  		return(1);
  	}
  	/* NOTREACHED */
--- 205,230 ----
  				;
  			continue;
  		}
! 		*cp = '\0';
! 		_pw_passwd.pw_name = strsep(&bp, ":");
! 		_pw_passwd.pw_passwd = strsep(&bp, ":");
  		offset += _pw_passwd.pw_passwd - line;
! 		if (!(cp = strsep(&bp, ":")))
  			continue;
  		_pw_passwd.pw_uid = atoi(cp);
! 		if (!(cp = strsep(&bp, ":")))
  			continue;
  		_pw_passwd.pw_gid = atoi(cp);
! 		_pw_passwd.pw_class = strsep(&bp, ":");
! 		if (!(cp = strsep(&bp, ":")))
  			continue;
  		_pw_passwd.pw_change = atol(cp);
! 		if (!(cp = strsep(&bp, ":")))
  			continue;
  		_pw_passwd.pw_expire = atol(cp);
! 		_pw_passwd.pw_gecos = strsep(&bp, ":");
! 		_pw_passwd.pw_dir = strsep(&bp, ":");
! 		_pw_passwd.pw_shell = strsep(&bp, ":");
  		return(1);
  	}
  	/* NOTREACHED */
*** /usr/src/etc/ping/Makefile.old	Fri Dec 22 23:00:21 1995
--- /usr/src/etc/ping/Makefile	Sun Jan 28 19:57:39 1996
***************
*** 1,5 ****
  #
! #	@(#)Makefile	1.0 (2.11BSD) 1995/12/22
  #
  
  CFLAGS=	-O
--- 1,5 ----
  #
! #	@(#)Makefile	1.1 (2.11BSD) 1996/1/28
  #
  
  CFLAGS=	-O
***************
*** 12,19 ****
  
  all: ping ${MAN}
  
! ping: ${LIBC}
! 	${CC} ${SEPFLAG} -o $@ ${CFLAGS} $@.c
  
  ping.0: ${MANSRC}
  	/usr/man/manroff ${MANSRC} > ${MAN}
--- 12,19 ----
  
  all: ping ${MAN}
  
! ping: ${LIBC} ${OBJS}
! 	${CC} ${SEPFLAG} -o $@ ${CFLAGS} ${OBJS}
  
  ping.0: ${MANSRC}
  	/usr/man/manroff ${MANSRC} > ${MAN}
***************
*** 25,31 ****
  	rm -f tags .depend
  
  depend: ${SRCS}
! 	mkdep -p ${CFLAGS} ${SRCS}
  
  install: ${MAN} ping
  	install -s -o root -g bin -m 4751 ping ${DESTDIR}/etc
--- 25,31 ----
  	rm -f tags .depend
  
  depend: ${SRCS}
! 	mkdep ${CFLAGS} ${SRCS}
  
  install: ${MAN} ping
  	install -s -o root -g bin -m 4751 ping ${DESTDIR}/etc
*** /usr/src/etc/ping/ping.c.old	Wed Oct 11 22:09:32 1995
--- /usr/src/etc/ping/ping.c	Thu Jan 18 22:20:46 1996
***************
*** 1,5 ****
- /*	BSDI	ping.c,v 2.1 1995/02/03 07:30:55 polk Exp	*/
- 
  /*
   * Copyright (c) 1989, 1993
   *	The Regents of the University of California.  All rights reserved.
--- 1,3 ----
***************
*** 41,47 ****
  "@(#) Copyright (c) 1989, 1993\n\
  	The Regents of the University of California.  All rights reserved.\n";
  
! static char sccsid[] = "@(#)ping.c	8.1 (Berkeley) 6/5/93";
  #endif /* not lint */
  
  /*
--- 39,45 ----
  "@(#) Copyright (c) 1989, 1993\n\
  	The Regents of the University of California.  All rights reserved.\n";
  
! static char sccsid[] = "@(#)ping.c	8.1.2 (2.11BSD) 1996/1/18";
  #endif /* not lint */
  
  /*
***************
*** 73,78 ****
--- 71,77 ----
  #include <netinet/ip.h>
  #include <netinet/ip_icmp.h>
  #include <netinet/ip_var.h>
+ #include <arpa/inet.h>
  #include <netdb.h>
  #include <stdio.h>
  #include <ctype.h>
*** /usr/src/etc/rlogind/Makefile.old	Mon Jan 18 08:46:50 1993
--- /usr/src/etc/rlogind/Makefile	Sun Jan 28 19:50:13 1996
***************
*** 14,33 ****
  # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
  # FITNESS FOR A PARTICULAR PURPOSE.
  #
! # @(#)Makefile	5.5 (Berkeley) 5/9/89
  #
  
  CFLAGS=	-O -i
  LIBC=	/lib/libc.a
  SRCS=	rlogind.c
! OBJS=
  MAN=	rlogind.0
  MANSRC=	rlogind.8
  
! all: rlogind
  
! rlogind: ${SRCS} ${LIBC}
! 	${CC} -o $@ ${CFLAGS} ${SRCS} -lutil
  
  clean:
  	rm -f ${OBJS} ${MAN} core rlogind
--- 14,33 ----
  # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
  # FITNESS FOR A PARTICULAR PURPOSE.
  #
! # @(#)Makefile	5.5.1 (2.11BSD) 1996/1/28
  #
  
  CFLAGS=	-O -i
  LIBC=	/lib/libc.a
  SRCS=	rlogind.c
! OBJS=	rlogind.o
  MAN=	rlogind.0
  MANSRC=	rlogind.8
  
! all: rlogind ${MAN}
  
! rlogind: ${LIBC} ${OBJS}
! 	${CC} -o $@ ${CFLAGS} ${OBJS} -lutil
  
  clean:
  	rm -f ${OBJS} ${MAN} core rlogind
***************
*** 36,42 ****
  	rm -f tags .depend
  
  depend: ${SRCS}
! 	mkdep -p ${CFLAGS} ${SRCS}
  
  install: ${MAN} rlogind
  	install -s -o bin -g bin -m 755 rlogind ${DESTDIR}/etc
--- 36,42 ----
  	rm -f tags .depend
  
  depend: ${SRCS}
! 	mkdep ${CFLAGS} ${SRCS}
  
  install: ${MAN} rlogind
  	install -s -o bin -g bin -m 755 rlogind ${DESTDIR}/etc
*** /usr/src/etc/rshd/Makefile.old	Mon Jan 18 08:46:52 1993
--- /usr/src/etc/rshd/Makefile	Sun Jan 28 19:50:28 1996
***************
*** 14,33 ****
  # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
  # FITNESS FOR A PARTICULAR PURPOSE.
  #
! # @(#)Makefile	5.2 (Berkeley) 5/9/89
  #
  
  CFLAGS=	-O -i
  LIBC=	/lib/libc.a
  SRCS=	rshd.c
! OBJS=
  MAN=	rshd.0
  MANSRC=	rshd.8
  
! all: rshd
  
! rshd: ${LIBC}
! 	${CC} -o $@ ${CFLAGS} $@.c
  
  clean:
  	rm -f ${OBJS} ${MAN} core rshd
--- 14,33 ----
  # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
  # FITNESS FOR A PARTICULAR PURPOSE.
  #
! # @(#)Makefile	5.2.1 (2.11BSD) 1996/1/28
  #
  
  CFLAGS=	-O -i
  LIBC=	/lib/libc.a
  SRCS=	rshd.c
! OBJS=	rshd.o
  MAN=	rshd.0
  MANSRC=	rshd.8
  
! all: rshd ${MAN}
  
! rshd: ${LIBC} ${OBJS}
! 	${CC} -o $@ ${CFLAGS} ${OBJS}
  
  clean:
  	rm -f ${OBJS} ${MAN} core rshd
***************
*** 36,42 ****
  	rm -f tags .depend
  
  depend: ${SRCS}
! 	mkdep -p ${CFLAGS} ${SRCS}
  
  install: ${MAN} rshd
  	install -s -o bin -g bin -m 755 rshd ${DESTDIR}/etc
--- 36,42 ----
  	rm -f tags .depend
  
  depend: ${SRCS}
! 	mkdep ${CFLAGS} ${SRCS}
  
  install: ${MAN} rshd
  	install -s -o bin -g bin -m 755 rshd ${DESTDIR}/etc
*** /usr/src/etc/syslogd.c.old	Fri Dec 31 22:28:59 1993
--- /usr/src/etc/syslogd.c	Wed Jan 24 22:44:51 1996
***************
*** 9,15 ****
  "@(#) Copyright (c) 1983 Regents of the University of California.\n\
   All rights reserved.\n";
  
! static char sccsid[] = "@(#)syslogd.c	5.13.1 (2.11BSD GTE) 12/31/93";
  #endif
  
  /*
--- 9,15 ----
  "@(#) Copyright (c) 1983 Regents of the University of California.\n\
   All rights reserved.\n";
  
! static char sccsid[] = "@(#)syslogd.c	5.13.2 (2.11BSD GTE) 1996/1/24";
  #endif
  
  /*
***************
*** 657,671 ****
  				continue;
  		}
  
- 		/* compute the device name */
- 		p = "/dev/12345678";
- 		strcpyn(&p[5], ut.ut_line, UNAMESZ);
- 
  		/*
  		 * Might as well fork instead of using nonblocking I/O
  		 * and doing notty().
  		 */
  		if (fork() == 0) {
  			if (f->f_type == F_WALL) {
  				iov[0].iov_base = greetings;
  				iov[0].iov_len = len;
--- 657,673 ----
  				continue;
  		}
  
  		/*
  		 * Might as well fork instead of using nonblocking I/O
  		 * and doing notty().
  		 */
  		if (fork() == 0) {
+ 
+ 			/* compute the device name */
+ 			p = (char *)calloc(1, sizeof ("/dev/") + UNAMESZ + 2);
+ 			strcpy(p, "/dev/");
+ 			strncat(p+5, ut.ut_line, UNAMESZ);
+ 
  			if (f->f_type == F_WALL) {
  				iov[0].iov_base = greetings;
  				iov[0].iov_len = len;
*** /usr/src/etc/tcpd/Makefile.old	Sun Apr  9 22:00:23 1995
--- /usr/src/etc/tcpd/Makefile	Sun Jan 28 01:18:52 1996
***************
*** 1,4 ****
! # @(#) Makefile 1.18 95/01/30 19:51:42
  #  Tailored and trimmed version created for 2.11BSD on April 7, 1995.
  
  REAL_DAEMON_DIR=/etc
--- 1,4 ----
! # @(#) Makefile 1.19 1996/1/28
  #  Tailored and trimmed version created for 2.11BSD on April 7, 1995.
  
  REAL_DAEMON_DIR=/etc
***************
*** 53,64 ****
  	install -s -m 751 -o root -g staff try-from /usr/ucb/try-from
  	install -s -m 751 -o root -g staff safe_finger /usr/ucb/safe_finger
  	install -s -m 751 -o root -g staff tcpdchk /usr/ucb/tcpdchk
! 	install -m 444 -o bin -g bin hosts3access.0 /usr/man/cat3/hosts_access.0
! 	install -m 444 -o bin -g bin hosts5access.0 /usr/man/cat5/hosts_access.0
! 	install -m 444 -o bin -g bin hosts_options.0 /usr/man/cat5/hosts_options.0
! 	install -m 444 -o bin -g bin tcpd.0 /usr/man/cat8/tcpd.0
! 	install -m 444 -o bin -g bin tcpdchk.0 /usr/man/cat8/tcpdchk.0
! 	install -m 444 -o bin -g bin tcpdmatch.0 /usr/man/cat8/tcpdmatch.0
  
  clean:
  	rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] *.core \
--- 53,64 ----
  	install -s -m 751 -o root -g staff try-from /usr/ucb/try-from
  	install -s -m 751 -o root -g staff safe_finger /usr/ucb/safe_finger
  	install -s -m 751 -o root -g staff tcpdchk /usr/ucb/tcpdchk
! 	install -c -m 444 -o bin -g bin hosts3access.0 /usr/man/cat3/hosts_access.0
! 	install -c -m 444 -o bin -g bin hosts5access.0 /usr/man/cat5/hosts_access.0
! 	install -c -m 444 -o bin -g bin hosts_options.0 /usr/man/cat5/hosts_options.0
! 	install -c -m 444 -o bin -g bin tcpd.0 /usr/man/cat8/tcpd.0
! 	install -c -m 444 -o bin -g bin tcpdchk.0 /usr/man/cat8/tcpdchk.0
! 	install -c -m 444 -o bin -g bin tcpdmatch.0 /usr/man/cat8/tcpdmatch.0
  
  clean:
  	rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] *.core \
*** /usr/src/etc/tzone/Makefile.old	Mon Jan 18 08:46:55 1993
--- /usr/src/etc/tzone/Makefile	Sun Jan 28 01:03:48 1996
***************
*** 1,4 ****
! # @(#)Makefile	1.1 Makefile 3/4/87
  
  DESTDIR=
  
--- 1,4 ----
! # @(#)Makefile	1.2 Makefile 196/1/28
  
  DESTDIR=
  
***************
*** 50,56 ****
  MAN=		$(ZICMAN) $(ZDUMAN)
  MANSRC=		$(ZICMANSRC) $(ZDUMAN)
  
! all:		zdump zic
  
  install:	zic $(DATA) $(MAN)
  		./zic -d ${DESTDIR}/etc/zoneinfo -l $(LOCALTIME) $(DATA)
--- 50,56 ----
  MAN=		$(ZICMAN) $(ZDUMAN)
  MANSRC=		$(ZICMANSRC) $(ZDUMAN)
  
! all:		zdump zic ${ZICMAN} ${ZDUMAN}
  
  install:	zic $(DATA) $(MAN)
  		./zic -d ${DESTDIR}/etc/zoneinfo -l $(LOCALTIME) $(DATA)
*** /usr/src/etc/vipw/Makefile.old	Mon Jan 18 08:46:56 1993
--- /usr/src/etc/vipw/Makefile	Sun Jan 28 19:51:05 1996
***************
*** 14,34 ****
  # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
  # FITNESS FOR A PARTICULAR PURPOSE.
  #
! # @(#)Makefile	5.1 (Berkeley) 10/19/88
  #
  
! CFLAGS=	-O -DUSHRT_MAX=0xffff
  SEPFLAG= -i
  LIBC=	/lib/libc.a
  SRCS=	vipw.c
! OBJS=
  MAN=	vipw.0
  MANSRC=	vipw.8
  
! all: vipw
  
! vipw: ${LIBC}
! 	${CC} ${SEPFLAG} -o $@ ${CFLAGS} $@.c
  
  vipw.0: ${MANSRC}
  	/usr/man/manroff ${MANSRC} > ${MAN}
--- 14,34 ----
  # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
  # FITNESS FOR A PARTICULAR PURPOSE.
  #
! # @(#)Makefile	5.1.2 (2.11BSD) 1996/1/28
  #
  
! CFLAGS=	-O
  SEPFLAG= -i
  LIBC=	/lib/libc.a
  SRCS=	vipw.c
! OBJS=	vipw.o
  MAN=	vipw.0
  MANSRC=	vipw.8
  
! all: vipw ${MAN}
  
! vipw: ${LIBC} ${OBJS}
! 	${CC} ${SEPFLAG} -o $@ ${CFLAGS} ${OBJS}
  
  vipw.0: ${MANSRC}
  	/usr/man/manroff ${MANSRC} > ${MAN}
***************
*** 40,46 ****
  	rm -f tags .depend
  
  depend: ${SRCS}
! 	mkdep -p ${CFLAGS} ${SRCS}
  
  install: ${MAN} vipw
  	install -s -o bin -g bin -m 755 vipw ${DESTDIR}/etc
--- 40,46 ----
  	rm -f tags .depend
  
  depend: ${SRCS}
! 	mkdep ${CFLAGS} ${SRCS}
  
  install: ${MAN} vipw
  	install -s -o bin -g bin -m 755 vipw ${DESTDIR}/etc
*** /usr/src/etc/vipw/vipw.c.old	Sun May 14 22:18:46 1989
--- /usr/src/etc/vipw/vipw.c	Fri Jan 12 20:35:52 1996
***************
*** 15,28 ****
   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #ifndef lint
  char copyright[] =
  "@(#) Copyright (c) 1987 Regents of the University of California.\n\
   All rights reserved.\n";
- #endif /* not lint */
  
! #ifndef lint
! static char sccsid[] = "@(#)vipw.c	5.9 (Berkeley) 4/22/89";
  #endif /* not lint */
  
  #include <sys/param.h>
--- 15,26 ----
   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #if	!defined(lint) && defined(DOSCCS)
  char copyright[] =
  "@(#) Copyright (c) 1987 Regents of the University of California.\n\
   All rights reserved.\n";
  
! static char sccsid[] = "@(#)vipw.c	5.9.1 (2.11BSD) 1996/1/12";
  #endif /* not lint */
  
  #include <sys/param.h>
***************
*** 35,46 ****
  #include <pwd.h>
  #include <stdio.h>
  #include <strings.h>
  
  char *passwd, *temp;
  
  main()
  {
- 	extern int errno;
  	register int n, fd_passwd, fd;
  	struct rlimit rlim;
  	struct stat s1, s2;
--- 33,44 ----
  #include <pwd.h>
  #include <stdio.h>
  #include <strings.h>
+ #include <stdlib.h>
  
  char *passwd, *temp;
  
  main()
  {
  	register int n, fd_passwd, fd;
  	struct rlimit rlim;
  	struct stat s1, s2;
***************
*** 153,175 ****
  check(tfp)
  	FILE *tfp;
  {
! 	register long id;
! 	register int lcnt, root;
  	register char *p, *sh;
- 	long atol();
  	char buf[256], *getusershell();
  
  	for (lcnt = 1; fgets(buf, sizeof(buf), tfp); ++lcnt) {
  		/* skip lines that are too big */
! 		if (!index(buf, '\n')) {
  			(void)fprintf(stderr, "vipw: line too long");
  			goto bad;
  		}
! 		if (!(p = strsep(buf, ":\n")))		/* login */
  			goto general;
  		root = !strcmp(p, "root");
! 		(void)strsep((char *)NULL, ":\n");	/* passwd */
! 		if (!(p = strsep((char *)NULL, ":\n")))	/* uid */
  			goto general;
  		id = atol(p);
  		if (root && id) {
--- 151,176 ----
  check(tfp)
  	FILE *tfp;
  {
! 	long id;
! 	int	root;
! 	register int lcnt;
  	register char *p, *sh;
  	char buf[256], *getusershell();
+ 	char *bp;
  
  	for (lcnt = 1; fgets(buf, sizeof(buf), tfp); ++lcnt) {
+ 		bp = buf;
  		/* skip lines that are too big */
! 		if (!(p = index(buf, '\n'))) {
  			(void)fprintf(stderr, "vipw: line too long");
  			goto bad;
  		}
! 		*p = '\0';
! 		if (!(p = strsep(&bp, ":")))	/* login */
  			goto general;
  		root = !strcmp(p, "root");
! 		(void)strsep(&bp, ":");		/* passwd */
! 		if (!(p = strsep(&bp, ":")))	/* uid */
  			goto general;
  		id = atol(p);
  		if (root && id) {
***************
*** 177,200 ****
  			goto bad;
  		}
  		if (id > USHRT_MAX) {
! 			(void)fprintf(stderr, "vipw: %s > max uid value (%d)",
  			    p, USHRT_MAX);
  			goto bad;
  		}
! 		if (!(p = strsep((char *)NULL, ":\n")))	/* gid */
  			goto general;
  		id = atol(p);
  		if (id > USHRT_MAX) {
! 			(void)fprintf(stderr, "vipw: %s > max gid value (%d)",
  			    p, USHRT_MAX);
  			goto bad;
  		}
! 		(void)strsep((char *)NULL, ":\n");	/* class */
! 		(void)strsep((char *)NULL, ":\n");	/* change */
! 		(void)strsep((char *)NULL, ":\n");	/* expire */
! 		(void)strsep((char *)NULL, ":\n");	/* gecos */
! 		(void)strsep((char *)NULL, ":\n");	/* directory */
! 		if (!(p = strsep((char *)NULL, ":\n")))	/* shell */
  			goto general;
  		if (root && *p)				/* empty == /bin/sh */
  			for (setusershell();;)
--- 178,201 ----
  			goto bad;
  		}
  		if (id > USHRT_MAX) {
! 			(void)fprintf(stderr, "vipw: %s > max uid value (%u)",
  			    p, USHRT_MAX);
  			goto bad;
  		}
! 		if (!(p = strsep(&bp, ":")))	/* gid */
  			goto general;
  		id = atol(p);
  		if (id > USHRT_MAX) {
! 			(void)fprintf(stderr, "vipw: %s > max gid value (%u)",
  			    p, USHRT_MAX);
  			goto bad;
  		}
! 		(void)strsep(&bp, ":");		/* class */
! 		(void)strsep(&bp, ":");		/* change */
! 		(void)strsep(&bp, ":");		/* expire */
! 		(void)strsep(&bp, ":");		/* gecos */
! 		(void)strsep(&bp, ":");		/* directory */
! 		if (!(p = strsep(&bp, ":")))	/* shell */
  			goto general;
  		if (root && *p)				/* empty == /bin/sh */
  			for (setusershell();;)
***************
*** 205,211 ****
  				}
  				else if (!strcmp(p, sh))
  					break;
! 		if (strsep((char *)NULL, ":\n")) {	/* too many */
  general:		(void)fprintf(stderr, "vipw: corrupted entry");
  bad:			(void)fprintf(stderr, "; line #%d.\n", lcnt);
  			(void)fflush(stderr);
--- 206,212 ----
  				}
  				else if (!strcmp(p, sh))
  					break;
! 		if (strsep(&bp, ":")) {	/* too many */
  general:		(void)fprintf(stderr, "vipw: corrupted entry");
  bad:			(void)fprintf(stderr, "; line #%d.\n", lcnt);
  			(void)fflush(stderr);
***************
*** 230,238 ****
  
  edit()
  {
- 	extern int errno;
  	int status, pid, w;
! 	char *p, *editor, *getenv(), *strerror();
  
  	if (editor = getenv("EDITOR")) {
  		if (p = rindex(editor, '/'))
--- 231,238 ----
  
  edit()
  {
  	int status, pid, w;
! 	char *p, *editor;
  
  	if (editor = getenv("EDITOR")) {
  		if (p = rindex(editor, '/'))