12aef6930SMark Murray# @(#) Makefile 1.23 97/03/21 19:27:20 28053080cSYoshinobu Inoue# $FreeBSD$ 32aef6930SMark Murray 42aef6930SMark Murraywhat: 52aef6930SMark Murray @echo 62aef6930SMark Murray @echo "Usage: edit the REAL_DAEMON_DIR definition in the Makefile then:" 72aef6930SMark Murray @echo 82aef6930SMark Murray @echo " make sys-type" 92aef6930SMark Murray @echo 102aef6930SMark Murray @echo "If you are in a hurry you can try instead:" 112aef6930SMark Murray @echo 122aef6930SMark Murray @echo " make REAL_DAEMON_DIR=/foo/bar sys-type" 132aef6930SMark Murray @echo 142aef6930SMark Murray @echo "And for a version with language extensions enabled:" 152aef6930SMark Murray @echo 162aef6930SMark Murray @echo " make REAL_DAEMON_DIR=/foo/bar STYLE=-DPROCESS_OPTIONS sys-type" 172aef6930SMark Murray @echo 182aef6930SMark Murray @echo "This Makefile knows about the following sys-types:" 192aef6930SMark Murray @echo 202aef6930SMark Murray @echo " generic (most bsd-ish systems with sys5 compatibility)" 212aef6930SMark Murray @echo " 386bsd aix alpha apollo bsdos convex-ultranet dell-gcc dgux dgux543" 222aef6930SMark Murray @echo " dynix epix esix freebsd hpux irix4 irix5 irix6 isc iunix" 232aef6930SMark Murray @echo " linux machten mips(untested) ncrsvr4 netbsd next osf power_unix_211" 242aef6930SMark Murray @echo " ptx-2.x ptx-generic pyramid sco sco-nis sco-od2 sco-os5 sinix sunos4" 258053080cSYoshinobu Inoue @echo " sunos40 sunos5 solaris8 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2" 262aef6930SMark Murray @echo " uts215 uxp" 272aef6930SMark Murray @echo 282aef6930SMark Murray @echo "If none of these match your environment, edit the system" 292aef6930SMark Murray @echo "dependencies sections in the Makefile and do a 'make other'." 302aef6930SMark Murray @echo 312aef6930SMark Murray 322aef6930SMark Murray####################################################### 332aef6930SMark Murray# Choice between easy and advanced installation recipe. 342aef6930SMark Murray# 352aef6930SMark Murray# Advanced installation: vendor-provided daemons are left alone, and the 362aef6930SMark Murray# inetd configuration file is edited. In this case, the REAL_DAEMON_DIR 372aef6930SMark Murray# macro should reflect the actual directory with (most of) your 382aef6930SMark Murray# vendor-provided network daemons. These names can be found in the 392aef6930SMark Murray# inetd.conf file. Usually, the telnet, ftp and finger daemons all live 402aef6930SMark Murray# in the same directory. 412aef6930SMark Murray# 422aef6930SMark Murray# Uncomment the appropriate line if you are going to edit inetd.conf. 432aef6930SMark Murray# 442aef6930SMark Murray# Ultrix 4.x SunOS 4.x ConvexOS 10.x Dynix/ptx 452aef6930SMark Murray#REAL_DAEMON_DIR=/usr/etc 462aef6930SMark Murray# 472aef6930SMark Murray# SysV.4 Solaris 2.x OSF AIX 482aef6930SMark Murray#REAL_DAEMON_DIR=/usr/sbin 492aef6930SMark Murray# 502aef6930SMark Murray# BSD 4.4 512aef6930SMark Murray#REAL_DAEMON_DIR=/usr/libexec 522aef6930SMark Murray# 532aef6930SMark Murray# HP-UX SCO Unicos 542aef6930SMark Murray#REAL_DAEMON_DIR=/etc 552aef6930SMark Murray 562aef6930SMark Murray# Easy installation: vendor-provided network daemons are moved to "some 572aef6930SMark Murray# other" directory, and the tcpd wrapper fills in the "holes". For this 582aef6930SMark Murray# mode of operation, the REAL_DAEMON_DIR macro should be set to the "some 592aef6930SMark Murray# other" directory. The "..." is here for historical reasons only; you 602aef6930SMark Murray# should probably use some other name. 612aef6930SMark Murray# 622aef6930SMark Murray# Uncomment the appropriate line if you are going to move your daemons. 632aef6930SMark Murray# 642aef6930SMark Murray# Ultrix 4.x SunOS 4.x ConvexOS 10.x Dynix/ptx 652aef6930SMark Murray#REAL_DAEMON_DIR=/usr/etc/... 662aef6930SMark Murray# 672aef6930SMark Murray# SysV.4 Solaris 2.x OSF AIX 682aef6930SMark Murray#REAL_DAEMON_DIR=/usr/sbin/... 692aef6930SMark Murray# 702aef6930SMark Murray# BSD 4.4 712aef6930SMark Murray#REAL_DAEMON_DIR=/usr/libexec/... 722aef6930SMark Murray# 732aef6930SMark Murray# HP-UX SCO Unicos 742aef6930SMark Murray#REAL_DAEMON_DIR=/etc/... 752aef6930SMark Murray 762aef6930SMark Murray# End of mandatory section 772aef6930SMark Murray########################## 782aef6930SMark Murray 792aef6930SMark Murray########################################## 802aef6930SMark Murray# Ready-to-use system-dependent templates. 812aef6930SMark Murray# 822aef6930SMark Murray# Ready-to-use templates are available for many systems (see the "echo" 832aef6930SMark Murray# commands at the start of this Makefile). The templates take care of 842aef6930SMark Murray# all system dependencies: after editing the REAL_DAEMON_DIR definition 852aef6930SMark Murray# above, do a "make sunos4" (or whatever system type is appropriate). 862aef6930SMark Murray# 872aef6930SMark Murray# If your system is not listed (or something that comes close enough), you 882aef6930SMark Murray# have to edit the system dependencies section below and do a "make other". 892aef6930SMark Murray# 902aef6930SMark Murray# Send templates for other UNIX versions to wietse@wzv.win.tue.nl. 912aef6930SMark Murray 922aef6930SMark Murray# This is good for many BSD+SYSV hybrids with NIS (formerly YP). 932aef6930SMark Murraygeneric aix osf alpha dynix: 942aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 952aef6930SMark Murray LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \ 962aef6930SMark Murray NETGROUP=-DNETGROUP TLI= all 972aef6930SMark Murray 982aef6930SMark Murray# Ditto, with vsyslog 992aef6930SMark Murraysunos4: 1002aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1012aef6930SMark Murray LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \ 1022aef6930SMark Murray NETGROUP=-DNETGROUP VSYSLOG= TLI= all 1032aef6930SMark Murray 1042aef6930SMark Murray# Generic with resolver library. 1052aef6930SMark Murraygeneric-resolver: 1062aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1072aef6930SMark Murray LIBS=-lresolv RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \ 1082aef6930SMark Murray NETGROUP=-DNETGROUP TLI= all 1092aef6930SMark Murray 1102aef6930SMark Murray# The NeXT loader needs "-m" or it barfs on redefined library functions. 1112aef6930SMark Murraynext: 1122aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1132aef6930SMark Murray LIBS=-m RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \ 1142aef6930SMark Murray NETGROUP=-DNETGROUP TLI= all 1152aef6930SMark Murray 1162aef6930SMark Murray# SunOS for the 386 was frozen at release 4.0.x. 1172aef6930SMark Murraysunos40: 1182aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1192aef6930SMark Murray LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ="setenv.o strcasecmp.o" \ 1202aef6930SMark Murray NETGROUP=-DNETGROUP VSYSLOG= TLI= all 1212aef6930SMark Murray 1222aef6930SMark Murray# Ultrix is like aix, next, etc., but has miscd and setenv(). 1232aef6930SMark Murrayultrix: 1242aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1252aef6930SMark Murray LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \ 1262aef6930SMark Murray NETGROUP=-DNETGROUP TLI= all miscd 1272aef6930SMark Murray 1282aef6930SMark Murray# This works on EP/IX 1.4.3 and will likely work on Mips (reggers@julian.uwo.ca) 1292aef6930SMark Murrayepix: 1302aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1312aef6930SMark Murray LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \ 1322aef6930SMark Murray NETGROUP=-DNETGROUP TLI= SYSTYPE="-systype bsd43" all 1332aef6930SMark Murray 1342aef6930SMark Murray# Freebsd and linux by default have no NIS. 1358053080cSYoshinobu Inoue386bsd bsdos: 1362aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1372aef6930SMark Murray LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \ 1382aef6930SMark Murray EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all 1392aef6930SMark Murray 1402aef6930SMark Murrayfreebsd: 1412aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 142*37a60314SEitan Adler RANLIB=ranlib ARFLAGS=$(ARFLAGS) AUX_OBJ= NETGROUP=-DNETGROUP TLI= \ 1438053080cSYoshinobu Inoue EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -DUSE_GETIPNODEBY" \ 1448053080cSYoshinobu Inoue VSYSLOG= all 1458053080cSYoshinobu Inoue 1468053080cSYoshinobu Inouenetbsd: 1478053080cSYoshinobu Inoue @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1482aef6930SMark Murray LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \ 1498053080cSYoshinobu Inoue EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 \ 1508053080cSYoshinobu Inoue -Dss_family=__ss_family -Dss_len=__ss_len" VSYSLOG= all 1512aef6930SMark Murray 1522aef6930SMark Murraylinux: 1532aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1548053080cSYoshinobu Inoue LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o NETGROUP= TLI= \ 1558053080cSYoshinobu Inoue EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DBROKEN_SO_LINGER -DINET6=1 \ 1568053080cSYoshinobu Inoue -Dss_family=__ss_family -Dss_len=__ss_len" all 1578053080cSYoshinobu Inoue 1588053080cSYoshinobu Inouelinux-old: 1598053080cSYoshinobu Inoue @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1608053080cSYoshinobu Inoue LIBS="/usr/inet6/lib/libinet6.a -lresolv" \ 1618053080cSYoshinobu Inoue RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o NETGROUP= TLI= \ 1628053080cSYoshinobu Inoue EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DBROKEN_SO_LINGER -DINET6=1 -Dss_family=sin6_family -Dsockaddr_storage=sockaddr_in6 -I/usr/inet6/include" all 1632aef6930SMark Murray 1642aef6930SMark Murray# This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x. 1652aef6930SMark Murrayhpux hpux8 hpux9 hpux10: 1662aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1672aef6930SMark Murray LIBS= RANLIB=echo ARFLAGS=rv AUX_OBJ=setenv.o \ 1682aef6930SMark Murray NETGROUP=-DNETGROUP TLI= all 1692aef6930SMark Murray 1702aef6930SMark Murray# ConvexOS-10.x with UltraNet support (ukkonen@csc.fi). 1712aef6930SMark Murrayconvex-ultranet: 1722aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1732aef6930SMark Murray LIBS=-lulsock RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \ 1742aef6930SMark Murray NETGROUP=-DNETGROUP TLI= all 1752aef6930SMark Murray 1762aef6930SMark Murray# Generic support for the Dynix/PTX version of TLI. 1772aef6930SMark Murrayptx-generic: 1782aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1792aef6930SMark Murray LIBS="-lsocket -linet -lnsl" RANLIB=echo ARFLAGS=rv \ 1802aef6930SMark Murray AUX_OBJ="setenv.o strcasecmp.o ptx.o" NETGROUP= TLI=-DPTX all 1812aef6930SMark Murray 1822aef6930SMark Murray# With UDP support optimized for PTX 2.x (timw@sequent.com). 1832aef6930SMark Murrayptx-2.x: 1842aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1852aef6930SMark Murray LIBS="-lsocket -linet -lnsl" RANLIB=echo ARFLAGS=rv \ 1862aef6930SMark Murray AUX_OBJ="setenv.o strcasecmp.o tli-sequent.o" NETGROUP= \ 1872aef6930SMark Murray TLI=-DTLI_SEQUENT all 1882aef6930SMark Murray 1892aef6930SMark Murray# IRIX 4.0.x has a special ar(1) flag. 1902aef6930SMark Murrayirix4: 1912aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1922aef6930SMark Murray LIBS="-lc -lsun" RANLIB=echo ARFLAGS=rvs AUX_OBJ=setenv.o \ 1932aef6930SMark Murray NETGROUP=-DNETGROUP TLI= all 1942aef6930SMark Murray 1952aef6930SMark Murray# IRIX 5.2 is SYSV4 with several broken things (such as -lsocket -lnsl). 1962aef6930SMark Murrayirix5: 1972aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 1982aef6930SMark Murray LIBS=-lsun RANLIB=echo ARFLAGS=rv VSYSLOG= \ 1992aef6930SMark Murray NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI= all 2002aef6930SMark Murray 2012aef6930SMark Murray# IRIX 6.2 (tucker@math.unc.edu). Must find a better value than 200000. 2022aef6930SMark Murrayirix6: 2032aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2042aef6930SMark Murray LIBS= RANLIB=echo ARFLAGS=rv VSYSLOG= \ 2052aef6930SMark Murray NETGROUP=-DNETGROUP EXTRA_CFLAGS="-DBSD=200000" TLI= all 2062aef6930SMark Murray 2072aef6930SMark Murray# SunOS 5.x is another SYSV4 variant. 2082aef6930SMark Murraysunos5: 2092aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2102aef6930SMark Murray LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv VSYSLOG= \ 2112aef6930SMark Murray NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \ 2122aef6930SMark Murray BUGS="$(BUGS) -DSOLARIS_24_GETHOSTBYNAME_BUG" all 2132aef6930SMark Murray 2148053080cSYoshinobu Inoue# SunOS 5.8 is another SYSV4 variant, but has IPv6 support 2158053080cSYoshinobu Inouesolaris8: 2168053080cSYoshinobu Inoue @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2178053080cSYoshinobu Inoue LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv VSYSLOG= \ 2188053080cSYoshinobu Inoue NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \ 2198053080cSYoshinobu Inoue EXTRA_CFLAGS="-DINET6 -DUSE_GETIPNODEBY -DNO_CLONE_DEVICE \ 2208053080cSYoshinobu Inoue -DINT32_T" all 2218053080cSYoshinobu Inoue 2222aef6930SMark Murray# Generic SYSV40 2232aef6930SMark Murrayesix sysv4: 2242aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2252aef6930SMark Murray LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv \ 2262aef6930SMark Murray NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI all 2272aef6930SMark Murray 2282aef6930SMark Murray# DG/UX 5.4.1 and 5.4.2 have an unusual inet_addr() interface. 2292aef6930SMark Murraydgux: 2302aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2312aef6930SMark Murray LIBS=-lnsl RANLIB=echo ARFLAGS=rv \ 2322aef6930SMark Murray NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \ 2332aef6930SMark Murray BUGS="$(BUGS) -DINET_ADDR_BUG" all 2342aef6930SMark Murray 2352aef6930SMark Murraydgux543: 2362aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2372aef6930SMark Murray LIBS=-lnsl RANLIB=echo ARFLAGS=rv \ 2382aef6930SMark Murray NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI all 2392aef6930SMark Murray 2402aef6930SMark Murray# NCR UNIX 02.02.01 and 02.03.00 (Alex Chircop, msu@unimt.mt) 2412aef6930SMark Murrayncrsvr4: 2422aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2432aef6930SMark Murray LIBS="-lresolv -lnsl -lsocket" RANLIB=echo ARFLAGS=rv \ 2442aef6930SMark Murray AUX_OBJ="setenv.o strcasecmp.o" NETGROUP= TLI=-DTLI \ 2452aef6930SMark Murray EXTRA_CFLAGS="" FROM_OBJ=ncr.o all 2462aef6930SMark Murray 2472aef6930SMark Murray# Tandem SYSV4 (eqawas@hedgehog.ac.cowan.edu.au) 2482aef6930SMark Murraytandem: 2492aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2502aef6930SMark Murray LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv \ 2512aef6930SMark Murray NETGROUP= AUX_OBJ="setenv.o strcasecmp.o" TLI=-DTLI all 2522aef6930SMark Murray 2532aef6930SMark Murray# Amdahl UTS 2.1.5 (Richard.Richmond@bridge.bst.bls.com) 2542aef6930SMark Murrayuts215: 2552aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2562aef6930SMark Murray LIBS="-lsocket" RANLIB=echo \ 2572aef6930SMark Murray ARFLAGS=rv AUX_OBJ=setenv.o NETGROUP=-DNO_NETGROUP TLI= all 2582aef6930SMark Murray 2592aef6930SMark Murray# UXP/DS System V.4 clone (vic@uida0.uida.es). 2602aef6930SMark Murrayuxp: 2612aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2622aef6930SMark Murray LIBS="-L/usr/ucblib -lsocket -lnsl -lucb" \ 2632aef6930SMark Murray RANLIB=echo ARFLAGS=rv NETGROUP=-DNETGROUP \ 2642aef6930SMark Murray AUX_OBJ=setenv.o TLI="-DTLI -DDRS_XTI" all 2652aef6930SMark Murray 2662aef6930SMark Murray# DELL System V.4 Issue 2.2 using gcc (kim@tac.nyc.ny.us, jurban@norden1.com) 2672aef6930SMark Murraydell-gcc: 2682aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2692aef6930SMark Murray LIBS="-lsocket -lnsl" RANLIB=ranlib ARFLAGS=rv CC=gcc \ 2702aef6930SMark Murray AUX_OBJ="setenv.o strcasecmp.o" TLI=-DTLI all 2712aef6930SMark Murray 2722aef6930SMark Murray# SCO 3.2v4.1 no frills (jedwards@sol1.solinet.net). 2732aef6930SMark Murraysco: 2742aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2752aef6930SMark Murray LIBS="-lsocket -lnsl_s" RANLIB=echo ARFLAGS=rv \ 2762aef6930SMark Murray NETGROUP= AUX_OBJ=setenv.o TLI= all 2772aef6930SMark Murray 2782aef6930SMark Murray# SCO OpenDesktop 2.0, release 3.2 (peter@midnight.com). Please simplify. 2792aef6930SMark Murraysco-od2: 2802aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2812aef6930SMark Murray LIBS="-lrpcsvc -lrpc -lyp -lrpc -lrpcsvc -lsocket" \ 2822aef6930SMark Murray RANLIB=echo ARFLAGS=rv AUX_OBJ=setenv.o \ 2832aef6930SMark Murray NETGROUP=-DNETGROUP TLI= all 2842aef6930SMark Murray 2852aef6930SMark Murray# SCO 3.2v4.2 with TCP/IP 1.2.1 (Eduard.Vopicka@vse.cz). Please simplify. 2862aef6930SMark Murraysco-nis: 2872aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2882aef6930SMark Murray LIBS="-lyp -lrpc -lsocket -lyp -lc_s -lc" \ 2892aef6930SMark Murray RANLIB=echo ARFLAGS=rv AUX_OBJ=setenv.o \ 2902aef6930SMark Murray NETGROUP=-DNETGROUP TLI= EXTRA_CFLAGS="-nointl -DNO_NETGRENT" all 2912aef6930SMark Murray 2922aef6930SMark Murray# SCO 3.2v5.0.0 OpenServer 5 (bob@odt.handy.com, bill@razorlogic.com) 2932aef6930SMark Murraysco-os5: 2942aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 2952aef6930SMark Murray LIBS="-lrpcsvc -lsocket" RANLIB=echo ARFLAGS=rv VSYSLOG= \ 2962aef6930SMark Murray AUX_OBJ=setenv.o NETGROUP=-DNETGROUP TLI= all 2972aef6930SMark Murray 2982aef6930SMark Murray# sinix 5.42 setjmp workaround (szrzs023@ub3.ub.uni-kiel.de) 2992aef6930SMark Murraysinix: 3002aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 3012aef6930SMark Murray LIBS="-lsocket -lnsl -L/usr/ccs/lib -lc -L/usr/ucblib -lucb" \ 3022aef6930SMark Murray RANLIB=echo ARFLAGS=rv AUX_OBJ=setenv.o TLI=-DTLI all 3032aef6930SMark Murray 3042aef6930SMark Murray# Domain SR10.4. Build under bsd, run under either sysv3 or bsd43. 3052aef6930SMark Murrayapollo: 3062aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 3072aef6930SMark Murray LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \ 3082aef6930SMark Murray NETGROUP=-DNETGROUP TLI= SYSTYPE="-A run,any -A sys,any" all 3092aef6930SMark Murray 3102aef6930SMark Murray# Pyramid OSx 5.1, using the BSD universe. 3112aef6930SMark Murraypyramid: 3122aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 3132aef6930SMark Murray LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ="environ.o vfprintf.o" \ 3142aef6930SMark Murray STRINGS="-Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy" \ 3152aef6930SMark Murray NETGROUP="-DNETGROUP -DUSE_GETDOMAIN" TLI= all 3162aef6930SMark Murray 3172aef6930SMark Murray# Untested. 3182aef6930SMark Murraymips: 3192aef6930SMark Murray @echo "Warning: some definitions may be wrong." 3202aef6930SMark Murray make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 3212aef6930SMark Murray LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \ 3222aef6930SMark Murray NETGROUP=-DNETGROUP TLI= SYSTYPE="-sysname bsd43" all 3232aef6930SMark Murray 3242aef6930SMark Murray# Cray (tested with UNICOS 7.0.4). 3252aef6930SMark Murrayunicos7: 3262aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 3272aef6930SMark Murray LIBS=-lnet RANLIB=echo ARFLAGS=rv \ 3282aef6930SMark Murray EXTRA_CFLAGS=-DINADDR_NONE="\"((unsigned long) -1)\"" \ 3292aef6930SMark Murray AUX_OBJ="setenv.o strcasecmp.o" NETGROUP= TLI= all 3302aef6930SMark Murray 3312aef6930SMark Murray# Unicos 8.x, Cray-YMP (Bruce Kelly). 3322aef6930SMark Murrayunicos8: 3332aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 3342aef6930SMark Murray LIBS= RANLIB=echo AR=bld ARFLAGS=rv \ 3352aef6930SMark Murray AUX_OBJ= NETGROUP= TLI= all 3362aef6930SMark Murray 3372aef6930SMark Murray# Power_UNIX 2.1.1 (amantel@lerc.nasa.gov) 3382aef6930SMark Murraypower_unix_211: 3392aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 3402aef6930SMark Murray LIBS="-lnsl -lsocket -lgen -lresolv" RANLIB=echo ARFLAGS=rv \ 3412aef6930SMark Murray NETGROUP= AUX_OBJ=setenv.o TLI=-DTLI BUGS="$(BUGS)" all 3422aef6930SMark Murray 3432aef6930SMark Murray# ISC (fc@all.net) 3442aef6930SMark Murrayisc: 3452aef6930SMark Murray make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 3462aef6930SMark Murray LIBS="-linet -lnsl_s -ldbm" RANLIB=echo ARFLAGS=rv \ 3472aef6930SMark Murray AUX_OBJ="setenv.o strcasecmp.o" EXTRA_CFLAGS="-DENOTCONN=ENAVAIL" \ 3482aef6930SMark Murray NETGROUP= TLI= all 3492aef6930SMark Murray 3502aef6930SMark Murray# Interactive UNIX R3.2 version 4.0 (Bobby D. Wright). 3512aef6930SMark Murrayiunix: 3522aef6930SMark Murray make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 3532aef6930SMark Murray LIBS="-linet -lnsl_s -ldbm" RANLIB=echo ARFLAGS=rv \ 3542aef6930SMark Murray AUX_OBJ=environ.o strcasecmp.o NETGROUP= TLI= all 3552aef6930SMark Murray 3562aef6930SMark Murray# RTU 6.0 on a Masscomp 5400 (ben@piglet.cr.usgs.gov). When using the 3572aef6930SMark Murray# advanced installation, increment argv before actually looking at it. 3582aef6930SMark Murrayrtu: 3592aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 3602aef6930SMark Murray LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \ 3612aef6930SMark Murray NETGROUP= TLI= all 3622aef6930SMark Murray 3632aef6930SMark Murray# Unixware sans NIS (mc@telebase.com). Compiler dislikes strcasecmp.c. 3642aef6930SMark Murrayunixware1: 3652aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 3662aef6930SMark Murray LIBS="-lsocket -lnsl -lc -L/usr/ucblib -lucb" RANLIB=echo ARFLAGS=rv \ 3672aef6930SMark Murray NETGROUP=$(NETGROUP) AUX_OBJ=environ.o TLI=-DTLI all 3682aef6930SMark Murray 3692aef6930SMark Murrayunixware2: 3702aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 3712aef6930SMark Murray LIBS="-lsocket -lnsl -lgen -lc -L/usr/ucblib -lucb" RANLIB=echo \ 3722aef6930SMark Murray ARFLAGS=rv NETGROUP=$(NETGROUP) AUX_OBJ=environ.o TLI=-DTLI all 3732aef6930SMark Murray 3742aef6930SMark Murrayu6000: 3752aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 3762aef6930SMark Murray LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv \ 3772aef6930SMark Murray NETGROUP=-DNETGROUP AUX_OBJ="setenv.o strcasecmp.o" TLI=-DTLI all 3782aef6930SMark Murray 3792aef6930SMark Murray# MachTen 3802aef6930SMark Murraymachten: 3812aef6930SMark Murray @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ 3822aef6930SMark Murray LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \ 3832aef6930SMark Murray NETGROUP= TLI= all 3842aef6930SMark Murray 3852aef6930SMark Murray############################################################### 3862aef6930SMark Murray# System dependencies: TLI (transport-level interface) support. 3872aef6930SMark Murray# 3882aef6930SMark Murray# Uncomment the following macro if your system has System V.4-style TLI 3892aef6930SMark Murray# support (/usr/include/sys/timod.h, /etc/netconfig, and the netdir(3) 3902aef6930SMark Murray# routines). 3912aef6930SMark Murray# 3922aef6930SMark Murray#TLI = -DTLI 3932aef6930SMark Murray 3942aef6930SMark Murray############################################################################### 3952aef6930SMark Murray# System dependencies: differences between ranlib(1) and ar(1) implementations. 3962aef6930SMark Murray# 3972aef6930SMark Murray# Some C compilers (Ultrix 4.x) insist that ranlib(1) be run on an object 3982aef6930SMark Murray# library; some don't care as long as the modules are in the right order; 3992aef6930SMark Murray# some systems don't even have a ranlib(1) command. Make your choice. 4002aef6930SMark Murray 4012aef6930SMark MurrayRANLIB = ranlib # have ranlib (BSD-ish UNIX) 4022aef6930SMark Murray#RANLIB = echo # no ranlib (SYSV-ish UNIX) 4032aef6930SMark Murray 404*37a60314SEitan AdlerARFLAGS ?= rv # most systems 4052aef6930SMark Murray#ARFLAGS= rvs # IRIX 4.0.x 4062aef6930SMark Murray 4072aef6930SMark MurrayAR = ar 4082aef6930SMark Murray#AR = bld # Unicos 8.x 4092aef6930SMark Murray 4102aef6930SMark Murray############################################################################# 4112aef6930SMark Murray# System dependencies: routines that are not present in the system libraries. 4122aef6930SMark Murray# 4132aef6930SMark Murray# If your system library does not have set/putenv() or strcasecmp(), use 4142aef6930SMark Murray# the ones provided with this source distribution. The environ.c module 4152aef6930SMark Murray# implements setenv(), getenv(), and putenv(). 4162aef6930SMark Murray 4178053080cSYoshinobu Inoue#AUX_OBJ= setenv.o 4182aef6930SMark Murray#AUX_OBJ= environ.o 4192aef6930SMark Murray#AUX_OBJ= environ.o strcasecmp.o 4202aef6930SMark Murray 4212aef6930SMark Murray# Uncomment the following if your C library does not provide the 4222aef6930SMark Murray# strchr/strrchr/memcmp routines, but comes with index/rindex/bcmp. 4232aef6930SMark Murray# 4242aef6930SMark Murray#STRINGS= -Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy 4252aef6930SMark Murray 4262aef6930SMark Murray################################################################# 4272aef6930SMark Murray# System dependencies: selection of non-default object libraries. 4282aef6930SMark Murray# 4292aef6930SMark Murray# Most System V implementations require that you explicitly specify the 4302aef6930SMark Murray# networking libraries. There is no general consensus, though. 4312aef6930SMark Murray# 4322aef6930SMark Murray#LIBS = -lsocket -lnsl # SysV.4 Solaris 2.x 4332aef6930SMark Murray#LIBS = -lsun # IRIX 4342aef6930SMark Murray#LIBS = -lsocket -linet -lnsl -lnfs # PTX 4352aef6930SMark Murray#LIBS = -linet -lnsl_s -ldbm # ISC 4362aef6930SMark Murray#LIBS = -lnet # Unicos 7 4372aef6930SMark Murray#LIBS = -linet -lsyslog -ldbm 4382aef6930SMark Murray#LIBS = -lsyslog -lsocket -lnsl 4392aef6930SMark Murray 4402aef6930SMark Murray###################################################### 4412aef6930SMark Murray# System dependencies: system-specific compiler flags. 4422aef6930SMark Murray# 4432aef6930SMark Murray# Apollo Domain/OS offers both bsd and sys5 environments, sometimes 4442aef6930SMark Murray# on the same machine. If your Apollo is primarily sys5.3 and also 4452aef6930SMark Murray# has bsd4.3, uncomment the following to build under bsd and run under 4462aef6930SMark Murray# either environment. 4472aef6930SMark Murray# 4482aef6930SMark Murray#SYSTYPE= -A run,any -A sys,any 4492aef6930SMark Murray 4502aef6930SMark Murray# For MIPS RISC/os 4_52.p3, uncomment the following definition. 4512aef6930SMark Murray# 4522aef6930SMark Murray#SYSTYPE= -sysname bsd43 4532aef6930SMark Murray 4542aef6930SMark Murray################################################## 4552aef6930SMark Murray# System dependencies: working around system bugs. 4562aef6930SMark Murray# 4572aef6930SMark Murray# -DGETPEERNAME_BUG works around a getpeername(2) bug in some versions of 4582aef6930SMark Murray# Apollo or SYSV.4 UNIX: the wrapper would report that all UDP requests 4592aef6930SMark Murray# come from address 0.0.0.0. The workaround does no harm on other systems. 4602aef6930SMark Murray# 4612aef6930SMark Murray# -DBROKEN_FGETS works around an fgets(3) bug in some System V versions 4622aef6930SMark Murray# (IRIX): fgets() gives up too fast when reading from a network socket. 4632aef6930SMark Murray# The workaround does no harm on other systems. 4642aef6930SMark Murray# 4652aef6930SMark Murray# Some UNIX systems (IRIX) make the error of calling the strtok() library 4662aef6930SMark Murray# routine from other library routines such as, e.g., gethostbyname/addr(). 4672aef6930SMark Murray# The result is that hosts can slip through the wrapper allow/deny filters. 4682aef6930SMark Murray# Compile with -DLIBC_CALLS_STRTOK to avoid the vendor's strtok() routine. 4692aef6930SMark Murray# The workaround does no harm on other systems. 4702aef6930SMark Murray# 4712aef6930SMark Murray# DG/UX 5.4.1 comes with an inet_ntoa() function that returns a structure 4722aef6930SMark Murray# instead of a long integer. Compile with -DINET_ADDR_BUG to work around 4732aef6930SMark Murray# this mutant behavour. Fixed in 5.4R3. 4742aef6930SMark Murray# 4752aef6930SMark Murray# Solaris 2.4 gethostbyname(), in DNS through NIS mode, puts only one 4762aef6930SMark Murray# address in the host address list; all other addresses are treated as 4772aef6930SMark Murray# host name aliases. Compile with -DSOLARIS_24_GETHOSTBYNAME_BUG to work 4782aef6930SMark Murray# around this. The workaround does no harm on other Solaris versions. 4792aef6930SMark Murray 4808053080cSYoshinobu Inoue#BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DLIBC_CALLS_STRTOK 4812aef6930SMark Murray#BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DINET_ADDR_BUG 4822aef6930SMark Murray#BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DSOLARIS_24_GETHOSTBYNAME_BUG 4832aef6930SMark Murray 4842aef6930SMark Murray########################################################################## 4852aef6930SMark Murray# System dependencies: whether or not your system has NIS (or YP) support. 4862aef6930SMark Murray# 4872aef6930SMark Murray# If your system supports NIS or YP-style netgroups, enable the following 4882aef6930SMark Murray# macro definition. Netgroups are used only for host access control. 4892aef6930SMark Murray# 4902aef6930SMark Murray#NETGROUP= -DNETGROUP 4912aef6930SMark Murray 4922aef6930SMark Murray############################################################### 4932aef6930SMark Murray# System dependencies: whether or not your system has vsyslog() 4942aef6930SMark Murray# 4952aef6930SMark Murray# If your system supports vsyslog(), comment out the following definition. 4962aef6930SMark Murray# If in doubt leave it in, it won't harm. 4972aef6930SMark Murray 4988053080cSYoshinobu Inoue#VSYSLOG = -Dvsyslog=myvsyslog 4992aef6930SMark Murray 5002aef6930SMark Murray# End of the system dependencies. 5012aef6930SMark Murray################################# 5022aef6930SMark Murray 5032aef6930SMark Murray############################## 5042aef6930SMark Murray# Start of the optional stuff. 5052aef6930SMark Murray 5062aef6930SMark Murray########################################### 5072aef6930SMark Murray# Optional: Turning on language extensions 5082aef6930SMark Murray# 5092aef6930SMark Murray# Instead of the default access control language that is documented in 5102aef6930SMark Murray# the hosts_access.5 document, the wrappers can be configured to 5112aef6930SMark Murray# implement an extensible language documented in the hosts_options.5 5122aef6930SMark Murray# document. This language is implemented by the "options.c" source 5132aef6930SMark Murray# module, which also gives hints on how to add your own extensions. 5142aef6930SMark Murray# Uncomment the next definition to turn on the language extensions 5152aef6930SMark Murray# (examples: allow, deny, banners, twist and spawn). 5162aef6930SMark Murray# 5172aef6930SMark Murray#STYLE = -DPROCESS_OPTIONS # Enable language extensions. 5182aef6930SMark Murray 5192aef6930SMark Murray################################################################ 5202aef6930SMark Murray# Optional: Changing the default disposition of logfile records 5212aef6930SMark Murray# 5222aef6930SMark Murray# By default, logfile entries are written to the same file as used for 5232aef6930SMark Murray# sendmail transaction logs. See your /etc/syslog.conf file for actual 5242aef6930SMark Murray# path names of logfiles. The tutorial section in the README file 5252aef6930SMark Murray# gives a brief introduction to the syslog daemon. 5262aef6930SMark Murray# 5272aef6930SMark Murray# Change the FACILITY definition below if you disagree with the default 5282aef6930SMark Murray# disposition. Some syslog versions (including Ultrix 4.x) do not provide 5292aef6930SMark Murray# this flexibility. 5302aef6930SMark Murray# 5312aef6930SMark Murray# If nothing shows up on your system, it may be that the syslog records 5322aef6930SMark Murray# are sent to a dedicated loghost. It may also be that no syslog daemon 5332aef6930SMark Murray# is running at all. The README file gives pointers to surrogate syslog 5342aef6930SMark Murray# implementations for systems that have no syslog library routines or 5352aef6930SMark Murray# no syslog daemons. When changing the syslog.conf file, remember that 5362aef6930SMark Murray# there must be TABs between fields. 5372aef6930SMark Murray# 5382aef6930SMark Murray# The LOG_XXX names below are taken from the /usr/include/syslog.h file. 5392aef6930SMark Murray 5402aef6930SMark MurrayFACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use 5412aef6930SMark Murray 5422aef6930SMark Murray# The syslog priority at which successful connections are logged. 5432aef6930SMark Murray 5442aef6930SMark MurraySEVERITY= LOG_INFO # LOG_INFO is normally not logged to the console 5452aef6930SMark Murray 5462aef6930SMark Murray########################### 5472aef6930SMark Murray# Optional: Reduce DNS load 5482aef6930SMark Murray# 5492aef6930SMark Murray# When looking up the address for a host.domain name, the typical DNS 5502aef6930SMark Murray# code will first append substrings of your own domain, so it tries 5512aef6930SMark Murray# host.domain.your.own.domain, then host.domain.own.domain, and then 5522aef6930SMark Murray# host.domain. The APPEND_DOT feature stops this waste of cycles. It is 5532aef6930SMark Murray# off by default because it causes problems on sites that don't use DNS 5542aef6930SMark Murray# and with Solaris < 2.4. APPEND_DOT will not work with hostnames taken 5552aef6930SMark Murray# from /etc/hosts or from NIS maps. It does work with DNS through NIS. 5562aef6930SMark Murray# 5572aef6930SMark Murray# DOT= -DAPPEND_DOT 5582aef6930SMark Murray 5592aef6930SMark Murray################################################## 5602aef6930SMark Murray# Optional: Always attempt remote username lookups 5612aef6930SMark Murray# 5622aef6930SMark Murray# By default, the wrappers look up the remote username only when the 5632aef6930SMark Murray# access control rules require them to do so. 5642aef6930SMark Murray# 5652aef6930SMark Murray# Username lookups require that the remote host runs a daemon that 5662aef6930SMark Murray# supports an RFC 931 like protocol. Remote user name lookups are not 5672aef6930SMark Murray# possible for UDP-based connections, and can cause noticeable delays 5682aef6930SMark Murray# with connections from non-UNIX PCs. On some systems, remote username 5692aef6930SMark Murray# lookups can trigger a kernel bug, causing loss of service. The README 5702aef6930SMark Murray# file describes how to find out if your UNIX kernel has that problem. 5712aef6930SMark Murray# 5722aef6930SMark Murray# Uncomment the following definition if the wrappers should always 5732aef6930SMark Murray# attempt to get the remote user name. If this is not enabled you can 5742aef6930SMark Murray# still do selective username lookups as documented in the hosts_access.5 5752aef6930SMark Murray# and hosts_options.5 manual pages (`nroff -man' format). 5762aef6930SMark Murray# 5772aef6930SMark Murray#AUTH = -DALWAYS_RFC931 5782aef6930SMark Murray# 5792aef6930SMark Murray# The default username lookup timeout is 10 seconds. This may not be long 5802aef6930SMark Murray# enough for slow hosts or networks, but is enough to irritate PC users. 5812aef6930SMark Murray 5822aef6930SMark MurrayRFC931_TIMEOUT = 10 5832aef6930SMark Murray 5842aef6930SMark Murray###################################################### 5852aef6930SMark Murray# Optional: Changing the default file protection mask 5862aef6930SMark Murray# 5872aef6930SMark Murray# On many systems, network daemons and other system processes are started 5882aef6930SMark Murray# with a zero umask value, so that world-writable files may be produced. 5892aef6930SMark Murray# It is a good idea to edit your /etc/rc* files so that they begin with 5902aef6930SMark Murray# an explicit umask setting. On our site we use `umask 022' because it 5912aef6930SMark Murray# does not break anything yet gives adequate protection against tampering. 5922aef6930SMark Murray# 5932aef6930SMark Murray# The following macro specifies the default umask for processes run under 5942aef6930SMark Murray# control of the daemon wrappers. Comment it out only if you are certain 5952aef6930SMark Murray# that inetd and its children are started with a safe umask value. 5962aef6930SMark Murray 5972aef6930SMark MurrayUMASK = -DDAEMON_UMASK=022 5982aef6930SMark Murray 5992aef6930SMark Murray####################################### 6002aef6930SMark Murray# Optional: Turning off access control 6012aef6930SMark Murray# 6022aef6930SMark Murray# By default, host access control is enabled. To disable host access 6032aef6930SMark Murray# control, comment out the following definition. Host access control 6042aef6930SMark Murray# can also be turned off at runtime by providing no or empty access 6052aef6930SMark Murray# control tables. 6062aef6930SMark Murray 6072aef6930SMark MurrayACCESS = -DHOSTS_ACCESS 6082aef6930SMark Murray 6092aef6930SMark Murray######################################################## 6102aef6930SMark Murray# Optional: Changing the access control table pathnames 6112aef6930SMark Murray# 6122aef6930SMark Murray# The HOSTS_ALLOW and HOSTS_DENY macros define where the programs will 6132aef6930SMark Murray# look for access control information. Watch out for the quotes and 6142aef6930SMark Murray# backslashes when you make changes. 6152aef6930SMark Murray 6162aef6930SMark MurrayTABLES = -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\" 6172aef6930SMark Murray 6182aef6930SMark Murray#################################################### 6192aef6930SMark Murray# Optional: dealing with host name/address conflicts 6202aef6930SMark Murray# 6212aef6930SMark Murray# By default, the software tries to protect against hosts that claim to 6222aef6930SMark Murray# have someone elses host name. This is relevant for network services 6232aef6930SMark Murray# whose authentication depends on host names, such as rsh and rlogin. 6242aef6930SMark Murray# 6252aef6930SMark Murray# With paranoid mode on, connections will be rejected when the host name 6262aef6930SMark Murray# does not match the host address. Connections will also be rejected when 6272aef6930SMark Murray# the host name is available but cannot be verified. 6282aef6930SMark Murray# 6292aef6930SMark Murray# Comment out the following definition if you want more control over such 6302aef6930SMark Murray# requests. When paranoid mode is off and a host name double check fails, 6312aef6930SMark Murray# the client can be matched with the PARANOID access control pattern. 6322aef6930SMark Murray# 6332aef6930SMark Murray# Paranoid mode implies hostname lookup. In order to disable hostname 6342aef6930SMark Murray# lookups altogether, see the next section. 6352aef6930SMark Murray 6362aef6930SMark MurrayPARANOID= -DPARANOID 6372aef6930SMark Murray 6382aef6930SMark Murray######################################## 6392aef6930SMark Murray# Optional: turning off hostname lookups 6402aef6930SMark Murray# 6412aef6930SMark Murray# By default, the software always attempts to look up the client 6422aef6930SMark Murray# hostname. With selective hostname lookups, the client hostname 6432aef6930SMark Murray# lookup is postponed until the name is required by an access control 6442aef6930SMark Murray# rule or by a %letter expansion. 6452aef6930SMark Murray# 6462aef6930SMark Murray# In order to perform selective hostname lookups, disable paranoid 6472aef6930SMark Murray# mode (see previous section) and comment out the following definition. 6482aef6930SMark Murray 6492aef6930SMark MurrayHOSTNAME= -DALWAYS_HOSTNAME 6502aef6930SMark Murray 6512aef6930SMark Murray############################################# 6522aef6930SMark Murray# Optional: Turning on host ADDRESS checking 6532aef6930SMark Murray# 6542aef6930SMark Murray# Optionally, the software tries to protect against hosts that pretend to 6552aef6930SMark Murray# have someone elses host address. This is relevant for network services 6562aef6930SMark Murray# whose authentication depends on host names, such as rsh and rlogin, 6572aef6930SMark Murray# because the network address is used to look up the remote host name. 6582aef6930SMark Murray# 6592aef6930SMark Murray# The protection is to refuse TCP connections with IP source routing 6602aef6930SMark Murray# options. 6612aef6930SMark Murray# 6622aef6930SMark Murray# This feature cannot be used with SunOS 4.x because of a kernel bug in 6632aef6930SMark Murray# the implementation of the getsockopt() system call. Kernel panics have 6642aef6930SMark Murray# been observed for SunOS 4.1.[1-3]. Symptoms are "BAD TRAP" and "Data 6652aef6930SMark Murray# fault" while executing the tcp_ctloutput() kernel function. 6662aef6930SMark Murray# 6672aef6930SMark Murray# Reportedly, Sun patch 100804-03 or 101790 fixes this for SunOS 4.1.x. 6682aef6930SMark Murray# 6692aef6930SMark Murray# Uncomment the following macro definition if your getsockopt() is OK. 6702aef6930SMark Murray# 6712aef6930SMark Murray# -DKILL_IP_OPTIONS is not needed on modern UNIX systems that can stop 6722aef6930SMark Murray# source-routed traffic in the kernel. Examples: 4.4BSD derivatives, 6732aef6930SMark Murray# Solaris 2.x, and Linux. See your system documentation for details. 6742aef6930SMark Murray# 6752aef6930SMark Murray# KILL_OPT= -DKILL_IP_OPTIONS 6762aef6930SMark Murray 6772aef6930SMark Murray## End configuration options 6782aef6930SMark Murray############################ 6792aef6930SMark Murray 6802aef6930SMark Murray# Protection against weird shells or weird make programs. 6812aef6930SMark Murray 6822aef6930SMark MurraySHELL = /bin/sh 6832aef6930SMark Murray.c.o:; $(CC) $(CFLAGS) -c $*.c 6842aef6930SMark Murray 6852aef6930SMark MurrayCFLAGS = -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \ 6862aef6930SMark Murray $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \ 6872aef6930SMark Murray -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \ 6882aef6930SMark Murray -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \ 6892aef6930SMark Murray $(UCHAR) $(TABLES) $(STRINGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \ 6902aef6930SMark Murray $(VSYSLOG) $(HOSTNAME) 6912aef6930SMark Murray 6922aef6930SMark MurrayLIB_OBJ= hosts_access.o options.o shell_cmd.o rfc931.o eval.o \ 6932aef6930SMark Murray hosts_ctl.o refuse.o percent_x.o clean_exit.o $(AUX_OBJ) \ 6942aef6930SMark Murray $(FROM_OBJ) fix_options.o socket.o tli.o workarounds.o \ 6952aef6930SMark Murray update.o misc.o diag.o percent_m.o myvsyslog.o 6962aef6930SMark Murray 6972aef6930SMark MurrayFROM_OBJ= fromhost.o 6982aef6930SMark Murray 6992aef6930SMark MurrayKIT = README miscd.c tcpd.c fromhost.c hosts_access.c shell_cmd.c \ 7002aef6930SMark Murray tcpd.h tcpdmatch.c Makefile hosts_access.5 strcasecmp.c BLURB rfc931.c \ 7012aef6930SMark Murray tcpd.8 eval.c hosts_access.3 hosts_ctl.c percent_x.c options.c \ 7022aef6930SMark Murray clean_exit.c environ.c patchlevel.h fix_options.c workarounds.c \ 7032aef6930SMark Murray socket.c tli.c DISCLAIMER fakelog.c safe_finger.c hosts_options.5 \ 7042aef6930SMark Murray CHANGES try-from.c update.c ptx.c vfprintf.c tli-sequent.c \ 7052aef6930SMark Murray tli-sequent.h misc.c diag.c ncr.c tcpdchk.c percent_m.c \ 7062aef6930SMark Murray myvsyslog.c mystdarg.h printf.ck README.IRIX Banners.Makefile \ 7072aef6930SMark Murray refuse.c tcpdchk.8 setenv.c inetcf.c inetcf.h scaffold.c \ 7082aef6930SMark Murray scaffold.h tcpdmatch.8 README.NIS 7092aef6930SMark Murray 7102aef6930SMark MurrayLIB = libwrap.a 7112aef6930SMark Murray 7122aef6930SMark Murrayall other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk 7132aef6930SMark Murray 7142aef6930SMark Murray# Invalidate all object files when the compiler options (CFLAGS) have changed. 7152aef6930SMark Murray 7162aef6930SMark Murrayconfig-check: 7172aef6930SMark Murray @set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; } 7182aef6930SMark Murray @set +e; echo $(CFLAGS) >/tmp/cflags.$$$$ ; \ 7192aef6930SMark Murray if cmp cflags /tmp/cflags.$$$$ ; \ 7202aef6930SMark Murray then rm /tmp/cflags.$$$$ ; \ 7212aef6930SMark Murray else mv /tmp/cflags.$$$$ cflags ; \ 7222aef6930SMark Murray fi >/dev/null 2>/dev/null 7232aef6930SMark Murray 7242aef6930SMark Murray$(LIB): $(LIB_OBJ) 7252aef6930SMark Murray rm -f $(LIB) 7262aef6930SMark Murray $(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ) 7272aef6930SMark Murray -$(RANLIB) $(LIB) 7282aef6930SMark Murray 7292aef6930SMark Murraytcpd: tcpd.o $(LIB) 7302aef6930SMark Murray $(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS) 7312aef6930SMark Murray 7322aef6930SMark Murraymiscd: miscd.o $(LIB) 7332aef6930SMark Murray $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS) 7342aef6930SMark Murray 7352aef6930SMark Murraysafe_finger: safe_finger.o $(LIB) 7362aef6930SMark Murray $(CC) $(CFLAGS) -o $@ safe_finger.o $(LIB) $(LIBS) 7372aef6930SMark Murray 7382aef6930SMark MurrayTCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o 7392aef6930SMark Murray 7402aef6930SMark Murraytcpdmatch: $(TCPDMATCH_OBJ) $(LIB) 7412aef6930SMark Murray $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(LIB) $(LIBS) 7422aef6930SMark Murray 7432aef6930SMark Murraytry-from: try-from.o fakelog.o $(LIB) 7442aef6930SMark Murray $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(LIB) $(LIBS) 7452aef6930SMark Murray 7462aef6930SMark MurrayTCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o 7472aef6930SMark Murray 7482aef6930SMark Murraytcpdchk: $(TCPDCHK_OBJ) $(LIB) 7492aef6930SMark Murray $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(LIB) $(LIBS) 7502aef6930SMark Murray 7512aef6930SMark Murrayshar: $(KIT) 7522aef6930SMark Murray @shar $(KIT) 7532aef6930SMark Murray 7542aef6930SMark Murraykit: $(KIT) 7552aef6930SMark Murray @makekit $(KIT) 7562aef6930SMark Murray 7572aef6930SMark Murrayfiles: 7582aef6930SMark Murray @echo $(KIT) 7592aef6930SMark Murray 7602aef6930SMark Murrayarchive: 7612aef6930SMark Murray $(ARCHIVE) $(KIT) 7622aef6930SMark Murray 7632aef6930SMark Murrayclean: 7642aef6930SMark Murray rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] core \ 7652aef6930SMark Murray cflags 7662aef6930SMark Murray 7672aef6930SMark Murraytidy: clean 7682aef6930SMark Murray chmod -R a+r . 7692aef6930SMark Murray chmod 755 . 7702aef6930SMark Murray 7712aef6930SMark Murray# Enable all bells and whistles for linting. 7722aef6930SMark Murray 7732aef6930SMark Murraylint: tcpd_lint miscd_lint match_lint chk_lint 7742aef6930SMark Murray 7752aef6930SMark Murraytcpd_lint: 7762aef6930SMark Murray lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \ 7772aef6930SMark Murray -DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \ 7782aef6930SMark Murray $(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \ 7792aef6930SMark Murray -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \ 7802aef6930SMark Murray -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \ 7812aef6930SMark Murray -Dvsyslog=myvsyslog \ 7822aef6930SMark Murray tcpd.c fromhost.c socket.c tli.c hosts_access.c \ 7832aef6930SMark Murray shell_cmd.c refuse.c rfc931.c eval.c percent_x.c clean_exit.c \ 7842aef6930SMark Murray options.c setenv.c fix_options.c workarounds.c update.c misc.c \ 7852aef6930SMark Murray diag.c myvsyslog.c percent_m.c 7862aef6930SMark Murray 7872aef6930SMark Murraymiscd_lint: 7882aef6930SMark Murray lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \ 7892aef6930SMark Murray -DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \ 7902aef6930SMark Murray $(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \ 7912aef6930SMark Murray -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \ 7922aef6930SMark Murray -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \ 7932aef6930SMark Murray -Dvsyslog=myvsyslog \ 7942aef6930SMark Murray miscd.c fromhost.c socket.c tli.c hosts_access.c \ 7952aef6930SMark Murray shell_cmd.c refuse.c rfc931.c eval.c percent_x.c clean_exit.c \ 7962aef6930SMark Murray options.c setenv.c fix_options.c workarounds.c update.c misc.c \ 7972aef6930SMark Murray diag.c myvsyslog.c percent_m.c 7982aef6930SMark Murray 7992aef6930SMark Murraymatch_lint: 8002aef6930SMark Murray lint -DFACILITY=LOG_MAIL -DSEVERITY=$(SEVERITY) -DHOSTS_ACCESS \ 8012aef6930SMark Murray -DPARANOID $(TABLES) -DNETGROUP -DPROCESS_OPTIONS -DRFC931_TIMEOUT=10 \ 8022aef6930SMark Murray -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \ 8032aef6930SMark Murray -Dvsyslog=myvsyslog \ 8042aef6930SMark Murray tcpdmatch.c hosts_access.c eval.c percent_x.c options.c workarounds.c \ 8052aef6930SMark Murray update.c socket.c misc.c diag.c myvsyslog.c percent_m.c setenv.c \ 8062aef6930SMark Murray inetcf.c scaffold.c 8072aef6930SMark Murray 8082aef6930SMark Murraychk_lint: 8092aef6930SMark Murray lint -DFACILITY=LOG_MAIL -DSEVERITY=$(SEVERITY) -DHOSTS_ACCESS \ 8102aef6930SMark Murray -DPARANOID $(TABLES) -DNETGROUP -DPROCESS_OPTIONS -DRFC931_TIMEOUT=10 \ 8112aef6930SMark Murray -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \ 8122aef6930SMark Murray -Dvsyslog=myvsyslog \ 8132aef6930SMark Murray tcpdchk.c eval.c percent_x.c options.c update.c workarounds.c \ 8142aef6930SMark Murray setenv.c misc.c diag.c myvsyslog.c percent_m.c inetcf.c scaffold.c 8152aef6930SMark Murray 8162aef6930SMark Murrayprintfck: 8172aef6930SMark Murray printfck -f printf.ck \ 8182aef6930SMark Murray tcpd.c fromhost.c socket.c tli.c hosts_access.c \ 8192aef6930SMark Murray shell_cmd.c refuse.c rfc931.c eval.c percent_x.c clean_exit.c \ 8202aef6930SMark Murray options.c setenv.c fix_options.c workarounds.c update.c misc.c \ 8212aef6930SMark Murray diag.c myvsyslog.c percent_m.c >aap.c 8222aef6930SMark Murray lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \ 8232aef6930SMark Murray -DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \ 8242aef6930SMark Murray $(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \ 8252aef6930SMark Murray -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \ 8262aef6930SMark Murray -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" -Dvsyslog=myvsyslog aap.c 8272aef6930SMark Murray printfck -f printf.ck \ 8282aef6930SMark Murray tcpdchk.c eval.c percent_x.c options.c update.c workarounds.c \ 8292aef6930SMark Murray setenv.c misc.c diag.c myvsyslog.c percent_m.c inetcf.c scaffold.c \ 8302aef6930SMark Murray >aap.c 8312aef6930SMark Murray lint -DFACILITY=LOG_MAIL -DSEVERITY=$(SEVERITY) -DHOSTS_ACCESS \ 8322aef6930SMark Murray -DPARANOID $(TABLES) -DNETGROUP -DPROCESS_OPTIONS -DRFC931_TIMEOUT=10 \ 8332aef6930SMark Murray -Dvsyslog=myvsyslog -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" 8342aef6930SMark Murray 8352aef6930SMark Murray# Internal compilation dependencies. 8362aef6930SMark Murray 8372aef6930SMark Murrayclean_exit.o: cflags 8382aef6930SMark Murrayclean_exit.o: tcpd.h 8392aef6930SMark Murraydiag.o: cflags 8402aef6930SMark Murraydiag.o: mystdarg.h 8412aef6930SMark Murraydiag.o: tcpd.h 8422aef6930SMark Murrayenviron.o: cflags 8432aef6930SMark Murrayeval.o: cflags 8442aef6930SMark Murrayeval.o: tcpd.h 8452aef6930SMark Murrayfakelog.o: cflags 8462aef6930SMark Murrayfakelog.o: mystdarg.h 8472aef6930SMark Murrayfix_options.o: cflags 8482aef6930SMark Murrayfix_options.o: tcpd.h 8492aef6930SMark Murrayfromhost.o: cflags 8502aef6930SMark Murrayfromhost.o: tcpd.h 8512aef6930SMark Murrayhosts_access.o: cflags 8522aef6930SMark Murrayhosts_access.o: tcpd.h 8532aef6930SMark Murrayhosts_ctl.o: cflags 8542aef6930SMark Murrayhosts_ctl.o: tcpd.h 8552aef6930SMark Murrayinetcf.o: cflags 8562aef6930SMark Murrayinetcf.o: inetcf.h 8572aef6930SMark Murrayinetcf.o: tcpd.h 8582aef6930SMark Murraymisc.o: cflags 8592aef6930SMark Murraymisc.o: tcpd.h 8602aef6930SMark Murraymiscd.o: cflags 8612aef6930SMark Murraymiscd.o: patchlevel.h 8622aef6930SMark Murraymiscd.o: tcpd.h 8632aef6930SMark Murraymyvsyslog.o: cflags 8642aef6930SMark Murraymyvsyslog.o: mystdarg.h 8652aef6930SMark Murraymyvsyslog.o: tcpd.h 8662aef6930SMark Murrayncr.o: cflags 8672aef6930SMark Murrayncr.o: tcpd.h 8682aef6930SMark Murrayoptions.o: cflags 8692aef6930SMark Murrayoptions.o: tcpd.h 8702aef6930SMark Murraypercent_m.o: cflags 8712aef6930SMark Murraypercent_m.o: mystdarg.h 8722aef6930SMark Murraypercent_x.o: cflags 8732aef6930SMark Murraypercent_x.o: tcpd.h 8742aef6930SMark Murrayptx.o: cflags 8752aef6930SMark Murrayptx.o: tcpd.h 8762aef6930SMark Murrayrefuse.o: cflags 8772aef6930SMark Murrayrefuse.o: tcpd.h 8782aef6930SMark Murrayrfc931.o: cflags 8792aef6930SMark Murrayrfc931.o: tcpd.h 8802aef6930SMark Murraysafe_finger.o: cflags 8812aef6930SMark Murrayscaffold.o: cflags 8822aef6930SMark Murrayscaffold.o: scaffold.h 8832aef6930SMark Murrayscaffold.o: tcpd.h 8842aef6930SMark Murraysetenv.o: cflags 8852aef6930SMark Murrayshell_cmd.o: cflags 8862aef6930SMark Murrayshell_cmd.o: tcpd.h 8872aef6930SMark Murraysocket.o: cflags 8882aef6930SMark Murraysocket.o: tcpd.h 8892aef6930SMark Murraystrcasecmp.o: cflags 8902aef6930SMark Murraytcpd.o: cflags 8912aef6930SMark Murraytcpd.o: patchlevel.h 8922aef6930SMark Murraytcpd.o: tcpd.h 8932aef6930SMark Murraytcpdchk.o: cflags 8942aef6930SMark Murraytcpdchk.o: inetcf.h 8952aef6930SMark Murraytcpdchk.o: scaffold.h 8962aef6930SMark Murraytcpdchk.o: tcpd.h 8972aef6930SMark Murraytcpdmatch.o: cflags 8982aef6930SMark Murraytcpdmatch.o: scaffold.h 8992aef6930SMark Murraytcpdmatch.o: tcpd.h 9002aef6930SMark Murraytli-sequent.o: cflags 9012aef6930SMark Murraytli-sequent.o: tcpd.h 9022aef6930SMark Murraytli-sequent.o: tli-sequent.h 9032aef6930SMark Murraytli.o: cflags 9042aef6930SMark Murraytli.o: tcpd.h 9052aef6930SMark Murraytry-from.o: cflags 9062aef6930SMark Murraytry-from.o: tcpd.h 9072aef6930SMark Murrayupdate.o: cflags 9082aef6930SMark Murrayupdate.o: mystdarg.h 9092aef6930SMark Murrayupdate.o: tcpd.h 9102aef6930SMark Murrayvfprintf.o: cflags 9112aef6930SMark Murrayworkarounds.o: cflags 9122aef6930SMark Murrayworkarounds.o: tcpd.h 913