17c478bd9Sstevel@tonic-gate# 24e5b757fSkupfer# CDDL HEADER START 34e5b757fSkupfer# 44e5b757fSkupfer# The contents of this file are subject to the terms of the 54e5b757fSkupfer# Common Development and Distribution License (the "License"). 64e5b757fSkupfer# You may not use this file except in compliance with the License. 74e5b757fSkupfer# 84e5b757fSkupfer# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 94e5b757fSkupfer# or http://www.opensolaris.org/os/licensing. 104e5b757fSkupfer# See the License for the specific language governing permissions 114e5b757fSkupfer# and limitations under the License. 124e5b757fSkupfer# 134e5b757fSkupfer# When distributing Covered Code, include this CDDL HEADER in each 144e5b757fSkupfer# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 154e5b757fSkupfer# If applicable, add the following below this CDDL HEADER, with the 164e5b757fSkupfer# fields enclosed by brackets "[]" replaced with your own identifying 174e5b757fSkupfer# information: Portions Copyright [yyyy] [name of copyright owner] 184e5b757fSkupfer# 194e5b757fSkupfer# CDDL HEADER END 204e5b757fSkupfer# 214e5b757fSkupfer 224e5b757fSkupfer# 234e5b757fSkupfer# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate# Use is subject to license terms. 257c478bd9Sstevel@tonic-gate# 267c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 277c478bd9Sstevel@tonic-gate# 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gatePROG = safe_finger tcpd tcpdchk tcpdmatch try-from 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gateERROFF = -erroff=E_FUNC_HAS_NO_RETURN_STMT \ 3472398d67Smditto -erroff=E_IMPLICIT_DECL_FUNC_RETURN_INT \ 3572398d67Smditto -_gcc=-Wno-return-type -_gcc=-Wno-implicit 367c478bd9Sstevel@tonic-gateCFLAGS += $(CCVERBOSE) $(ERROFF) 377c478bd9Sstevel@tonic-gateCPPFLAGS += $(ACCESS) $(PARANOID) $(NETGROUP) $(TLI) \ 387c478bd9Sstevel@tonic-gate $(UMASK) $(STYLE) $(TABLES) $(KILL_OPT) $(BUGS) \ 397c478bd9Sstevel@tonic-gate -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \ 407c478bd9Sstevel@tonic-gate -DFACILITY=$(FACILITY) -DSEVERITY=$(SEVERITY) \ 417c478bd9Sstevel@tonic-gate -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \ 427c478bd9Sstevel@tonic-gate -I$(ROOTSFWINCLUDE) -I../../lib/libwrap 437c478bd9Sstevel@tonic-gatetcpd tcpdmatch try-from := \ 447c478bd9Sstevel@tonic-gate LDLIBS += -R$(SFW_ROOT)/lib -L$(ROOTSFWLIB) -lwrap 457c478bd9Sstevel@tonic-gatetcpdchk := \ 467c478bd9Sstevel@tonic-gate LDLIBS += -R$(SFW_ROOT)/lib -L$(ROOTSFWLIB) -lwrap -lnsl 477c478bd9Sstevel@tonic-gate 48*24da5b34Srie# Various components must export interfaces, but also contain name-space 49*24da5b34Srie# clashes with system libraries. 50*24da5b34SrieMAPFILE.INT.D = $(MAPFILE.NGB) mapfile-intf-tcpdchk 51*24da5b34SrieMAPFILE.INT.M = $(MAPFILE.NGB) mapfile-intf-tcpdmatch 52*24da5b34SrieMAPFILE.INT.F = $(MAPFILE.NGB) mapfile-intf-tryfrom 53*24da5b34Srie 54*24da5b34Srietcpdchk := LDFLAGS +=$(MAPFILE.INT.D:%=-M%) 55*24da5b34Srietcpdmatch := LDFLAGS +=$(MAPFILE.INT.M:%=-M%) 56*24da5b34Srietry-from := LDFLAGS +=$(MAPFILE.INT.F:%=-M%) 57*24da5b34Srie 587c478bd9Sstevel@tonic-gate# SRCONLY files are not used for building but are included in the source code 597c478bd9Sstevel@tonic-gate# package SUNWtcpdS for consistency and completeness with respect to the 607c478bd9Sstevel@tonic-gate# public tcp_wrappers distribution. 617c478bd9Sstevel@tonic-gateSRCONLY = BLURB Banners.Makefile CHANGES DISCLAIMER Makefile \ 627c478bd9Sstevel@tonic-gate Makefile.dist Makefile.org README README.IRIX README.NIS \ 637c478bd9Sstevel@tonic-gate README.ipv6 hosts_access.c.org misc.c.org miscd.c myvsyslog.c \ 647c478bd9Sstevel@tonic-gate ncr.c printf.ck ptx.c rfc931.c.org scaffold.c.org \ 657c478bd9Sstevel@tonic-gate socket.c.diff socket.c.org strcasecmp.c tags tcpd.h.org \ 667c478bd9Sstevel@tonic-gate tcpdchk.c.org tcpdmatch.c.org tli-sequent.c tli-sequent.h \ 677c478bd9Sstevel@tonic-gate tli.c.org update.c.org vfprintf.c 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gateMANDIRS = man3 man4 man1m 707c478bd9Sstevel@tonic-gateMANPAGES = man3/hosts_access.3 man3/libwrap.3 man4/hosts_access.4 \ 717c478bd9Sstevel@tonic-gate man4/hosts_options.4 man4/hosts.allow.4 man4/hosts.deny.4 \ 727c478bd9Sstevel@tonic-gate man1m/tcpd.1m man1m/tcpdchk.1m man1m/tcpdmatch.1m 737c478bd9Sstevel@tonic-gateDISTFILES = environ.c fakelog.c hosts_access.3 hosts_access.4 \ 747c478bd9Sstevel@tonic-gate hosts_options.4 inetcf.c inetcf.h safe_finger.c scaffold.c \ 757c478bd9Sstevel@tonic-gate scaffold.h tcpd.1m tcpd.c tcpdchk.1m tcpdchk.c tcpdmatch.1m \ 767c478bd9Sstevel@tonic-gate tcpdmatch.c try-from.c README.sfw $(SRCONLY) 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gateROOTSFWSRC = $(ROOTSFWSHSRC)/tcp_wrappers 797c478bd9Sstevel@tonic-gateROOTSFWSBINPROG = $(PROG:%=$(ROOTSFWSBIN)/%) 807c478bd9Sstevel@tonic-gateROOTSFWMANPAGES = $(MANPAGES:%=$(ROOTSFWMAN)/%) 817c478bd9Sstevel@tonic-gateROOTSFWMANDIRS = $(MANDIRS:%=$(ROOTSFWMAN)/%) 827c478bd9Sstevel@tonic-gateROOTSFWSRCFILES = $(DISTFILES:%=$(ROOTSFWSRC)/%) 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gate.KEEP_STATE: 857c478bd9Sstevel@tonic-gate 864e5b757fSkupferall: $(PROG) THIRDPARTYLICENSE 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gateinstall: all $(ROOTSFWSBINPROG) $(ROOTSFWMANPAGES) $(ROOTSFWSRCFILES) 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gateclean: 917c478bd9Sstevel@tonic-gate $(RM) *.o 927c478bd9Sstevel@tonic-gate $(RM) -r sunman 937c478bd9Sstevel@tonic-gate 947c478bd9Sstevel@tonic-gatelint: lint_PROG 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate$(ROOTSFWSBINPROG): $(ROOTSFWSBIN) 977c478bd9Sstevel@tonic-gate$(ROOTSFWSBIN): $(ROOTSFW) 987c478bd9Sstevel@tonic-gate $(INS.dir) 997c478bd9Sstevel@tonic-gate$(ROOTSFWSBIN)/% : % 1007c478bd9Sstevel@tonic-gate $(INS.file) 1017c478bd9Sstevel@tonic-gate 1027c478bd9Sstevel@tonic-gate# These Solaris-specific man page aliases are installed verbatim. 1037c478bd9Sstevel@tonic-gatesunman/libwrap.3: libwrap.3 1047c478bd9Sstevel@tonic-gate mkdir -p sunman; cat libwrap.3 > $@ 1057c478bd9Sstevel@tonic-gatesunman/hosts.allow.4: hosts.allow.4 1067c478bd9Sstevel@tonic-gate mkdir -p sunman; cat hosts.allow.4 > $@ 1077c478bd9Sstevel@tonic-gatesunman/hosts.deny.4: hosts.deny.4 1087c478bd9Sstevel@tonic-gate mkdir -p sunman; cat hosts.deny.4 > $@ 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gate# The rest of the man pages are in the form provided in the original 1117c478bd9Sstevel@tonic-gate# distribution, but get edited and renamed to follow Solaris man page 1127c478bd9Sstevel@tonic-gate# conventions. E.g. tcpd.8 gets installed as /usr/sfw/man/man1m/tcpd.1m. 1137c478bd9Sstevel@tonic-gate# Create temporary copies in the sunman directory with modified names 1147c478bd9Sstevel@tonic-gate# and contents. The sed program man.sed contains the content edits. 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gatesunman/%.1m: %.8 1177c478bd9Sstevel@tonic-gate mkdir -p sunman; sed -f man.sed < $< > $@ 1187c478bd9Sstevel@tonic-gatesunman/%.4: %.5 1197c478bd9Sstevel@tonic-gate mkdir -p sunman; sed -f man.sed < $< > $@ 1207c478bd9Sstevel@tonic-gatesunman/%.3: %.3 1217c478bd9Sstevel@tonic-gate mkdir -p sunman; sed -f man.sed < $< > $@ 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gate$(ROOTSFWMANPAGES) := FILEMODE = 0444 1247c478bd9Sstevel@tonic-gate$(ROOTSFWMANPAGES): $(ROOTSFWMANDIRS) $(ROOTSFW)/man 1257c478bd9Sstevel@tonic-gate$(ROOTSFWMANDIRS): $(ROOTSFWMAN) 1267c478bd9Sstevel@tonic-gate $(INS.dir) 1277c478bd9Sstevel@tonic-gate$(ROOTSFWMAN): $(ROOTSFW)/share 1287c478bd9Sstevel@tonic-gate $(INS.dir) 1297c478bd9Sstevel@tonic-gate$(ROOTSFW)/man: $(ROOTSFW) 1305f61e592Smditto $(RM) $@ 1317c478bd9Sstevel@tonic-gate $(SYMLINK) share/man $@ $(CHOWNLINK) $(CHGRPLINK) 1327c478bd9Sstevel@tonic-gate$(ROOTSFWMAN)/man1m/% $(ROOTSFWMAN)/man3/% $(ROOTSFWMAN)/man4/%: sunman/% 1337c478bd9Sstevel@tonic-gate $(INS.file) 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gate$(ROOTSFWSRCFILES) := FILEMODE = 0444 1367c478bd9Sstevel@tonic-gate$(ROOTSFWSRCFILES): $(ROOTSFWSRC) 1377c478bd9Sstevel@tonic-gate$(ROOTSFWSRC): $(ROOTSFWSHSRC) 1387c478bd9Sstevel@tonic-gate $(INS.dir) 1397c478bd9Sstevel@tonic-gate$(ROOTSFWSHSRC): $(ROOTSFW)/share 1407c478bd9Sstevel@tonic-gate $(INS.dir) 1417c478bd9Sstevel@tonic-gate$(ROOTSFWSRC)/%: %.sfwsrc 1427c478bd9Sstevel@tonic-gate $(INS.rename) 1437c478bd9Sstevel@tonic-gate$(ROOTSFWSRC)/%: sunman/% 1447c478bd9Sstevel@tonic-gate $(INS.file) 1457c478bd9Sstevel@tonic-gate$(ROOTSFWSRC)/%: % 1467c478bd9Sstevel@tonic-gate $(INS.file) 1477c478bd9Sstevel@tonic-gate 1487c478bd9Sstevel@tonic-gate$(ROOTSFW)/share: $(ROOTSFW) 1497c478bd9Sstevel@tonic-gate $(INS.dir) 1507c478bd9Sstevel@tonic-gate$(ROOTSFW): 1517c478bd9Sstevel@tonic-gate $(INS.dir) 1527c478bd9Sstevel@tonic-gate 1537c478bd9Sstevel@tonic-gateTCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o 1547c478bd9Sstevel@tonic-gate 155*24da5b34Srietcpdmatch: $(TCPDMATCH_OBJ) $(LIB) $(MAPFILE.INTF.M) 1567c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(TCPDMATCH_OBJ) $(LDLIBS) 1577c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1587c478bd9Sstevel@tonic-gate 159*24da5b34Srietry-from: try-from.o fakelog.o $(LIB) $(MAPFILE.INTF.F) 1607c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ try-from.o fakelog.o $(LDLIBS) 1617c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1627c478bd9Sstevel@tonic-gate 1637c478bd9Sstevel@tonic-gateTCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o 1647c478bd9Sstevel@tonic-gate 165*24da5b34Srietcpdchk: $(TCPDCHK_OBJ) $(LIB) $(MAPFILE.INTF.C) 1667c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(TCPDCHK_OBJ) $(LDLIBS) 1677c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1687c478bd9Sstevel@tonic-gate 1694e5b757fSkupferTHIRDPARTYLICENSE: DISCLAIMER 1704e5b757fSkupfer $(GREP) -v '\*\*\*\*' DISCLAIMER > $@ 1717c478bd9Sstevel@tonic-gate 1724e5b757fSkupferCLOBBERFILES += THIRDPARTYLICENSE 1734e5b757fSkupfer 1744e5b757fSkupferinclude ../Makefile.targ 1757c478bd9Sstevel@tonic-gate 1767c478bd9Sstevel@tonic-gate# The rest of this file contains definitions more-or-less directly from the 1777c478bd9Sstevel@tonic-gate# original Makefile of the tcp_wrappers distribution. 1787c478bd9Sstevel@tonic-gate 1797c478bd9Sstevel@tonic-gate############################## 1807c478bd9Sstevel@tonic-gate# System parameters appropriate for Solaris 9 1817c478bd9Sstevel@tonic-gate 1827c478bd9Sstevel@tonic-gateREAL_DAEMON_DIR = /usr/sbin 1837c478bd9Sstevel@tonic-gateTLI = -DTLI 1847c478bd9Sstevel@tonic-gateNETGROUP = -DNETGROUP 1857c478bd9Sstevel@tonic-gate 1867c478bd9Sstevel@tonic-gate############################## 1877c478bd9Sstevel@tonic-gate# Start of the optional stuff. 1887c478bd9Sstevel@tonic-gate 1897c478bd9Sstevel@tonic-gate########################################### 1907c478bd9Sstevel@tonic-gate# Optional: Turning on language extensions 1917c478bd9Sstevel@tonic-gate# 1927c478bd9Sstevel@tonic-gate# Instead of the default access control language that is documented in 1937c478bd9Sstevel@tonic-gate# the hosts_access.5 document, the wrappers can be configured to 1947c478bd9Sstevel@tonic-gate# implement an extensible language documented in the hosts_options.5 1957c478bd9Sstevel@tonic-gate# document. This language is implemented by the "options.c" source 1967c478bd9Sstevel@tonic-gate# module, which also gives hints on how to add your own extensions. 1977c478bd9Sstevel@tonic-gate# Uncomment the next definition to turn on the language extensions 1987c478bd9Sstevel@tonic-gate# (examples: allow, deny, banners, twist and spawn). 1997c478bd9Sstevel@tonic-gate# 2007c478bd9Sstevel@tonic-gateSTYLE = -DPROCESS_OPTIONS # Enable language extensions. 2017c478bd9Sstevel@tonic-gate 2027c478bd9Sstevel@tonic-gate################################################################ 2037c478bd9Sstevel@tonic-gate# Optional: Changing the default disposition of logfile records 2047c478bd9Sstevel@tonic-gate# 2057c478bd9Sstevel@tonic-gate# By default, logfile entries are written to the same file as used for 2067c478bd9Sstevel@tonic-gate# sendmail transaction logs. See your /etc/syslog.conf file for actual 2077c478bd9Sstevel@tonic-gate# path names of logfiles. The tutorial section in the README file 2087c478bd9Sstevel@tonic-gate# gives a brief introduction to the syslog daemon. 2097c478bd9Sstevel@tonic-gate# 2107c478bd9Sstevel@tonic-gate# Change the FACILITY definition below if you disagree with the default 2117c478bd9Sstevel@tonic-gate# disposition. Some syslog versions (including Ultrix 4.x) do not provide 2127c478bd9Sstevel@tonic-gate# this flexibility. 2137c478bd9Sstevel@tonic-gate# 2147c478bd9Sstevel@tonic-gate# If nothing shows up on your system, it may be that the syslog records 2157c478bd9Sstevel@tonic-gate# are sent to a dedicated loghost. It may also be that no syslog daemon 2167c478bd9Sstevel@tonic-gate# is running at all. The README file gives pointers to surrogate syslog 2177c478bd9Sstevel@tonic-gate# implementations for systems that have no syslog library routines or 2187c478bd9Sstevel@tonic-gate# no syslog daemons. When changing the syslog.conf file, remember that 2197c478bd9Sstevel@tonic-gate# there must be TABs between fields. 2207c478bd9Sstevel@tonic-gate# 2217c478bd9Sstevel@tonic-gate# The LOG_XXX names below are taken from the /usr/include/syslog.h file. 2227c478bd9Sstevel@tonic-gate 2237c478bd9Sstevel@tonic-gateFACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use 2247c478bd9Sstevel@tonic-gate 2257c478bd9Sstevel@tonic-gate# The syslog priority at which successful connections are logged. 2267c478bd9Sstevel@tonic-gate 2277c478bd9Sstevel@tonic-gateSEVERITY= LOG_INFO # LOG_INFO is normally not logged to the console 2287c478bd9Sstevel@tonic-gate 2297c478bd9Sstevel@tonic-gate###################################################### 2307c478bd9Sstevel@tonic-gate# Optional: Changing the default file protection mask 2317c478bd9Sstevel@tonic-gate# 2327c478bd9Sstevel@tonic-gate# On many systems, network daemons and other system processes are started 2337c478bd9Sstevel@tonic-gate# with a zero umask value, so that world-writable files may be produced. 2347c478bd9Sstevel@tonic-gate# It is a good idea to edit your /etc/rc* files so that they begin with 2357c478bd9Sstevel@tonic-gate# an explicit umask setting. On our site we use `umask 022' because it 2367c478bd9Sstevel@tonic-gate# does not break anything yet gives adequate protection against tampering. 2377c478bd9Sstevel@tonic-gate# 2387c478bd9Sstevel@tonic-gate# The following macro specifies the default umask for processes run under 2397c478bd9Sstevel@tonic-gate# control of the daemon wrappers. Comment it out only if you are certain 2407c478bd9Sstevel@tonic-gate# that inetd and its children are started with a safe umask value. 2417c478bd9Sstevel@tonic-gate 2427c478bd9Sstevel@tonic-gateUMASK = -DDAEMON_UMASK=022 2437c478bd9Sstevel@tonic-gate 2447c478bd9Sstevel@tonic-gate####################################### 2457c478bd9Sstevel@tonic-gate# Optional: Turning off access control 2467c478bd9Sstevel@tonic-gate# 2477c478bd9Sstevel@tonic-gate# By default, host access control is enabled. To disable host access 2487c478bd9Sstevel@tonic-gate# control, comment out the following definition. Host access control 2497c478bd9Sstevel@tonic-gate# can also be turned off at runtime by providing no or empty access 2507c478bd9Sstevel@tonic-gate# control tables. 2517c478bd9Sstevel@tonic-gate 2527c478bd9Sstevel@tonic-gateACCESS = -DHOSTS_ACCESS 2537c478bd9Sstevel@tonic-gate 2547c478bd9Sstevel@tonic-gate#################################################### 2557c478bd9Sstevel@tonic-gate# Optional: dealing with host name/address conflicts 2567c478bd9Sstevel@tonic-gate# 2577c478bd9Sstevel@tonic-gate# By default, the software tries to protect against hosts that claim to 2587c478bd9Sstevel@tonic-gate# have someone elses host name. This is relevant for network services 2597c478bd9Sstevel@tonic-gate# whose authentication depends on host names, such as rsh and rlogin. 2607c478bd9Sstevel@tonic-gate# 2617c478bd9Sstevel@tonic-gate# With paranoid mode on, connections will be rejected when the host name 2627c478bd9Sstevel@tonic-gate# does not match the host address. Connections will also be rejected when 2637c478bd9Sstevel@tonic-gate# the host name is available but cannot be verified. 2647c478bd9Sstevel@tonic-gate# 2657c478bd9Sstevel@tonic-gate# Comment out the following definition if you want more control over such 2667c478bd9Sstevel@tonic-gate# requests. When paranoid mode is off and a host name double check fails, 2677c478bd9Sstevel@tonic-gate# the client can be matched with the PARANOID access control pattern. 2687c478bd9Sstevel@tonic-gate# 2697c478bd9Sstevel@tonic-gate# Paranoid mode implies hostname lookup. In order to disable hostname 2707c478bd9Sstevel@tonic-gate# lookups altogether, see the next section. 2717c478bd9Sstevel@tonic-gate 2727c478bd9Sstevel@tonic-gatePARANOID= -DPARANOID 2737c478bd9Sstevel@tonic-gate 2747c478bd9Sstevel@tonic-gate# The default username lookup timeout is 10 seconds. This may not be long 2757c478bd9Sstevel@tonic-gate# enough for slow hosts or networks, but is enough to irritate PC users. 2767c478bd9Sstevel@tonic-gate 2777c478bd9Sstevel@tonic-gateRFC931_TIMEOUT = 10 2787c478bd9Sstevel@tonic-gate 2797c478bd9Sstevel@tonic-gate######################################################## 2807c478bd9Sstevel@tonic-gate# Optional: Changing the access control table pathnames 2817c478bd9Sstevel@tonic-gate# 2827c478bd9Sstevel@tonic-gate# The HOSTS_ALLOW and HOSTS_DENY macros define where the programs will 2837c478bd9Sstevel@tonic-gate# look for access control information. Watch out for the quotes and 2847c478bd9Sstevel@tonic-gate# backslashes when you make changes. 2857c478bd9Sstevel@tonic-gate 2867c478bd9Sstevel@tonic-gateTABLES = -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\" 2877c478bd9Sstevel@tonic-gate 2887c478bd9Sstevel@tonic-gate############################################# 2897c478bd9Sstevel@tonic-gate# Optional: Turning on host ADDRESS checking 2907c478bd9Sstevel@tonic-gate# 2917c478bd9Sstevel@tonic-gate# Optionally, the software tries to protect against hosts that pretend to 2927c478bd9Sstevel@tonic-gate# have someone elses host address. This is relevant for network services 2937c478bd9Sstevel@tonic-gate# whose authentication depends on host names, such as rsh and rlogin, 2947c478bd9Sstevel@tonic-gate# because the network address is used to look up the remote host name. 2957c478bd9Sstevel@tonic-gate# 2967c478bd9Sstevel@tonic-gate# The protection is to refuse TCP connections with IP source routing 2977c478bd9Sstevel@tonic-gate# options. 2987c478bd9Sstevel@tonic-gate# 2997c478bd9Sstevel@tonic-gate# This feature cannot be used with SunOS 4.x because of a kernel bug in 3007c478bd9Sstevel@tonic-gate# the implementation of the getsockopt() system call. Kernel panics have 3017c478bd9Sstevel@tonic-gate# been observed for SunOS 4.1.[1-3]. Symptoms are "BAD TRAP" and "Data 3027c478bd9Sstevel@tonic-gate# fault" while executing the tcp_ctloutput() kernel function. 3037c478bd9Sstevel@tonic-gate# 3047c478bd9Sstevel@tonic-gate# Reportedly, Sun patch 100804-03 or 101790 fixes this for SunOS 4.1.x. 3057c478bd9Sstevel@tonic-gate# 3067c478bd9Sstevel@tonic-gate# Uncomment the following macro definition if your getsockopt() is OK. 3077c478bd9Sstevel@tonic-gate# 3087c478bd9Sstevel@tonic-gate# -DKILL_IP_OPTIONS is not needed on modern UNIX systems that can stop 3097c478bd9Sstevel@tonic-gate# source-routed traffic in the kernel. Examples: 4.4BSD derivatives, 3107c478bd9Sstevel@tonic-gate# Solaris 2.x, and Linux. See your system documentation for details. 3117c478bd9Sstevel@tonic-gate# 3127c478bd9Sstevel@tonic-gate# KILL_OPT= -DKILL_IP_OPTIONS 3137c478bd9Sstevel@tonic-gate 3147c478bd9Sstevel@tonic-gate## End configuration options 3157c478bd9Sstevel@tonic-gate############################ 316