1
# @(#) Makefile 1.23 97/03/21 19:27:20
5
@echo "Usage: edit the REAL_DAEMON_DIR definition in the Makefile then:"
9
@echo "If you are in a hurry you can try instead:"
11
@echo " make REAL_DAEMON_DIR=/foo/bar sys-type"
13
@echo "And for a version with language extensions enabled:"
15
@echo " make REAL_DAEMON_DIR=/foo/bar STYLE=-DPROCESS_OPTIONS sys-type"
17
@echo "This Makefile knows about the following sys-types:"
19
@echo " generic (most bsd-ish systems with sys5 compatibility)"
20
@echo " 386bsd aix alpha apollo bsdos convex-ultranet dell-gcc dgux dgux543"
21
@echo " dynix epix esix freebsd hpux irix4 irix5 irix6 isc iunix"
22
@echo " linux machten mips(untested) ncrsvr4 netbsd next osf power_unix_211"
23
@echo " ptx-2.x ptx-generic pyramid sco sco-nis sco-od2 sco-os5 sinix sunos4"
24
@echo " sunos40 sunos5 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2"
27
@echo "If none of these match your environment, edit the system"
28
@echo "dependencies sections in the Makefile and do a 'make other'."
31
#######################################################
32
# Choice between easy and advanced installation recipe.
34
# Advanced installation: vendor-provided daemons are left alone, and the
35
# inetd configuration file is edited. In this case, the REAL_DAEMON_DIR
36
# macro should reflect the actual directory with (most of) your
37
# vendor-provided network daemons. These names can be found in the
38
# inetd.conf file. Usually, the telnet, ftp and finger daemons all live
39
# in the same directory.
41
# Uncomment the appropriate line if you are going to edit inetd.conf.
43
# Ultrix 4.x SunOS 4.x ConvexOS 10.x Dynix/ptx
44
#REAL_DAEMON_DIR=/usr/etc
46
# SysV.4 Solaris 2.x OSF AIX
47
#REAL_DAEMON_DIR=/usr/sbin
50
#REAL_DAEMON_DIR=/usr/libexec
55
# Easy installation: vendor-provided network daemons are moved to "some
56
# other" directory, and the tcpd wrapper fills in the "holes". For this
57
# mode of operation, the REAL_DAEMON_DIR macro should be set to the "some
58
# other" directory. The "..." is here for historical reasons only; you
59
# should probably use some other name.
61
# Uncomment the appropriate line if you are going to move your daemons.
63
# Ultrix 4.x SunOS 4.x ConvexOS 10.x Dynix/ptx
64
#REAL_DAEMON_DIR=/usr/etc/...
66
# SysV.4 Solaris 2.x OSF AIX
67
#REAL_DAEMON_DIR=/usr/sbin/...
70
#REAL_DAEMON_DIR=/usr/libexec/...
73
#REAL_DAEMON_DIR=/etc/...
75
# End of mandatory section
76
##########################
78
##########################################
79
# Ready-to-use system-dependent templates.
81
# Ready-to-use templates are available for many systems (see the "echo"
82
# commands at the start of this Makefile). The templates take care of
83
# all system dependencies: after editing the REAL_DAEMON_DIR definition
84
# above, do a "make sunos4" (or whatever system type is appropriate).
86
# If your system is not listed (or something that comes close enough), you
87
# have to edit the system dependencies section below and do a "make other".
89
# Send templates for other UNIX versions to wietse@wzv.win.tue.nl.
91
# This is good for many BSD+SYSV hybrids with NIS (formerly YP).
92
generic aix osf alpha dynix:
93
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
94
LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
95
NETGROUP=-DNETGROUP TLI= all
99
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
100
LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
101
NETGROUP=-DNETGROUP VSYSLOG= TLI= all
103
# Generic with resolver library.
105
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
106
LIBS=-lresolv RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
107
NETGROUP=-DNETGROUP TLI= all
109
# The NeXT loader needs "-m" or it barfs on redefined library functions.
111
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
112
LIBS=-m RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
113
NETGROUP=-DNETGROUP TLI= all
115
# SunOS for the 386 was frozen at release 4.0.x.
117
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
118
LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ="setenv.o strcasecmp.o" \
119
NETGROUP=-DNETGROUP VSYSLOG= TLI= all
121
# Ultrix is like aix, next, etc., but has miscd and setenv().
123
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
124
LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
125
NETGROUP=-DNETGROUP TLI= all miscd
127
# This works on EP/IX 1.4.3 and will likely work on Mips (reggers@julian.uwo.ca)
129
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
130
LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
131
NETGROUP=-DNETGROUP TLI= SYSTYPE="-systype bsd43" all
133
# Freebsd and linux by default have no NIS.
135
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
136
LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
137
EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
140
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
141
LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
142
EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
145
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
146
LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
147
NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all
149
# This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x.
150
hpux hpux8 hpux9 hpux10:
151
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
152
LIBS= RANLIB=echo ARFLAGS=rv AUX_OBJ=setenv.o \
153
NETGROUP=-DNETGROUP TLI= all
155
# ConvexOS-10.x with UltraNet support (ukkonen@csc.fi).
157
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
158
LIBS=-lulsock RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
159
NETGROUP=-DNETGROUP TLI= all
161
# Generic support for the Dynix/PTX version of TLI.
163
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
164
LIBS="-lsocket -linet -lnsl" RANLIB=echo ARFLAGS=rv \
165
AUX_OBJ="setenv.o strcasecmp.o ptx.o" NETGROUP= TLI=-DPTX all
167
# With UDP support optimized for PTX 2.x (timw@sequent.com).
169
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
170
LIBS="-lsocket -linet -lnsl" RANLIB=echo ARFLAGS=rv \
171
AUX_OBJ="setenv.o strcasecmp.o tli-sequent.o" NETGROUP= \
172
TLI=-DTLI_SEQUENT all
174
# IRIX 4.0.x has a special ar(1) flag.
176
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
177
LIBS="-lc -lsun" RANLIB=echo ARFLAGS=rvs AUX_OBJ=setenv.o \
178
NETGROUP=-DNETGROUP TLI= all
180
# IRIX 5.2 is SYSV4 with several broken things (such as -lsocket -lnsl).
182
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
183
LIBS=-lsun RANLIB=echo ARFLAGS=rv VSYSLOG= \
184
NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI= all
186
# IRIX 6.2 (tucker@math.unc.edu). Must find a better value than 200000.
188
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
189
LIBS= RANLIB=echo ARFLAGS=rv VSYSLOG= \
190
NETGROUP=-DNETGROUP EXTRA_CFLAGS="-DBSD=200000" TLI= all
192
# SunOS 5.x is another SYSV4 variant.
194
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
195
LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv VSYSLOG= \
196
NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \
197
BUGS="$(BUGS) -DSOLARIS_24_GETHOSTBYNAME_BUG" all
201
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
202
LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv \
203
NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI all
205
# DG/UX 5.4.1 and 5.4.2 have an unusual inet_addr() interface.
207
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
208
LIBS=-lnsl RANLIB=echo ARFLAGS=rv \
209
NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \
210
BUGS="$(BUGS) -DINET_ADDR_BUG" all
213
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
214
LIBS=-lnsl RANLIB=echo ARFLAGS=rv \
215
NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI all
217
# NCR UNIX 02.02.01 and 02.03.00 (Alex Chircop, msu@unimt.mt)
219
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
220
LIBS="-lresolv -lnsl -lsocket" RANLIB=echo ARFLAGS=rv \
221
AUX_OBJ="setenv.o strcasecmp.o" NETGROUP= TLI=-DTLI \
222
EXTRA_CFLAGS="" FROM_OBJ=ncr.o all
224
# Tandem SYSV4 (eqawas@hedgehog.ac.cowan.edu.au)
226
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
227
LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv \
228
NETGROUP= AUX_OBJ="setenv.o strcasecmp.o" TLI=-DTLI all
230
# Amdahl UTS 2.1.5 (Richard.Richmond@bridge.bst.bls.com)
232
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
233
LIBS="-lsocket" RANLIB=echo \
234
ARFLAGS=rv AUX_OBJ=setenv.o NETGROUP=-DNO_NETGROUP TLI= all
236
# UXP/DS System V.4 clone (vic@uida0.uida.es).
238
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
239
LIBS="-L/usr/ucblib -lsocket -lnsl -lucb" \
240
RANLIB=echo ARFLAGS=rv NETGROUP=-DNETGROUP \
241
AUX_OBJ=setenv.o TLI="-DTLI -DDRS_XTI" all
243
# DELL System V.4 Issue 2.2 using gcc (kim@tac.nyc.ny.us, jurban@norden1.com)
245
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
246
LIBS="-lsocket -lnsl" RANLIB=ranlib ARFLAGS=rv CC=gcc \
247
AUX_OBJ="setenv.o strcasecmp.o" TLI=-DTLI all
249
# SCO 3.2v4.1 no frills (jedwards@sol1.solinet.net).
251
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
252
LIBS="-lsocket -lnsl_s" RANLIB=echo ARFLAGS=rv \
253
NETGROUP= AUX_OBJ=setenv.o TLI= all
255
# SCO OpenDesktop 2.0, release 3.2 (peter@midnight.com). Please simplify.
257
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
258
LIBS="-lrpcsvc -lrpc -lyp -lrpc -lrpcsvc -lsocket" \
259
RANLIB=echo ARFLAGS=rv AUX_OBJ=setenv.o \
260
NETGROUP=-DNETGROUP TLI= all
262
# SCO 3.2v4.2 with TCP/IP 1.2.1 (Eduard.Vopicka@vse.cz). Please simplify.
264
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
265
LIBS="-lyp -lrpc -lsocket -lyp -lc_s -lc" \
266
RANLIB=echo ARFLAGS=rv AUX_OBJ=setenv.o \
267
NETGROUP=-DNETGROUP TLI= EXTRA_CFLAGS="-nointl -DNO_NETGRENT" all
269
# SCO 3.2v5.0.0 OpenServer 5 (bob@odt.handy.com, bill@razorlogic.com)
271
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
272
LIBS="-lrpcsvc -lsocket" RANLIB=echo ARFLAGS=rv VSYSLOG= \
273
AUX_OBJ=setenv.o NETGROUP=-DNETGROUP TLI= all
275
# sinix 5.42 setjmp workaround (szrzs023@ub3.ub.uni-kiel.de)
277
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
278
LIBS="-lsocket -lnsl -L/usr/ccs/lib -lc -L/usr/ucblib -lucb" \
279
RANLIB=echo ARFLAGS=rv AUX_OBJ=setenv.o TLI=-DTLI all
281
# Domain SR10.4. Build under bsd, run under either sysv3 or bsd43.
283
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
284
LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
285
NETGROUP=-DNETGROUP TLI= SYSTYPE="-A run,any -A sys,any" all
287
# Pyramid OSx 5.1, using the BSD universe.
289
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
290
LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ="environ.o vfprintf.o" \
291
STRINGS="-Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy" \
292
NETGROUP="-DNETGROUP -DUSE_GETDOMAIN" TLI= all
296
@echo "Warning: some definitions may be wrong."
297
make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
298
LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
299
NETGROUP=-DNETGROUP TLI= SYSTYPE="-sysname bsd43" all
301
# Cray (tested with UNICOS 7.0.4).
303
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
304
LIBS=-lnet RANLIB=echo ARFLAGS=rv \
305
EXTRA_CFLAGS=-DINADDR_NONE="\"((unsigned long) -1)\"" \
306
AUX_OBJ="setenv.o strcasecmp.o" NETGROUP= TLI= all
308
# Unicos 8.x, Cray-YMP (Bruce Kelly).
310
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
311
LIBS= RANLIB=echo AR=bld ARFLAGS=rv \
312
AUX_OBJ= NETGROUP= TLI= all
314
# Power_UNIX 2.1.1 (amantel@lerc.nasa.gov)
316
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
317
LIBS="-lnsl -lsocket -lgen -lresolv" RANLIB=echo ARFLAGS=rv \
318
NETGROUP= AUX_OBJ=setenv.o TLI=-DTLI BUGS="$(BUGS)" all
322
make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
323
LIBS="-linet -lnsl_s -ldbm" RANLIB=echo ARFLAGS=rv \
324
AUX_OBJ="setenv.o strcasecmp.o" EXTRA_CFLAGS="-DENOTCONN=ENAVAIL" \
327
# Interactive UNIX R3.2 version 4.0 (Bobby D. Wright).
329
make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
330
LIBS="-linet -lnsl_s -ldbm" RANLIB=echo ARFLAGS=rv \
331
AUX_OBJ=environ.o strcasecmp.o NETGROUP= TLI= all
333
# RTU 6.0 on a Masscomp 5400 (ben@piglet.cr.usgs.gov). When using the
334
# advanced installation, increment argv before actually looking at it.
336
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
337
LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
340
# Unixware sans NIS (mc@telebase.com). Compiler dislikes strcasecmp.c.
342
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
343
LIBS="-lsocket -lnsl -lc -L/usr/ucblib -lucb" RANLIB=echo ARFLAGS=rv \
344
NETGROUP=$(NETGROUP) AUX_OBJ=environ.o TLI=-DTLI all
347
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
348
LIBS="-lsocket -lnsl -lgen -lc -L/usr/ucblib -lucb" RANLIB=echo \
349
ARFLAGS=rv NETGROUP=$(NETGROUP) AUX_OBJ=environ.o TLI=-DTLI all
352
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
353
LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv \
354
NETGROUP=-DNETGROUP AUX_OBJ="setenv.o strcasecmp.o" TLI=-DTLI all
358
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
359
LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
362
###############################################################
363
# System dependencies: TLI (transport-level interface) support.
365
# Uncomment the following macro if your system has System V.4-style TLI
366
# support (/usr/include/sys/timod.h, /etc/netconfig, and the netdir(3)
371
###############################################################################
372
# System dependencies: differences between ranlib(1) and ar(1) implementations.
374
# Some C compilers (Ultrix 4.x) insist that ranlib(1) be run on an object
375
# library; some don't care as long as the modules are in the right order;
376
# some systems don't even have a ranlib(1) command. Make your choice.
378
RANLIB = ranlib # have ranlib (BSD-ish UNIX)
379
#RANLIB = echo # no ranlib (SYSV-ish UNIX)
381
ARFLAGS = rv # most systems
382
#ARFLAGS= rvs # IRIX 4.0.x
385
#AR = bld # Unicos 8.x
387
#############################################################################
388
# System dependencies: routines that are not present in the system libraries.
390
# If your system library does not have set/putenv() or strcasecmp(), use
391
# the ones provided with this source distribution. The environ.c module
392
# implements setenv(), getenv(), and putenv().
396
#AUX_OBJ= environ.o strcasecmp.o
398
# Uncomment the following if your C library does not provide the
399
# strchr/strrchr/memcmp routines, but comes with index/rindex/bcmp.
401
#STRINGS= -Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy
403
#################################################################
404
# System dependencies: selection of non-default object libraries.
406
# Most System V implementations require that you explicitly specify the
407
# networking libraries. There is no general consensus, though.
409
#LIBS = -lsocket -lnsl # SysV.4 Solaris 2.x
411
#LIBS = -lsocket -linet -lnsl -lnfs # PTX
412
#LIBS = -linet -lnsl_s -ldbm # ISC
413
#LIBS = -lnet # Unicos 7
414
#LIBS = -linet -lsyslog -ldbm
415
#LIBS = -lsyslog -lsocket -lnsl
417
######################################################
418
# System dependencies: system-specific compiler flags.
420
# Apollo Domain/OS offers both bsd and sys5 environments, sometimes
421
# on the same machine. If your Apollo is primarily sys5.3 and also
422
# has bsd4.3, uncomment the following to build under bsd and run under
423
# either environment.
425
#SYSTYPE= -A run,any -A sys,any
427
# For MIPS RISC/os 4_52.p3, uncomment the following definition.
429
#SYSTYPE= -sysname bsd43
431
##################################################
432
# System dependencies: working around system bugs.
434
# -DGETPEERNAME_BUG works around a getpeername(2) bug in some versions of
435
# Apollo or SYSV.4 UNIX: the wrapper would report that all UDP requests
436
# come from address 0.0.0.0. The workaround does no harm on other systems.
438
# -DBROKEN_FGETS works around an fgets(3) bug in some System V versions
439
# (IRIX): fgets() gives up too fast when reading from a network socket.
440
# The workaround does no harm on other systems.
442
# Some UNIX systems (IRIX) make the error of calling the strtok() library
443
# routine from other library routines such as, e.g., gethostbyname/addr().
444
# The result is that hosts can slip through the wrapper allow/deny filters.
445
# Compile with -DLIBC_CALLS_STRTOK to avoid the vendor's strtok() routine.
446
# The workaround does no harm on other systems.
448
# DG/UX 5.4.1 comes with an inet_ntoa() function that returns a structure
449
# instead of a long integer. Compile with -DINET_ADDR_BUG to work around
450
# this mutant behavour. Fixed in 5.4R3.
452
# Solaris 2.4 gethostbyname(), in DNS through NIS mode, puts only one
453
# address in the host address list; all other addresses are treated as
454
# host name aliases. Compile with -DSOLARIS_24_GETHOSTBYNAME_BUG to work
455
# around this. The workaround does no harm on other Solaris versions.
457
BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DLIBC_CALLS_STRTOK
458
#BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DINET_ADDR_BUG
459
#BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DSOLARIS_24_GETHOSTBYNAME_BUG
461
##########################################################################
462
# System dependencies: whether or not your system has NIS (or YP) support.
464
# If your system supports NIS or YP-style netgroups, enable the following
465
# macro definition. Netgroups are used only for host access control.
467
#NETGROUP= -DNETGROUP
469
###############################################################
470
# System dependencies: whether or not your system has vsyslog()
472
# If your system supports vsyslog(), comment out the following definition.
473
# If in doubt leave it in, it won't harm.
475
VSYSLOG = -Dvsyslog=myvsyslog
477
# End of the system dependencies.
478
#################################
480
##############################
481
# Start of the optional stuff.
483
###########################################
484
# Optional: Turning on language extensions
486
# Instead of the default access control language that is documented in
487
# the hosts_access.5 document, the wrappers can be configured to
488
# implement an extensible language documented in the hosts_options.5
489
# document. This language is implemented by the "options.c" source
490
# module, which also gives hints on how to add your own extensions.
491
# Uncomment the next definition to turn on the language extensions
492
# (examples: allow, deny, banners, twist and spawn).
494
#STYLE = -DPROCESS_OPTIONS # Enable language extensions.
496
################################################################
497
# Optional: Changing the default disposition of logfile records
499
# By default, logfile entries are written to the same file as used for
500
# sendmail transaction logs. See your /etc/syslog.conf file for actual
501
# path names of logfiles. The tutorial section in the README file
502
# gives a brief introduction to the syslog daemon.
504
# Change the FACILITY definition below if you disagree with the default
505
# disposition. Some syslog versions (including Ultrix 4.x) do not provide
508
# If nothing shows up on your system, it may be that the syslog records
509
# are sent to a dedicated loghost. It may also be that no syslog daemon
510
# is running at all. The README file gives pointers to surrogate syslog
511
# implementations for systems that have no syslog library routines or
512
# no syslog daemons. When changing the syslog.conf file, remember that
513
# there must be TABs between fields.
515
# The LOG_XXX names below are taken from the /usr/include/syslog.h file.
517
FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use
519
# The syslog priority at which successful connections are logged.
521
SEVERITY= LOG_INFO # LOG_INFO is normally not logged to the console
523
###########################
524
# Optional: Reduce DNS load
526
# When looking up the address for a host.domain name, the typical DNS
527
# code will first append substrings of your own domain, so it tries
528
# host.domain.your.own.domain, then host.domain.own.domain, and then
529
# host.domain. The APPEND_DOT feature stops this waste of cycles. It is
530
# off by default because it causes problems on sites that don't use DNS
531
# and with Solaris < 2.4. APPEND_DOT will not work with hostnames taken
532
# from /etc/hosts or from NIS maps. It does work with DNS through NIS.
536
##################################################
537
# Optional: Always attempt remote username lookups
539
# By default, the wrappers look up the remote username only when the
540
# access control rules require them to do so.
542
# Username lookups require that the remote host runs a daemon that
543
# supports an RFC 931 like protocol. Remote user name lookups are not
544
# possible for UDP-based connections, and can cause noticeable delays
545
# with connections from non-UNIX PCs. On some systems, remote username
546
# lookups can trigger a kernel bug, causing loss of service. The README
547
# file describes how to find out if your UNIX kernel has that problem.
549
# Uncomment the following definition if the wrappers should always
550
# attempt to get the remote user name. If this is not enabled you can
551
# still do selective username lookups as documented in the hosts_access.5
552
# and hosts_options.5 manual pages (`nroff -man' format).
554
#AUTH = -DALWAYS_RFC931
556
# The default username lookup timeout is 10 seconds. This may not be long
557
# enough for slow hosts or networks, but is enough to irritate PC users.
561
######################################################
562
# Optional: Changing the default file protection mask
564
# On many systems, network daemons and other system processes are started
565
# with a zero umask value, so that world-writable files may be produced.
566
# It is a good idea to edit your /etc/rc* files so that they begin with
567
# an explicit umask setting. On our site we use `umask 022' because it
568
# does not break anything yet gives adequate protection against tampering.
570
# The following macro specifies the default umask for processes run under
571
# control of the daemon wrappers. Comment it out only if you are certain
572
# that inetd and its children are started with a safe umask value.
574
UMASK = -DDAEMON_UMASK=022
576
#######################################
577
# Optional: Turning off access control
579
# By default, host access control is enabled. To disable host access
580
# control, comment out the following definition. Host access control
581
# can also be turned off at runtime by providing no or empty access
584
ACCESS = -DHOSTS_ACCESS
586
########################################################
587
# Optional: Changing the access control table pathnames
589
# The HOSTS_ALLOW and HOSTS_DENY macros define where the programs will
590
# look for access control information. Watch out for the quotes and
591
# backslashes when you make changes.
593
TABLES = -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\"
595
####################################################
596
# Optional: dealing with host name/address conflicts
598
# By default, the software tries to protect against hosts that claim to
599
# have someone elses host name. This is relevant for network services
600
# whose authentication depends on host names, such as rsh and rlogin.
602
# With paranoid mode on, connections will be rejected when the host name
603
# does not match the host address. Connections will also be rejected when
604
# the host name is available but cannot be verified.
606
# Comment out the following definition if you want more control over such
607
# requests. When paranoid mode is off and a host name double check fails,
608
# the client can be matched with the PARANOID access control pattern.
610
# Paranoid mode implies hostname lookup. In order to disable hostname
611
# lookups altogether, see the next section.
615
########################################
616
# Optional: turning off hostname lookups
618
# By default, the software always attempts to look up the client
619
# hostname. With selective hostname lookups, the client hostname
620
# lookup is postponed until the name is required by an access control
621
# rule or by a %letter expansion.
623
# In order to perform selective hostname lookups, disable paranoid
624
# mode (see previous section) and comment out the following definition.
626
HOSTNAME= -DALWAYS_HOSTNAME
628
#############################################
629
# Optional: Turning on host ADDRESS checking
631
# Optionally, the software tries to protect against hosts that pretend to
632
# have someone elses host address. This is relevant for network services
633
# whose authentication depends on host names, such as rsh and rlogin,
634
# because the network address is used to look up the remote host name.
636
# The protection is to refuse TCP connections with IP source routing
639
# This feature cannot be used with SunOS 4.x because of a kernel bug in
640
# the implementation of the getsockopt() system call. Kernel panics have
641
# been observed for SunOS 4.1.[1-3]. Symptoms are "BAD TRAP" and "Data
642
# fault" while executing the tcp_ctloutput() kernel function.
644
# Reportedly, Sun patch 100804-03 or 101790 fixes this for SunOS 4.1.x.
646
# Uncomment the following macro definition if your getsockopt() is OK.
648
# -DKILL_IP_OPTIONS is not needed on modern UNIX systems that can stop
649
# source-routed traffic in the kernel. Examples: 4.4BSD derivatives,
650
# Solaris 2.x, and Linux. See your system documentation for details.
652
# KILL_OPT= -DKILL_IP_OPTIONS
654
## End configuration options
655
############################
657
# Protection against weird shells or weird make programs.
660
.c.o:; $(CC) $(CFLAGS) -c $*.c
662
CFLAGS = -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
663
$(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
664
-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
665
-DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
666
$(UCHAR) $(TABLES) $(STRINGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \
667
$(VSYSLOG) $(HOSTNAME)
669
LIB_OBJ= hosts_access.o options.o shell_cmd.o rfc931.o eval.o \
670
hosts_ctl.o refuse.o percent_x.o clean_exit.o $(AUX_OBJ) \
671
$(FROM_OBJ) fix_options.o socket.o tli.o workarounds.o \
672
update.o misc.o diag.o percent_m.o myvsyslog.o
676
KIT = README miscd.c tcpd.c fromhost.c hosts_access.c shell_cmd.c \
677
tcpd.h tcpdmatch.c Makefile hosts_access.5 strcasecmp.c BLURB rfc931.c \
678
tcpd.8 eval.c hosts_access.3 hosts_ctl.c percent_x.c options.c \
679
clean_exit.c environ.c patchlevel.h fix_options.c workarounds.c \
680
socket.c tli.c DISCLAIMER fakelog.c safe_finger.c hosts_options.5 \
681
CHANGES try-from.c update.c ptx.c vfprintf.c tli-sequent.c \
682
tli-sequent.h misc.c diag.c ncr.c tcpdchk.c percent_m.c \
683
myvsyslog.c mystdarg.h printf.ck README.IRIX Banners.Makefile \
684
refuse.c tcpdchk.8 setenv.c inetcf.c inetcf.h scaffold.c \
685
scaffold.h tcpdmatch.8 README.NIS
689
all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk
691
# Invalidate all object files when the compiler options (CFLAGS) have changed.
694
@set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; }
695
@set +e; echo $(CFLAGS) >/tmp/cflags.$$$$ ; \
696
if cmp cflags /tmp/cflags.$$$$ ; \
697
then rm /tmp/cflags.$$$$ ; \
698
else mv /tmp/cflags.$$$$ cflags ; \
699
fi >/dev/null 2>/dev/null
703
$(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ)
707
$(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS)
709
miscd: miscd.o $(LIB)
710
$(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
712
safe_finger: safe_finger.o $(LIB)
713
$(CC) $(CFLAGS) -o $@ safe_finger.o $(LIB) $(LIBS)
715
TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o
717
tcpdmatch: $(TCPDMATCH_OBJ) $(LIB)
718
$(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(LIB) $(LIBS)
720
try-from: try-from.o fakelog.o $(LIB)
721
$(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(LIB) $(LIBS)
723
TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o
725
tcpdchk: $(TCPDCHK_OBJ) $(LIB)
726
$(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(LIB) $(LIBS)
741
rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] core \
748
# Enable all bells and whistles for linting.
750
lint: tcpd_lint miscd_lint match_lint chk_lint
753
lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \
754
-DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \
755
$(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \
756
-DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \
757
-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \
758
-Dvsyslog=myvsyslog \
759
tcpd.c fromhost.c socket.c tli.c hosts_access.c \
760
shell_cmd.c refuse.c rfc931.c eval.c percent_x.c clean_exit.c \
761
options.c setenv.c fix_options.c workarounds.c update.c misc.c \
762
diag.c myvsyslog.c percent_m.c
765
lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \
766
-DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \
767
$(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \
768
-DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \
769
-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \
770
-Dvsyslog=myvsyslog \
771
miscd.c fromhost.c socket.c tli.c hosts_access.c \
772
shell_cmd.c refuse.c rfc931.c eval.c percent_x.c clean_exit.c \
773
options.c setenv.c fix_options.c workarounds.c update.c misc.c \
774
diag.c myvsyslog.c percent_m.c
777
lint -DFACILITY=LOG_MAIL -DSEVERITY=$(SEVERITY) -DHOSTS_ACCESS \
778
-DPARANOID $(TABLES) -DNETGROUP -DPROCESS_OPTIONS -DRFC931_TIMEOUT=10 \
779
-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \
780
-Dvsyslog=myvsyslog \
781
tcpdmatch.c hosts_access.c eval.c percent_x.c options.c workarounds.c \
782
update.c socket.c misc.c diag.c myvsyslog.c percent_m.c setenv.c \
786
lint -DFACILITY=LOG_MAIL -DSEVERITY=$(SEVERITY) -DHOSTS_ACCESS \
787
-DPARANOID $(TABLES) -DNETGROUP -DPROCESS_OPTIONS -DRFC931_TIMEOUT=10 \
788
-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \
789
-Dvsyslog=myvsyslog \
790
tcpdchk.c eval.c percent_x.c options.c update.c workarounds.c \
791
setenv.c misc.c diag.c myvsyslog.c percent_m.c inetcf.c scaffold.c
794
printfck -f printf.ck \
795
tcpd.c fromhost.c socket.c tli.c hosts_access.c \
796
shell_cmd.c refuse.c rfc931.c eval.c percent_x.c clean_exit.c \
797
options.c setenv.c fix_options.c workarounds.c update.c misc.c \
798
diag.c myvsyslog.c percent_m.c >aap.c
799
lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \
800
-DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \
801
$(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \
802
-DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \
803
-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" -Dvsyslog=myvsyslog aap.c
804
printfck -f printf.ck \
805
tcpdchk.c eval.c percent_x.c options.c update.c workarounds.c \
806
setenv.c misc.c diag.c myvsyslog.c percent_m.c inetcf.c scaffold.c \
808
lint -DFACILITY=LOG_MAIL -DSEVERITY=$(SEVERITY) -DHOSTS_ACCESS \
809
-DPARANOID $(TABLES) -DNETGROUP -DPROCESS_OPTIONS -DRFC931_TIMEOUT=10 \
810
-Dvsyslog=myvsyslog -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\"
812
# Internal compilation dependencies.
823
fakelog.o: mystdarg.h
824
fix_options.o: cflags
825
fix_options.o: tcpd.h
828
hosts_access.o: cflags
829
hosts_access.o: tcpd.h
838
miscd.o: patchlevel.h
841
myvsyslog.o: mystdarg.h
848
percent_m.o: mystdarg.h
857
safe_finger.o: cflags
859
scaffold.o: scaffold.h
872
tcpdchk.o: scaffold.h
875
tcpdmatch.o: scaffold.h
877
tli-sequent.o: cflags
878
tli-sequent.o: tcpd.h
879
tli-sequent.o: tli-sequent.h
888
workarounds.o: cflags
889
workarounds.o: tcpd.h