Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/tcpd/Makefile
+++ new/usr/src/cmd/tcpd/Makefile
1 1 #
2 2 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
3 3 # Use is subject to license terms.
4 4 #
5 5 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
6 6 #
7 +# Copyright (c) 2018, Joyent, Inc.
7 8
8 9 PROG= safe_finger tcpd tcpdchk tcpdmatch try-from
9 10
10 11 include ../Makefile.cmd
11 12
12 13 CFLAGS += $(CCVERBOSE)
13 14 CPPFLAGS += $(ACCESS) $(PARANOID) $(NETGROUP) $(TLI) \
14 15 $(UMASK) $(STYLE) $(TABLES) $(KILL_OPT) $(BUGS) \
15 16 -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
16 17 -DFACILITY=$(FACILITY) -DSEVERITY=$(SEVERITY) \
17 18 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \
18 19 -I../../lib/libwrap
19 20 tcpd tcpdmatch try-from := \
20 21 LDLIBS += -lwrap
21 22 tcpdchk := LDLIBS += -lwrap -lnsl
↓ open down ↓ |
5 lines elided |
↑ open up ↑ |
22 23
23 24 CERRWARN += -erroff=E_FUNC_HAS_NO_RETURN_STMT
24 25 CERRWARN += -erroff=E_IMPLICIT_DECL_FUNC_RETURN_INT
25 26 CERRWARN += -_gcc=-Wno-unused-variable
26 27 CERRWARN += -_gcc=-Wno-parentheses
27 28 CERRWARN += -_gcc=-Wno-uninitialized
28 29 CERRWARN += -_gcc=-Wno-implicit-function-declaration
29 30 CERRWARN += -_gcc=-Wno-return-type
30 31 CERRWARN += -_gcc=-Wno-clobbered
31 32
33 +# not linted
34 +SMATCH=off
35 +
32 36 # Various components must export interfaces, but also contain name-space
33 37 # clashes with system libraries.
34 38 MAPFILE.INT.D= $(MAPFILE.NGB) mapfile-intf-tcpdchk
35 39 MAPFILE.INT.M= $(MAPFILE.NGB) mapfile-intf-tcpdmatch
36 40 MAPFILE.INT.F= $(MAPFILE.NGB) mapfile-intf-tryfrom
37 41
38 42 tcpdchk := LDFLAGS +=$(MAPFILE.INT.D:%=-M%)
39 43 tcpdmatch := LDFLAGS +=$(MAPFILE.INT.M:%=-M%)
40 44 try-from := LDFLAGS +=$(MAPFILE.INT.F:%=-M%)
41 45
42 46 .KEEP_STATE:
43 47
44 48 all: $(PROG)
45 49
46 50 install: all $(ROOTUSRSBINPROG)
47 51
48 52 clean:
49 53 $(RM) *.o
50 54
51 55 lint: lint_PROG
52 56
53 57 TCPDMATCH_OBJ= tcpdmatch.o fakelog.o inetcf.o scaffold.o
54 58
55 59 tcpdmatch: $(TCPDMATCH_OBJ) $(LIB) $(MAPFILE.INTF.M)
56 60 $(LINK.c) -o $@ $(TCPDMATCH_OBJ) $(LDLIBS)
57 61 $(POST_PROCESS)
58 62
59 63 try-from: try-from.o fakelog.o $(LIB) $(MAPFILE.INTF.F)
60 64 $(LINK.c) -o $@ try-from.o fakelog.o $(LDLIBS)
61 65 $(POST_PROCESS)
62 66
63 67 TCPDCHK_OBJ= tcpdchk.o fakelog.o inetcf.o scaffold.o
64 68
65 69 tcpdchk: $(TCPDCHK_OBJ) $(LIB) $(MAPFILE.INTF.C)
66 70 $(LINK.c) -o $@ $(TCPDCHK_OBJ) $(LDLIBS)
67 71 $(POST_PROCESS)
68 72
69 73 include ../Makefile.targ
70 74
71 75 # The rest of this file contains definitions more-or-less directly from the
72 76 # original Makefile of the tcp_wrappers distribution.
73 77
74 78 ##############################
75 79 # System parameters appropriate for Solaris 9
76 80
77 81 REAL_DAEMON_DIR = /usr/sbin
78 82 TLI = -DTLI
79 83 NETGROUP = -DNETGROUP
80 84
81 85 ##############################
82 86 # Start of the optional stuff.
83 87
84 88 ###########################################
85 89 # Optional: Turning on language extensions
86 90 #
87 91 # Instead of the default access control language that is documented in
88 92 # the hosts_access.5 document, the wrappers can be configured to
89 93 # implement an extensible language documented in the hosts_options.5
90 94 # document. This language is implemented by the "options.c" source
91 95 # module, which also gives hints on how to add your own extensions.
92 96 # Uncomment the next definition to turn on the language extensions
93 97 # (examples: allow, deny, banners, twist and spawn).
94 98 #
95 99 STYLE = -DPROCESS_OPTIONS # Enable language extensions.
96 100
97 101 ################################################################
98 102 # Optional: Changing the default disposition of logfile records
99 103 #
100 104 # By default, logfile entries are written to the same file as used for
101 105 # sendmail transaction logs. See your /etc/syslog.conf file for actual
102 106 # path names of logfiles. The tutorial section in the README file
103 107 # gives a brief introduction to the syslog daemon.
104 108 #
105 109 # Change the FACILITY definition below if you disagree with the default
106 110 # disposition. Some syslog versions (including Ultrix 4.x) do not provide
107 111 # this flexibility.
108 112 #
109 113 # If nothing shows up on your system, it may be that the syslog records
110 114 # are sent to a dedicated loghost. It may also be that no syslog daemon
111 115 # is running at all. The README file gives pointers to surrogate syslog
112 116 # implementations for systems that have no syslog library routines or
113 117 # no syslog daemons. When changing the syslog.conf file, remember that
114 118 # there must be TABs between fields.
115 119 #
116 120 # The LOG_XXX names below are taken from the /usr/include/syslog.h file.
117 121
118 122 FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use
119 123
120 124 # The syslog priority at which successful connections are logged.
121 125
122 126 SEVERITY= LOG_INFO # LOG_INFO is normally not logged to the console
123 127
124 128 ######################################################
125 129 # Optional: Changing the default file protection mask
126 130 #
127 131 # On many systems, network daemons and other system processes are started
128 132 # with a zero umask value, so that world-writable files may be produced.
129 133 # It is a good idea to edit your /etc/rc* files so that they begin with
130 134 # an explicit umask setting. On our site we use `umask 022' because it
131 135 # does not break anything yet gives adequate protection against tampering.
132 136 #
133 137 # The following macro specifies the default umask for processes run under
134 138 # control of the daemon wrappers. Comment it out only if you are certain
135 139 # that inetd and its children are started with a safe umask value.
136 140
137 141 UMASK = -DDAEMON_UMASK=022
138 142
139 143 #######################################
140 144 # Optional: Turning off access control
141 145 #
142 146 # By default, host access control is enabled. To disable host access
143 147 # control, comment out the following definition. Host access control
144 148 # can also be turned off at runtime by providing no or empty access
145 149 # control tables.
146 150
147 151 ACCESS = -DHOSTS_ACCESS
148 152
149 153 ####################################################
150 154 # Optional: dealing with host name/address conflicts
151 155 #
152 156 # By default, the software tries to protect against hosts that claim to
153 157 # have someone elses host name. This is relevant for network services
154 158 # whose authentication depends on host names, such as rsh and rlogin.
155 159 #
156 160 # With paranoid mode on, connections will be rejected when the host name
157 161 # does not match the host address. Connections will also be rejected when
158 162 # the host name is available but cannot be verified.
159 163 #
160 164 # Comment out the following definition if you want more control over such
161 165 # requests. When paranoid mode is off and a host name double check fails,
162 166 # the client can be matched with the PARANOID access control pattern.
163 167 #
164 168 # Paranoid mode implies hostname lookup. In order to disable hostname
165 169 # lookups altogether, see the next section.
166 170
167 171 PARANOID= -DPARANOID
168 172
169 173 # The default username lookup timeout is 10 seconds. This may not be long
170 174 # enough for slow hosts or networks, but is enough to irritate PC users.
171 175
172 176 RFC931_TIMEOUT = 10
173 177
174 178 ########################################################
175 179 # Optional: Changing the access control table pathnames
176 180 #
177 181 # The HOSTS_ALLOW and HOSTS_DENY macros define where the programs will
178 182 # look for access control information. Watch out for the quotes and
179 183 # backslashes when you make changes.
180 184
181 185 TABLES = -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\"
182 186
183 187 #############################################
184 188 # Optional: Turning on host ADDRESS checking
185 189 #
186 190 # Optionally, the software tries to protect against hosts that pretend to
187 191 # have someone elses host address. This is relevant for network services
188 192 # whose authentication depends on host names, such as rsh and rlogin,
189 193 # because the network address is used to look up the remote host name.
190 194 #
191 195 # The protection is to refuse TCP connections with IP source routing
192 196 # options.
193 197 #
194 198 # This feature cannot be used with SunOS 4.x because of a kernel bug in
195 199 # the implementation of the getsockopt() system call. Kernel panics have
196 200 # been observed for SunOS 4.1.[1-3]. Symptoms are "BAD TRAP" and "Data
197 201 # fault" while executing the tcp_ctloutput() kernel function.
198 202 #
199 203 # Reportedly, Sun patch 100804-03 or 101790 fixes this for SunOS 4.1.x.
200 204 #
201 205 # Uncomment the following macro definition if your getsockopt() is OK.
202 206 #
203 207 # -DKILL_IP_OPTIONS is not needed on modern UNIX systems that can stop
204 208 # source-routed traffic in the kernel. Examples: 4.4BSD derivatives,
205 209 # Solaris 2.x, and Linux. See your system documentation for details.
206 210 #
207 211 # KILL_OPT= -DKILL_IP_OPTIONS
208 212
209 213 ## End configuration options
210 214 ############################
↓ open down ↓ |
169 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX