From carson@lehman.com Mon Nov 21 17:08:55 1994
Received: from relay.tis.com by tis.com (4.1/SUN-5.64)
	id AA10031; Mon, 21 Nov 94 17:08:51 EST
Received: from lehman.com(192.147.66.1) by relay via smap (V1.3)
	id sma026591; Mon Nov 21 17:10:21 1994
Received: from relay.lehman.com by lehman.com (8.6.4/LB 0.1)
	id RAA05102; Mon, 21 Nov 1994 17:09:56 -0500
From: carson@lehman.com
Received: from kublai.lehman.com by relay.lehman.com (4.1/LB-0.6)
	id AA25283; Mon, 21 Nov 94 17:09:46 EST
Received: from dragon.lehman.com by kublai.lehman.com (4.1/SMI-SVR4)
	id AA28012; Mon, 21 Nov 94 17:09:43 EST
Received: by dragon.lehman.com (5.0/Lehman Bros. V1.5)
	id AA18390; Mon, 21 Nov 1994 17:09:43 -0500
Date: Mon, 21 Nov 1994 17:09:43 -0500
Message-Id: <9411212209.AA18390@dragon.lehman.com>
To: Marcus J Ranum <mjr@tis.com>
Subject: Re: TIS on Solaris
In-Reply-To: <9411211911.AA19715@tis.com>
References: <9411211848.AA16696@dragon.lehman.com>
	<9411211911.AA19715@tis.com>
Reply-To: carson@lehman.com
Content-Length: 25077
Status: RO

Here are my diffs against 1.3.  The tools are _not_ ported, but the gateways
are.  These have not been extensively tested (yet).  I'll let you know if I
find any problems.

--
Carson Gaspar -- carson@cs.columbia.edu carson@lehman.com
<This is the boring business .sig - no outre sayings here>

diff -c -r -P -x *.orig -x *~ ./Makefile ../fwtk-work/Makefile
*** ./Makefile	Fri Nov  4 18:31:26 1994
--- ../fwtk-work/Makefile	Mon Nov 21 13:33:52 1994
***************
*** 22,27 ****
--- 22,28 ----
  
  
  # directories to build executables in
+ #DIRS=	smap smapd netacl plug-gw ftp-gw tn-gw rlogin-gw x-gw
  DIRS=	smap smapd netacl plug-gw ftp-gw tn-gw rlogin-gw http-gw x-gw
  
  
diff -c -r -P -x *.orig -x *~ ./Makefile.config ../fwtk-work/Makefile.config
*** ./Makefile.config	Fri Nov  4 18:31:31 1994
--- ../fwtk-work/Makefile.config	Mon Nov 21 15:05:57 1994
***************
*** 13,19 ****
  
  
  # Your C compiler (eg, "cc" or "gcc")
! CC=	cc
  
  
  # program to use for installation -- this may or may not preserve
--- 13,19 ----
  
  
  # Your C compiler (eg, "cc" or "gcc")
! CC=	gcc
  
  
  # program to use for installation -- this may or may not preserve
***************
*** 25,46 ****
  # Options for your compiler (eg, "-g" for debugging, "-O" for
  # optimizing, or "-g -O" for both under GCC)
  #COPT=	-g -traditional
! COPT=	-g
  #COPT=	-O
  
  
  # Version of "make" you want to use
  #MAKE=	gnumake
! MAKE=	make
  
  
  # Your ranlib utility (use "touch" if you don't have ranlib)
! RANLIB=	ranlib
  #RANLIB=	touch
  
  
  # Destination directory for installation of binaries
! DEST=	/usr/local/etc
  
  
  # Destination directory for installation of man pages
--- 25,46 ----
  # Options for your compiler (eg, "-g" for debugging, "-O" for
  # optimizing, or "-g -O" for both under GCC)
  #COPT=	-g -traditional
! COPT=	-g -DSYSV
  #COPT=	-O
  
  
  # Version of "make" you want to use
  #MAKE=	gnumake
! MAKE=	/opt/gnu/bin/make
  
  
  # Your ranlib utility (use "touch" if you don't have ranlib)
! RANLIB=	touch
  #RANLIB=	touch
  
  
  # Destination directory for installation of binaries
! DEST=	/opt/fwtk/bin
  
  
  # Destination directory for installation of man pages
***************
*** 49,55 ****
  
  # Names of any auxiliary libraries your system may require (e.g., -lsocket)
  # If you want to link against a resolver library, specify it here.
! AUXLIB= -lresolv
  #AUXLIB= -lsocket
  
  
--- 49,55 ----
  
  # Names of any auxiliary libraries your system may require (e.g., -lsocket)
  # If you want to link against a resolver library, specify it here.
! AUXLIB= -lresolv -lsocket -lnsl
  #AUXLIB= -lsocket
  
  
***************
*** 63,81 ****
  # or -Bstatic for static binaries under SunOS 4.1.x)
  #LDFL=	-Bstatic
  #LDFL=
! LDFL= -g
  
  
  # Location of the fwtk sources [For #include by any external tools needing it]
! FWTKSRCDIR=/u/b/mjr/firewall/fwtk
  #FWTKSRCDIR=/usr/local/src/fwtk
  
  
  # Location of X libraries for X-gw
  #XLIBDIR=/usr/X11/lib
! XLIBDIR=/usr/local/X11R5/lib
  
  
  # Location of X include files
  #XINCLUDE=/usr/X11/include
! XINCLUDE=/usr/local/X11R5/include
--- 63,85 ----
  # or -Bstatic for static binaries under SunOS 4.1.x)
  #LDFL=	-Bstatic
  #LDFL=
! #LDFL= -g
! #LDFL= -Bstatic
  
  
  # Location of the fwtk sources [For #include by any external tools needing it]
! FWTKSRCDIR=/home/carson/src/firewalls/fwtk-work
  #FWTKSRCDIR=/usr/local/src/fwtk
  
  
  # Location of X libraries for X-gw
  #XLIBDIR=/usr/X11/lib
! XLIBDIR=/usr/openwin/lib
  
  
  # Location of X include files
  #XINCLUDE=/usr/X11/include
! XINCLUDE=/usr/openwin/include
! 
! # Objects to include in libfwall for SYSV
! SYSVOBJ=signal.o
diff -c -r -P -x *.orig -x *~ ./auth/authsrv.c ../fwtk-work/auth/authsrv.c
*** ./auth/authsrv.c	Fri Nov  4 18:31:15 1994
--- ../fwtk-work/auth/authsrv.c	Mon Nov 21 13:33:53 1994
***************
*** 14,20 ****
--- 14,23 ----
  #include	<syslog.h>
  #include	<time.h>
  
+ /* Added for Solaris 2.3 Compatibility 11/08/94, dbsmall */
+ #ifndef SYSV
  extern	char	*rindex();
+ #endif /*SYSV*/
  extern	char	*ctime();
  
  #include	"firewall.h"
diff -c -r -P -x *.orig -x *~ ./firewall.h ../fwtk-work/firewall.h
*** ./firewall.h	Fri Nov  4 18:31:26 1994
--- ../fwtk-work/firewall.h	Mon Nov 21 14:57:11 1994
***************
*** 34,40 ****
  #define	FWTK_VERSION		"TIS Internet Firewall Toolkit V1.3"
  #define	FWTK_VERSION_MINOR	"V1.3"
  
! 
  
  /*
  The firewall toolkit uses a single master configuration
--- 34,43 ----
  #define	FWTK_VERSION		"TIS Internet Firewall Toolkit V1.3"
  #define	FWTK_VERSION_MINOR	"V1.3"
  
! /*
! If your headers define getenv to take const char *name, define this
! */
! #define GETENV_CONST_CHAR
  
  /*
  The firewall toolkit uses a single master configuration
***************
*** 42,48 ****
  system.
  */
  #ifndef	PERMFILE
! #define	PERMFILE	"/usr/local/etc/netperm-table"
  #endif
  
  
--- 45,51 ----
  system.
  */
  #ifndef	PERMFILE
! #define	PERMFILE	"/opt/fwtk/etc/netperm-table"
  #endif
  
  
***************
*** 62,67 ****
--- 65,80 ----
  #define	LFAC	LOG_DAEMON
  #endif
  
+ /* This is for Solaris 2.3 Compatibility */
+ /* Added by David Small, 11/4/94	 */
+ #ifdef SYSV
+ #define index strchr
+ #define rindex strrchr
+ #define bcopy(f,t,l) memmove(t,f,l)
+ #define bcmp memcmp
+ #define bzero(s,n) memset(s,(char)0,n)
+ #endif /*SYSV*/
+ /* end of Solaris Modifications */
  
  /*
  Pick one of these two ways of declaring malloc(). This
***************
*** 77,84 ****
  makes no difference. make sure that whichever your machine uses
  is defined below.
  */
! #define DIRECT_STRUCT   struct direct
! /* #define DIRECT_STRUCT   struct dirent */
  
  
  /*
--- 90,97 ----
  makes no difference. make sure that whichever your machine uses
  is defined below.
  */
! /*        #define DIRECT_STRUCT   struct direct */
! #define DIRECT_STRUCT   struct dirent
  
  
  /*
***************
*** 87,94 ****
  enables lockf() style locking.
  The locking primitives are implemented in lib/lock.c
  */
! #define	LOCK_FLOCK
! /* #define	LOCK_LOCKF */
  
  
  
--- 100,107 ----
  enables lockf() style locking.
  The locking primitives are implemented in lib/lock.c
  */
! /*             #define	LOCK_FLOCK */
! #define	LOCK_LOCKF
  
  
  
***************
*** 100,106 ****
  This primitive is implemented in lib/urg.c
  */
  #define	USE_F_SETOWN
! /* #define	USE_SIOCSPGRP */
  
  
  
--- 113,119 ----
  This primitive is implemented in lib/urg.c
  */
  #define	USE_F_SETOWN
! /*#define	USE_SIOCSPGRP */
  
  
  
***************
*** 119,126 ****
  pick which one you use. Or if you want to use a different
  PRNG, replace the one in lib/rand.c
  */
! #define	USE_RANDOM
! /* #define	USE_RAND */
  
  
  
--- 132,139 ----
  pick which one you use. Or if you want to use a different
  PRNG, replace the one in lib/rand.c
  */
! /*      #define	USE_RANDOM */
! #define	USE_RAND
  
  
  
diff -c -r -P -x *.orig -x *~ ./ftp-gw/ftp-gw.c ../fwtk-work/ftp-gw/ftp-gw.c
*** ./ftp-gw/ftp-gw.c	Fri Nov  4 18:30:16 1994
--- ../fwtk-work/ftp-gw/ftp-gw.c	Mon Nov 21 13:33:53 1994
***************
*** 25,34 ****
--- 25,41 ----
  #include	<sys/time.h>
  #include	<sys/types.h>
  #include	<sys/socket.h>
+ /* Also Added for Solaris 2.3 Compatiblity, dbsmall 11/08/94 */
+ #ifdef SYSV
+ #include	<sys/sockio.h>
+ #endif /*SYSV*/
  #include	<netinet/in.h>
  
+ /* Added for Solaris 2.3 Compatibility, dbsmall 11/08/94 */
+ #ifndef SYSV
  extern	char	*rindex();
  extern	char	*index();
+ #endif /*SYSV*/
  extern	char	*strtok();
  extern	char	*inet_ntoa();
  
diff -c -r -P -x *.orig -x *~ ./http-gw/Makefile ../fwtk-work/http-gw/Makefile
*** ./http-gw/Makefile	Fri Nov  4 18:31:27 1994
--- ../fwtk-work/http-gw/Makefile	Mon Nov 21 13:33:53 1994
***************
*** 19,31 ****
  all:	version http-gw gauthd
  
  http-gw: version.h http-gw.o ../libfwall.a ../libauth.a
! 	cc $(CFLAGS) -o $@ http-gw.o ../libfwall.a ../libauth.a
  
  gauthd:	gauthd.o ../libfwall.a ../libauth.a
! 	cc $(CFLAGS) -o $@ gauthd.o ../libfwall.a ../libauth.a
  
  version: version.o
! 	cc $(CFLAGS) -o $@ version.o
  
  version.h: http-gw.c
  	./version 
--- 19,34 ----
  all:	version http-gw gauthd
  
  http-gw: version.h http-gw.o ../libfwall.a ../libauth.a
! #	cc $(CFLAGS) -o $@ http-gw.o ../libfwall.a ../libauth.a
! 	$(CC) $(LDFL)  $(CFLAGS) -o $@ http-gw.o ../libfwall.a ../libauth.a $(AUXLIB)
  
  gauthd:	gauthd.o ../libfwall.a ../libauth.a
! #	cc $(CFLAGS) -o $@ gauthd.o ../libfwall.a ../libauth.a
! 	$(CC) $(LDFL) $(CFLAGS) -o $@ gauthd.o ../libfwall.a ../libauth.a $(AUXLIB)
  
  version: version.o
! #	cc $(CFLAGS) -o $@ version.o
! 	$(CC) $(LDFL) $(CFLAGS) -o $@ version.o $(AUXLIB)
  
  version.h: http-gw.c
  	./version 
diff -c -r -P -x *.orig -x *~ ./http-gw/gauthd.c ../fwtk-work/http-gw/gauthd.c
*** ./http-gw/gauthd.c	Fri Nov  4 18:31:27 1994
--- ../fwtk-work/http-gw/gauthd.c	Mon Nov 21 13:33:53 1994
***************
*** 27,36 ****
--- 27,43 ----
  #include	<sys/time.h>
  #include	<sys/types.h>
  #include	<sys/socket.h>
+ /* Inserted for Solaris 2.3 Compatibility, dbsmall 11/08/94 */
+ #ifdef SYSV
+ #include	<sys/sockio.h>
+ #endif /*SYSV*/
  #include	<netinet/in.h>
  
+ /*Inserted for Solaris 2.3 Compatibility, dbsmall 11/08/94 */
+ #ifndef SYSV
  extern	char	*rindex();
  extern	char	*index();
+ #endif /*SYSV*/
  extern	char	*strtok();
  extern	char	*inet_ntoa();
  
diff -c -r -P -x *.orig -x *~ ./http-gw/http-gw.c ../fwtk-work/http-gw/http-gw.c
*** ./http-gw/http-gw.c	Fri Nov  4 18:31:28 1994
--- ../fwtk-work/http-gw/http-gw.c	Mon Nov 21 14:50:11 1994
***************
*** 17,23 ****
  
  #include	<stdio.h>
  #include	<ctype.h>
- #include	<syslog.h>
  #include	<sys/signal.h>
  #include	<sys/ioctl.h>
  #include	<sys/errno.h>
--- 17,22 ----
***************
*** 30,54 ****
  #include	<sys/time.h>
  #include	<sys/types.h>
  #include	<sys/socket.h>
  #include	<netinet/in.h>
  #include	<netdb.h>
  #include	<string.h>
- #include	<varargs.h>
  
- 
  #include	<net/if.h>
  #ifndef VERSION
  #include	"version.h"
  #endif
  
  extern	char	*rindex();
  extern	char	*index();
  extern	char	*strtok();
  extern	char	*inet_ntoa();
  
  extern	char	*optarg;
  
  #include	"firewall.h"
  
  #ifndef	VERSION
  #define	VERSION	"0.9"
--- 29,63 ----
  #include	<sys/time.h>
  #include	<sys/types.h>
  #include	<sys/socket.h>
+ /*Added for Solaris 2.3 Compatibility, dbsmall 11/08/94 */
+ #ifdef SYSV
+ #include	<sys/sockio.h>
+ #endif /*SYSV*/
  #include	<netinet/in.h>
  #include	<netdb.h>
  #include	<string.h>
  
  #include	<net/if.h>
  #ifndef VERSION
  #include	"version.h"
  #endif
  
+ /* Added for Solaris 2.3 Compatibility, dbsmall 11/08/94 */
+ #ifndef SYSV
  extern	char	*rindex();
  extern	char	*index();
+ #endif /*SYSV*/
  extern	char	*strtok();
  extern	char	*inet_ntoa();
  
  extern	char	*optarg;
  
  #include	"firewall.h"
+ 
+ #include	<varargs.h>
+ 
+ /* This _must_ be _after_ varargs.h, or stdarg.h gets included */
+ #include	<syslog.h>
  
  #ifndef	VERSION
  #define	VERSION	"0.9"
diff -c -r -P -x *.orig -x *~ ./http-gw/version.h ../fwtk-work/http-gw/version.h
*** ./http-gw/version.h	Fri Nov  4 18:31:28 1994
--- ../fwtk-work/http-gw/version.h	Mon Nov 21 14:50:14 1994
***************
*** 1 ****
! #define VERSION "Ver 1.0 / 42"
--- 1 ----
! #define VERSION "Ver 1.0 / 49"
diff -c -r -P -x *.orig -x *~ ./lib/Makefile ../fwtk-work/lib/Makefile
*** ./lib/Makefile	Fri Nov  4 18:30:21 1994
--- ../fwtk-work/lib/Makefile	Mon Nov 21 14:22:33 1994
***************
*** 20,26 ****
  SYSLOG=	syslog.o
  
  OBJ=	config.o daemon.o pname.o nama.o mapu.o mapg.o conn.o hnam.o \
! 	mktemp.o rand.o enargv.o alldi.o lock.o urg.o $(SYSLOG)
  
  
  all:	$(LIB)
--- 20,26 ----
  SYSLOG=	syslog.o
  
  OBJ=	config.o daemon.o pname.o nama.o mapu.o mapg.o conn.o hnam.o \
! 	mktemp.o rand.o enargv.o alldi.o lock.o urg.o $(SYSLOG) $(SYSVOBJ)
  
  
  all:	$(LIB)
diff -c -r -P -x *.orig -x *~ ./lib/config.c ../fwtk-work/lib/config.c
*** ./lib/config.c	Fri Nov  4 18:30:18 1994
--- ../fwtk-work/lib/config.c	Mon Nov 21 13:33:54 1994
***************
*** 17,23 ****
--- 17,26 ----
  #include	<syslog.h>
  
  extern	char	*strtok();
+ /* Added for Solaris Compatibility, dbsmall 11/08/94 */
+ #ifndef SYSV
  extern	char	*index();
+ #endif /*SYSV*/
  
  #include	"firewall.h"
  
diff -c -r -P -x *.orig -x *~ ./lib/signal.c ../fwtk-work/lib/signal.c
*** ./lib/signal.c	Wed Dec 31 19:00:00 1969
--- ../fwtk-work/lib/signal.c	Mon Nov 21 14:21:37 1994
***************
*** 0 ****
--- 1,27 ----
+ /* Reliable version of signal(), using POSIX sigaction().  */
+ 
+ #include	<signal.h>
+ 
+ typedef void    Sigfunc(int);
+ 
+ Sigfunc *
+ signal(int signo, Sigfunc *func)
+ {
+ 	struct sigaction	act, oact;
+ 
+ 	act.sa_handler = func;
+ 	sigemptyset(&act.sa_mask);
+ 	act.sa_flags = 0;
+ 	if (signo == SIGALRM) {
+ #ifdef	SA_INTERRUPT
+ 		act.sa_flags |= SA_INTERRUPT;	/* SunOS */
+ #endif
+ 	} else {
+ #ifdef	SA_RESTART
+ 		act.sa_flags |= SA_RESTART;		/* SVR4, 44BSD */
+ #endif
+ 	}
+ 	if (sigaction(signo, &act, &oact) < 0)
+ 		return(SIG_ERR);
+ 	return(oact.sa_handler);
+ }
diff -c -r -P -x *.orig -x *~ ./lib/syslog.c ../fwtk-work/lib/syslog.c
*** ./lib/syslog.c	Fri Nov  4 18:30:21 1994
--- ../fwtk-work/lib/syslog.c	Mon Nov 21 13:33:54 1994
***************
*** 80,86 ****
--- 80,89 ----
  
  void vsyslog();
  void openlog();
+ /* Added for Solaris 2.3 Compaitiblity */
+ #ifndef SYSV
  extern	char *index();
+ #endif /*SYSV*/
  
  /*
   * syslog, vsyslog --
diff -c -r -P -x *.orig -x *~ ./rlogin-gw/rlogin-gw.c ../fwtk-work/rlogin-gw/rlogin-gw.c
*** ./rlogin-gw/rlogin-gw.c	Fri Nov  4 18:31:20 1994
--- ../fwtk-work/rlogin-gw/rlogin-gw.c	Mon Nov 21 13:33:54 1994
***************
*** 17,22 ****
--- 17,26 ----
  #include	<sys/types.h>
  #include	<sys/time.h>
  #include	<sys/socket.h>
+ /*Added for Solaris 2.3 Compatibility, dbsmall 11/08/94 */
+ #ifdef SYSV
+ #include	<sys/sockio.h>
+ #endif /*SYSV*/
  #include	<sys/signal.h>
  #include	<sys/ioctl.h>
  #include	<fcntl.h>
***************
*** 25,31 ****
--- 29,38 ----
  
  #include	"firewall.h"
  
+ /*Included for Solaris 2.3 compatiblity, dbsmall 11/08/94 */
+ #ifndef SYSV
  extern	char	*index();
+ #endif /*SYSV*/
  
  #define	RLOGINPORT	513
  
diff -c -r -P -x *.orig -x *~ ./smap/smap.c ../fwtk-work/smap/smap.c
*** ./smap/smap.c	Fri Nov  4 18:30:12 1994
--- ../fwtk-work/smap/smap.c	Mon Nov 21 13:33:54 1994
***************
*** 210,216 ****
--- 210,221 ----
  
  #ifdef	SO_KEEPALIVE
  	x = 1;
+ /*added for Solaris 2.3 Compatiblity, dbsmall 11/08/94 */
+ #ifndef SYSV
  	(void)setsockopt(fileno(stdin),SOL_SOCKET,SO_KEEPALIVE,&x,sizeof(x));
+ #else /*SYSV*/
+ 	(int)setsockopt(fileno(stdin),SOL_SOCKET,SO_KEEPALIVE,&x,sizeof(x));
+ #endif /*SYSV*/
  #endif
  
  	while(1) {
diff -c -r -P -x *.orig -x *~ ./smapd/smapd.c ../fwtk-work/smapd/smapd.c
*** ./smapd/smapd.c	Fri Nov  4 18:30:13 1994
--- ../fwtk-work/smapd/smapd.c	Mon Nov 21 13:33:54 1994
***************
*** 20,26 ****
--- 20,32 ----
  #include	<sys/types.h>
  #include	<sys/stat.h>
  #include	<sys/file.h>
+ /*Added for Solaris 2.3 compatibility, dbsmall 11/08/94 */
+ #ifndef SYSV
  #include	<sys/dir.h>
+ #else /*SYSV*/
+ #include	<dirent.h>
+ #include	<fcntl.h>
+ #endif
  #include	<sys/signal.h>
  
  #include	"firewall.h"
***************
*** 49,55 ****
--- 55,64 ----
  */
  
  
+ /*Added for Solaris 2.3 Compatibility, dbsmall 11/08/94 */
+ #ifndef SYSV
  extern	char	*index();
+ #endif
  
  
  struct	towho	{
diff -c -r -P -x *.orig -x *~ ./sysexits.h ../fwtk-work/sysexits.h
*** ./sysexits.h	Wed Dec 31 19:00:00 1969
--- ../fwtk-work/sysexits.h	Mon Nov 21 14:30:48 1994
***************
*** 0 ****
--- 1,119 ----
+ /*
+  * Copyright (c) 1987 Regents of the University of California.
+  * All rights reserved.
+  *
+  * Redistribution and use in source and binary forms, with or without
+  * modification, are permitted provided that the following conditions
+  * are met:
+  * 1. Redistributions of source code must retain the above copyright
+  *    notice, this list of conditions and the following disclaimer.
+  * 2. Redistributions in binary form must reproduce the above copyright
+  *    notice, this list of conditions and the following disclaimer in the
+  *    documentation and/or other materials provided with the distribution.
+  * 3. All advertising materials mentioning features or use of this software
+  *    must display the following acknowledgement:
+  *	This product includes software developed by the University of
+  *	California, Berkeley and its contributors.
+  * 4. Neither the name of the University nor the names of its contributors
+  *    may be used to endorse or promote products derived from this software
+  *    without specific prior written permission.
+  *
+  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+  * SUCH DAMAGE.
+  *
+  *	from: @(#)sysexits.h	4.8 (Berkeley) 4/3/91
+  *	$Id: sysexits.h,v 1.3 1993/08/01 18:45:12 mycroft Exp $
+  */
+ 
+ #ifndef	_SYSEXITS_H_
+ #define	_SYSEXITS_H_
+ 
+ /*
+  *  SYSEXITS.H -- Exit status codes for system programs.
+  *
+  *	This include file attempts to categorize possible error
+  *	exit statuses for system programs, notably delivermail
+  *	and the Berkeley network.
+  *
+  *	Error numbers begin at EX__BASE to reduce the possibility of
+  *	clashing with other exit statuses that random programs may
+  *	already return.  The meaning of the codes is approximately
+  *	as follows:
+  *
+  *	EX_USAGE -- The command was used incorrectly, e.g., with
+  *		the wrong number of arguments, a bad flag, a bad
+  *		syntax in a parameter, or whatever.
+  *	EX_DATAERR -- The input data was incorrect in some way.
+  *		This should only be used for user's data & not
+  *		system files.
+  *	EX_NOINPUT -- An input file (not a system file) did not
+  *		exist or was not readable.  This could also include
+  *		errors like "No message" to a mailer (if it cared
+  *		to catch it).
+  *	EX_NOUSER -- The user specified did not exist.  This might
+  *		be used for mail addresses or remote logins.
+  *	EX_NOHOST -- The host specified did not exist.  This is used
+  *		in mail addresses or network requests.
+  *	EX_UNAVAILABLE -- A service is unavailable.  This can occur
+  *		if a support program or file does not exist.  This
+  *		can also be used as a catchall message when something
+  *		you wanted to do doesn't work, but you don't know
+  *		why.
+  *	EX_SOFTWARE -- An internal software error has been detected.
+  *		This should be limited to non-operating system related
+  *		errors as possible.
+  *	EX_OSERR -- An operating system error has been detected.
+  *		This is intended to be used for such things as "cannot
+  *		fork", "cannot create pipe", or the like.  It includes
+  *		things like getuid returning a user that does not
+  *		exist in the passwd file.
+  *	EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
+  *		etc.) does not exist, cannot be opened, or has some
+  *		sort of error (e.g., syntax error).
+  *	EX_CANTCREAT -- A (user specified) output file cannot be
+  *		created.
+  *	EX_IOERR -- An error occurred while doing I/O on some file.
+  *	EX_TEMPFAIL -- temporary failure, indicating something that
+  *		is not really an error.  In sendmail, this means
+  *		that a mailer (e.g.) could not create a connection,
+  *		and the request should be reattempted later.
+  *	EX_PROTOCOL -- the remote system returned something that
+  *		was "not possible" during a protocol exchange.
+  *	EX_NOPERM -- You did not have sufficient permission to
+  *		perform the operation.  This is not intended for
+  *		file system problems, which should use NOINPUT or
+  *		CANTCREAT, but rather for higher level permissions.
+  */
+ 
+ #define EX_OK		0	/* successful termination */
+ 
+ #define EX__BASE	64	/* base value for error messages */
+ 
+ #define EX_USAGE	64	/* command line usage error */
+ #define EX_DATAERR	65	/* data format error */
+ #define EX_NOINPUT	66	/* cannot open input */
+ #define EX_NOUSER	67	/* addressee unknown */
+ #define EX_NOHOST	68	/* host name unknown */
+ #define EX_UNAVAILABLE	69	/* service unavailable */
+ #define EX_SOFTWARE	70	/* internal software error */
+ #define EX_OSERR	71	/* system error (e.g., can't fork) */
+ #define EX_OSFILE	72	/* critical OS file missing */
+ #define EX_CANTCREAT	73	/* can't create (user) output file */
+ #define EX_IOERR	74	/* input/output error */
+ #define EX_TEMPFAIL	75	/* temp failure; user is invited to retry */
+ #define EX_PROTOCOL	76	/* remote error in protocol */
+ #define EX_NOPERM	77	/* permission denied */
+ #define EX_CONFIG	78	/* configuration error */
+ 
+ #define EX__MAX	78	/* maximum listed value */
+ 
+ #endif /* !_SYSEXITS_H_ */
diff -c -r -P -x *.orig -x *~ ./tn-gw/tn-gw.c ../fwtk-work/tn-gw/tn-gw.c
*** ./tn-gw/tn-gw.c	Fri Nov  4 18:30:18 1994
--- ../fwtk-work/tn-gw/tn-gw.c	Mon Nov 21 13:33:54 1994
***************
*** 27,36 ****
--- 27,43 ----
  #include	<sys/time.h>
  #include	<sys/types.h>
  #include	<sys/socket.h>
+ /*Added for Solaris 2.3 Compaitiblity, dbsmall 11/08/94 */
+ #ifdef SYSV
+ #include	<sys/sockio.h>
+ #endif /*SYSV*/
  #include	<netinet/in.h>
  #include	<netdb.h>
  
+ /*Added for Solaris 2.3 Compatibility, dsmall 11/08/94 */
+ #ifndef SYSV
  extern	char	*index();
+ #endif /*SYSV*/
  
  #include	"firewall.h"
  
diff -c -r -P -x *.orig -x *~ ./tools/admin/Makefile ../fwtk-work/tools/admin/Makefile
*** ./tools/admin/Makefile	Fri Nov  4 18:31:11 1994
--- ../fwtk-work/tools/admin/Makefile	Mon Nov 21 13:33:54 1994
***************
*** 1,4 ****
! DIRS=	portscan netscan flog reporting
  
  include ../../Makefile.config
  
--- 1,5 ----
! DIRS=	portscan netscan reporting
! #DIRS=	portscan netscan flog reporting
  
  include ../../Makefile.config
  
diff -c -r -P -x *.orig -x *~ ./tools/admin/portscan/portscan.c ../fwtk-work/tools/admin/portscan/portscan.c
*** ./tools/admin/portscan/portscan.c	Fri Nov  4 18:31:05 1994
--- ../fwtk-work/tools/admin/portscan/portscan.c	Mon Nov 21 13:33:54 1994
***************
*** 4,9 ****
--- 4,10 ----
  #include	<sys/socket.h>
  #include	<netinet/in.h>
  #include	<netdb.h>
+ #include	"/usr/local/src/fwtk1.3.dbs/firewall.h"
  
  extern	char		*optarg;
  extern	int		optind;
diff -c -r -P -x *.orig -x *~ ./x-gw/getenv.c ../fwtk-work/x-gw/getenv.c
*** ./x-gw/getenv.c	Fri Nov  4 18:31:22 1994
--- ../fwtk-work/x-gw/getenv.c	Mon Nov 21 14:55:33 1994
***************
*** 38,43 ****
--- 38,44 ----
  #include <stdlib.h>
  #include <stddef.h>
  #include <string.h>
+ #include "firewall.h"
  
  /*
   * getenv --
***************
*** 45,51 ****
--- 46,56 ----
   */
  char *
  getenv(name)
+ #if defined(GETENV_CONST_CHAR)
+ 	const char *name;
+ #else
  	char *name;
+ #endif
  {
  	int offset;
  	char *_findenv();
diff -c -r -P -x *.orig -x *~ ./x-gw/setenv.c ../fwtk-work/x-gw/setenv.c
*** ./x-gw/setenv.c	Fri Nov  4 18:31:23 1994
--- ../fwtk-work/x-gw/setenv.c	Mon Nov 21 13:33:55 1994
***************
*** 31,36 ****
--- 31,39 ----
   * SUCH DAMAGE.
   */
  
+ /*Added to make the TIS fwtk have bcopy mapped for Solaris 2.3, dbsmall 11/08/94*/
+ #include	"firewall.h"
+ 
  #if defined(LIBC_SCCS) && !defined(lint)
  static char sccsid[] = "@(#)setenv.c	5.6 (Berkeley) 6/4/91";
  #endif /* LIBC_SCCS and not lint */
diff -c -r -P -x *.orig -x *~ ./x-gw/sig.c ../fwtk-work/x-gw/sig.c
*** ./x-gw/sig.c	Fri Nov  4 18:31:24 1994
--- ../fwtk-work/x-gw/sig.c	Mon Nov 21 13:33:55 1994
***************
*** 29,38 ****
  pid_t sigpid;
  {
          pid_t              temppid;
! #ifdef __386BSD__   
  	int                wstatus;
! #else
  	union  wait        wstatus; 
  #endif
  	int                exitstat, wopts=WNOHANG;
  
--- 29,43 ----
  pid_t sigpid;
  {
          pid_t              temppid;
! /*Modified for Solaris 2.3 Compatiblilty, dbsmall 11/08/94 */
! #ifndef SYSV
! #ifdef __386BSD__
  	int                wstatus;
! #else 
  	union  wait        wstatus; 
+ #endif
+ #else
+ 	int		   wstatus;
  #endif
  	int                exitstat, wopts=WNOHANG;
  
diff -c -r -P -x *.orig -x *~ ./x-gw/ulib.h ../fwtk-work/x-gw/ulib.h
*** ./x-gw/ulib.h	Fri Nov  4 18:31:25 1994
--- ../fwtk-work/x-gw/ulib.h	Mon Nov 21 13:33:55 1994
***************
*** 18,23 ****
--- 18,25 ----
  #include "list.h"
  
  #include <X11/Intrinsic.h>
+ /*Added for Solaris 2.3 Compatibility */
+ #include	"firewall.h"
  
  #ifndef LLEV
  #define LLEV    LOG_NOTICE

