Merge lp:~noskcaj/ubuntu/saucy/xinetd/2.3.15 into lp:ubuntu/saucy/xinetd
- Saucy (13.10)
- 2.3.15
- Merge into saucy
Proposed by
Jackson Doak
Status: | Merged |
---|---|
Merge reported by: | Martin Pitt |
Merged at revision: | not available |
Proposed branch: | lp:~noskcaj/ubuntu/saucy/xinetd/2.3.15 |
Merge into: | lp:ubuntu/saucy/xinetd |
Diff against target: |
23392 lines (+4670/-15467) 129 files modified
.pc/.quilt_patches (+1/-0) .pc/.quilt_series (+1/-0) .pc/.version (+1/-0) .pc/000001-documentation_fixes/xinetd/itox.8 (+19/-0) .pc/000001-documentation_fixes/xinetd/xinetd.conf.man (+1253/-0) .pc/000001-documentation_fixes/xinetd/xinetd.man (+194/-0) .pc/000004-Fix-xinetd.log.man-installation-path/Makefile.in (+123/-0) .pc/000008-fix-manpages/xinetd/itox.8 (+22/-0) .pc/000008-fix-manpages/xinetd/xinetd.conf.man (+1253/-0) .pc/applied-patches (+3/-0) CHANGELOG (+25/-0) Makefile.in (+2/-2) config.guess (+494/-703) config.h.in (+2/-1) config.sub (+132/-462) configure (+111/-0) configure.in (+28/-0) debian/README.Debian (+1/-1) debian/changelog (+63/-0) debian/compat (+1/-1) debian/control (+8/-7) debian/patches/000001-documentation_fixes (+62/-0) debian/patches/000004-Fix-xinetd.log.man-installation-path (+16/-0) debian/patches/000008-fix-manpages (+377/-0) debian/patches/0001-Documentation-fixes.patch (+0/-74) debian/patches/0002-xconv.pl-updates.patch (+0/-88) debian/patches/0003-Various-fixes-from-the-previous-maintainer.patch (+0/-77) debian/patches/0004-Fix-xinetd.log.man-installation-path.patch (+0/-25) debian/patches/0005-Update-build-system.patch (+0/-13384) debian/patches/0006-Disable-services-from-inetd.conf-if-a-service-with-t.patch (+0/-84) debian/patches/0007-xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch (+0/-110) debian/patches/0008-CVE-2012-0862.patch (+0/-49) debian/patches/series (+3/-0) debian/rules (+14/-104) debian/source/format (+1/-0) debian/watch (+2/-0) debian/xinetd.d/chargen (+2/-2) debian/xinetd.d/daytime (+2/-2) debian/xinetd.d/discard (+2/-2) debian/xinetd.d/echo (+2/-2) debian/xinetd.d/time (+2/-2) debian/xinetd.doc-base (+8/-0) debian/xinetd.docs (+3/-0) debian/xinetd.examples (+2/-0) debian/xinetd.init (+12/-10) debian/xinetd.install (+2/-2) debian/xinetd.links (+1/-0) debian/xinetd.postinst (+0/-17) debian/xinetd.preinst (+0/-12) debian/xinetd.prerm (+0/-13) libs/src/misc/Makefile.in (+1/-1) libs/src/misc/m_env.3 (+1/-1) libs/src/misc/m_env.h (+1/-1) libs/src/misc/misc.3 (+1/-1) libs/src/misc/misc.h (+1/-1) libs/src/pset/Makefile.in (+1/-1) libs/src/pset/pset.3 (+1/-1) libs/src/pset/pset.h (+1/-1) libs/src/pset/psi.3 (+1/-1) libs/src/sio/Makefile.in (+1/-1) libs/src/sio/Sprint.3 (+1/-1) libs/src/sio/impl.h (+3/-3) libs/src/sio/sio.3 (+1/-1) libs/src/sio/sio.c (+15/-15) libs/src/sio/sio.h (+8/-6) libs/src/sio/sioconf.h (+1/-1) libs/src/sio/siosup.c (+11/-11) libs/src/sio/sprint.c (+16/-14) libs/src/str/Makefile.in (+1/-1) libs/src/str/str.h (+1/-1) libs/src/str/strparse.3 (+1/-1) libs/src/str/strparse.c (+1/-1) libs/src/str/strparse.h (+1/-1) libs/src/str/strprint.3 (+1/-1) libs/src/str/strutil.3 (+1/-1) libs/src/xlog/Makefile.in (+1/-1) libs/src/xlog/filelog.h (+1/-1) libs/src/xlog/impl.h (+1/-1) libs/src/xlog/slog.h (+1/-1) libs/src/xlog/xlog.3 (+1/-1) libs/src/xlog/xlog.c (+1/-0) libs/src/xlog/xlog.h (+1/-1) xinetd/Makefile.in (+1/-1) xinetd/access.c (+2/-2) xinetd/access.h (+1/-1) xinetd/addr.c (+7/-7) xinetd/addr.h (+1/-1) xinetd/attr.h (+1/-1) xinetd/builtins.c (+37/-23) xinetd/builtins.h (+1/-1) xinetd/child.c (+105/-0) xinetd/conf.h (+1/-1) xinetd/confparse.c (+29/-0) xinetd/connection.c (+4/-2) xinetd/connection.h (+1/-1) xinetd/defs.h (+4/-1) xinetd/ident.c (+2/-2) xinetd/includedir.c (+2/-2) xinetd/inet.c (+0/-4) xinetd/int.c (+1/-1) xinetd/int.h (+1/-1) xinetd/itox.8 (+9/-6) xinetd/itox.c (+2/-2) xinetd/log.h (+1/-1) xinetd/main.c (+4/-1) xinetd/mask.h (+1/-1) xinetd/nvlists.c (+1/-0) xinetd/options.c (+3/-3) xinetd/parse.h (+1/-1) xinetd/parsers.c (+1/-1) xinetd/redirect.c (+3/-2) xinetd/sconf.h (+3/-1) xinetd/sconst.h (+1/-1) xinetd/sensor.c (+2/-2) xinetd/server.h (+1/-1) xinetd/service.c (+17/-3) xinetd/service.h (+2/-1) xinetd/signals.c (+6/-6) xinetd/state.h (+1/-1) xinetd/tcpint.c (+6/-6) xinetd/udpint.c (+6/-6) xinetd/util.c (+3/-2) xinetd/xconfig.h (+1/-1) xinetd/xconv-new.pl (+1/-1) xinetd/xconv.pl (+1/-1) xinetd/xinetd.conf.man (+57/-48) xinetd/xinetd.log.man (+1/-1) xinetd/xinetd.man (+2/-2) xinetd/xtimer.c (+2/-2) |
To merge this branch: | bzr merge lp:~noskcaj/ubuntu/saucy/xinetd/2.3.15 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Pitt | Approve | ||
Review via email: mp+180082@code.launchpad.net |
Commit message
Description of the change
Merged from debian unstable
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added directory '.pc' | |||
2 | === added file '.pc/.quilt_patches' | |||
3 | --- .pc/.quilt_patches 1970-01-01 00:00:00 +0000 | |||
4 | +++ .pc/.quilt_patches 2013-08-14 10:06:03 +0000 | |||
5 | @@ -0,0 +1,1 @@ | |||
6 | 1 | debian/patches | ||
7 | 0 | 2 | ||
8 | === added file '.pc/.quilt_series' | |||
9 | --- .pc/.quilt_series 1970-01-01 00:00:00 +0000 | |||
10 | +++ .pc/.quilt_series 2013-08-14 10:06:03 +0000 | |||
11 | @@ -0,0 +1,1 @@ | |||
12 | 1 | series | ||
13 | 0 | 2 | ||
14 | === added file '.pc/.version' | |||
15 | --- .pc/.version 1970-01-01 00:00:00 +0000 | |||
16 | +++ .pc/.version 2013-08-14 10:06:03 +0000 | |||
17 | @@ -0,0 +1,1 @@ | |||
18 | 1 | 2 | ||
19 | 0 | 2 | ||
20 | === added directory '.pc/000001-documentation_fixes' | |||
21 | === added file '.pc/000001-documentation_fixes/.timestamp' | |||
22 | === added directory '.pc/000001-documentation_fixes/xinetd' | |||
23 | === added file '.pc/000001-documentation_fixes/xinetd/itox.8' | |||
24 | --- .pc/000001-documentation_fixes/xinetd/itox.8 1970-01-01 00:00:00 +0000 | |||
25 | +++ .pc/000001-documentation_fixes/xinetd/itox.8 2013-08-14 10:06:03 +0000 | |||
26 | @@ -0,0 +1,19 @@ | |||
27 | 1 | .TH ITOX 8 "October 1999" "xinetd" | ||
28 | 2 | .SH NAME | ||
29 | 3 | itox \- converts inetd.conf style configuration files to xinetd.conf | ||
30 | 4 | .SH SYNOPSIS | ||
31 | 5 | itox [-daemon_dir <dir_path>] | ||
32 | 6 | .SH DESCRIPTION | ||
33 | 7 | .B itox | ||
34 | 8 | takes on its standard input inetd.conf style entries and dumps to | ||
35 | 9 | standard output the corresponding xinetd.conf style entries. | ||
36 | 10 | .SH OPTIONS | ||
37 | 11 | .TP | ||
38 | 12 | .I -daemon_dir <dir_path> | ||
39 | 13 | Specifies the file name of the TCP daemon used in the inetd.conf file. | ||
40 | 14 | .SH EXAMPLES | ||
41 | 15 | itox -daemon_dir /usr/sbin/tcpd < inetd.conf > xinetd.conf | ||
42 | 16 | .SH AUTHOR | ||
43 | 17 | xinetd and itox were written by Panagiotis Tsirigotis. | ||
44 | 18 | .sp | ||
45 | 19 | This man page was written by Norbert Veber <nveber@debian.org>. | ||
46 | 0 | 20 | ||
47 | === added file '.pc/000001-documentation_fixes/xinetd/xinetd.conf.man' | |||
48 | --- .pc/000001-documentation_fixes/xinetd/xinetd.conf.man 1970-01-01 00:00:00 +0000 | |||
49 | +++ .pc/000001-documentation_fixes/xinetd/xinetd.conf.man 2013-08-14 10:06:03 +0000 | |||
50 | @@ -0,0 +1,1253 @@ | |||
51 | 1 | .\"(c) Copyright 1992, by Panagiotis Tsirigotis | ||
52 | 2 | .\"(c) Sections Copyright 1998-2001 by Rob Braun | ||
53 | 3 | .\"All rights reserved. The file named COPYRIGHT specifies the terms | ||
54 | 4 | .\"and conditions for redistribution. | ||
55 | 5 | .\" | ||
56 | 6 | .\" $Id: xinetd.conf.man,v 1.20 2007-09-20 14:58:27 bbraun Exp $ | ||
57 | 7 | .TH XINETD.CONF 5 "14 June 2001" | ||
58 | 8 | .\" *************************** NAME ********************************* | ||
59 | 9 | .SH NAME | ||
60 | 10 | xinetd.conf \- Extended Internet Services Daemon configuration file | ||
61 | 11 | .\" *********************** DESCRIPTION **************************** | ||
62 | 12 | .SH DESCRIPTION | ||
63 | 13 | .B "xinetd.conf" | ||
64 | 14 | is the configuration file that | ||
65 | 15 | determines the services provided by \fBxinetd\fP. | ||
66 | 16 | Any line whose first non-white-space character is a '#' is considered | ||
67 | 17 | a comment line. Empty lines are ignored. | ||
68 | 18 | .LP | ||
69 | 19 | The file contains entries of the form: | ||
70 | 20 | .RS | ||
71 | 21 | .nf | ||
72 | 22 | .ft B | ||
73 | 23 | .sp | ||
74 | 24 | service <service_name> | ||
75 | 25 | { | ||
76 | 26 | .RS | ||
77 | 27 | .ft B | ||
78 | 28 | <attribute> <assign_op> <value> <value> ... | ||
79 | 29 | .I "..." | ||
80 | 30 | .RE | ||
81 | 31 | } | ||
82 | 32 | .ft R | ||
83 | 33 | .fi | ||
84 | 34 | .RE | ||
85 | 35 | .LP | ||
86 | 36 | The assignment operator, | ||
87 | 37 | .I assign_op, | ||
88 | 38 | can be one of | ||
89 | 39 | .B '=', | ||
90 | 40 | .B '+=', | ||
91 | 41 | .B '-='. | ||
92 | 42 | The majority of attributes support only the simple assignment operator, | ||
93 | 43 | .B '='. | ||
94 | 44 | Attributes whose value is a set of values support all assignment operators. | ||
95 | 45 | For such attributes, | ||
96 | 46 | .B '+=' | ||
97 | 47 | means adding a value to the set and | ||
98 | 48 | .B '-=' | ||
99 | 49 | means removing a value from the set. | ||
100 | 50 | A list of these attributes will be given | ||
101 | 51 | after all the attributes are described. | ||
102 | 52 | .LP | ||
103 | 53 | Each entry defines a service identified by the \fIservice_name\fP. | ||
104 | 54 | The following is a list of available attributes: | ||
105 | 55 | .TP 17 | ||
106 | 56 | .B id | ||
107 | 57 | This attribute is used to uniquely identify a service. | ||
108 | 58 | This is useful because there exist services that can use different | ||
109 | 59 | protocols and need to be described with different entries in the | ||
110 | 60 | configuration file. | ||
111 | 61 | By default, the service id is the same as the service name. | ||
112 | 62 | .TP | ||
113 | 63 | .B type | ||
114 | 64 | Any combination of the following values may be used: | ||
115 | 65 | .RS | ||
116 | 66 | .TP 12 | ||
117 | 67 | .B RPC | ||
118 | 68 | if this is an RPC service | ||
119 | 69 | .TP | ||
120 | 70 | .B INTERNAL | ||
121 | 71 | if this is a service provided by \fBxinetd\fP. | ||
122 | 72 | .TP | ||
123 | 73 | .B TCPMUX/TCPMUXPLUS | ||
124 | 74 | if this is a service that will be started according to the RFC 1078 protocol on the TCPMUX well-known port. See the section describing TCPMUX services below. | ||
125 | 75 | .TP | ||
126 | 76 | .B UNLISTED | ||
127 | 77 | if this is a service not listed in a standard system file | ||
128 | 78 | (like | ||
129 | 79 | .I /etc/rpc | ||
130 | 80 | for RPC services, or | ||
131 | 81 | .I /etc/services | ||
132 | 82 | for non-RPC services). | ||
133 | 83 | .RE | ||
134 | 84 | .TP | ||
135 | 85 | .B flags | ||
136 | 86 | Any combination of the following flags may be used: | ||
137 | 87 | .RS | ||
138 | 88 | .TP 12 | ||
139 | 89 | .B INTERCEPT | ||
140 | 90 | Intercept packets or accepted connections in order to verify that they | ||
141 | 91 | are coming from acceptable locations (internal or multi-threaded | ||
142 | 92 | services cannot be intercepted). | ||
143 | 93 | .TP | ||
144 | 94 | .B NORETRY | ||
145 | 95 | Avoid retry attempts in case of fork failure. | ||
146 | 96 | .TP | ||
147 | 97 | .B IDONLY | ||
148 | 98 | Accept connections only when the remote end identifies the remote user | ||
149 | 99 | (i.e. the remote host must run an identification server). | ||
150 | 100 | This flag applies only to connection-based services. | ||
151 | 101 | This flag is ineffective if the | ||
152 | 102 | .B USERID | ||
153 | 103 | log option is not used. | ||
154 | 104 | .TP | ||
155 | 105 | .B NAMEINARGS | ||
156 | 106 | This will cause the first argument in "server_args" to be argv[0] when | ||
157 | 107 | executing the server, as specified in "server". This allows you to use | ||
158 | 108 | tcpd by putting tcpd in "server" and the name of the server in "server_args" | ||
159 | 109 | like in normal inetd. | ||
160 | 110 | .TP | ||
161 | 111 | .B NODELAY | ||
162 | 112 | If the service is a tcp service and the NODELAY flag is set, then the | ||
163 | 113 | TCP_NODELAY flag will be set on the socket. If the service is not | ||
164 | 114 | a tcp service, this option has no effect. | ||
165 | 115 | .TP | ||
166 | 116 | .B KEEPALIVE | ||
167 | 117 | If the service is a tcp service and the KEEPALIVE flag is set, then | ||
168 | 118 | the SO_KEEPALIVE socket flag will be set on the socket. If the service | ||
169 | 119 | is not a tcp service, this option has no effect. | ||
170 | 120 | .TP | ||
171 | 121 | .B NOLIBWRAP | ||
172 | 122 | This disables internal calling of the tcpwrap library to determine access | ||
173 | 123 | to the service. This may be needed in order to use libwrap functionality | ||
174 | 124 | not available to long-running processes such as xinetd; in this case, | ||
175 | 125 | the tcpd program can be called explicitly (see also the NAMEINARGS flag). | ||
176 | 126 | For RPC services using TCP transport, this flag is automatically turned on, | ||
177 | 127 | because xinetd cannot get remote host address information for the rpc port. | ||
178 | 128 | .TP | ||
179 | 129 | .B SENSOR | ||
180 | 130 | This replaces the service with a sensor that detects accesses to the | ||
181 | 131 | specified port. NOTE: It will NOT detect stealth scans. This flag | ||
182 | 132 | should be used only on services that you know you don't need. When an | ||
183 | 133 | access is made to this service's port, the IP Address is added to a global | ||
184 | 134 | no_access list. This causes all subsequent accesses from the originating IP | ||
185 | 135 | address to be denied access until the deny_time setting expires. The amount | ||
186 | 136 | of time spent on this list is configurable as the deny_time attribute. The | ||
187 | 137 | SENSOR flag will also cause xinetd to consider the server attribute to be | ||
188 | 138 | INTERNAL no matter what is typed on the same line. Another important thing | ||
189 | 139 | to remember is that if the socket_type is set to stream, then the wait | ||
190 | 140 | attribute should be set to no. | ||
191 | 141 | .TP | ||
192 | 142 | .B IPv4 | ||
193 | 143 | Sets the service to be an IPv4 service (AF_INET). | ||
194 | 144 | .TP | ||
195 | 145 | .B IPv6 | ||
196 | 146 | Sets the service to be an IPv6 service (AF_INET6), if IPv6 is available on the system. | ||
197 | 147 | .TP | ||
198 | 148 | .B LABELED | ||
199 | 149 | The LABELED flag will tell xinetd to change the child processes SE Linux context to match that of the incoming connection as it starts the service. This only works for external tcp non-waiting servers and is an error if applied to an internal, udp, or tcp-wait server. | ||
200 | 150 | .TP | ||
201 | 151 | .B REUSE | ||
202 | 152 | The REUSE flag is deprecated. All services now implicitly use the REUSE flag. | ||
203 | 153 | .RE | ||
204 | 154 | .TP | ||
205 | 155 | .B disable | ||
206 | 156 | This is boolean "yes" or "no". This will result in the service | ||
207 | 157 | being disabled and not starting. See the DISABLE flag description. | ||
208 | 158 | .RE | ||
209 | 159 | .TP | ||
210 | 160 | .B socket_type | ||
211 | 161 | Possible values for this attribute include: | ||
212 | 162 | .RS | ||
213 | 163 | .TP 12 | ||
214 | 164 | .I stream | ||
215 | 165 | stream-based service | ||
216 | 166 | .TP | ||
217 | 167 | .I dgram | ||
218 | 168 | datagram-based service | ||
219 | 169 | .TP | ||
220 | 170 | .I raw | ||
221 | 171 | service that requires direct access to IP | ||
222 | 172 | .TP | ||
223 | 173 | .I seqpacket | ||
224 | 174 | service that requires reliable sequential datagram transmission | ||
225 | 175 | .RE | ||
226 | 176 | .TP | ||
227 | 177 | .B protocol | ||
228 | 178 | determines the protocol that is employed by the service. | ||
229 | 179 | The protocol must exist in | ||
230 | 180 | .I /etc/protocols. | ||
231 | 181 | If this | ||
232 | 182 | attribute is not defined, the default protocol employed by the service | ||
233 | 183 | will be used. | ||
234 | 184 | .TP | ||
235 | 185 | .B wait | ||
236 | 186 | This attribute determines if the service is single-threaded or | ||
237 | 187 | multi-threaded and whether or not xinetd accepts the connection or the server | ||
238 | 188 | program accepts the connection. If its value is \fIyes\fP, the service is | ||
239 | 189 | single-threaded; this means that \fBxinetd\fP will start the server and then | ||
240 | 190 | it will stop handling requests for the service until the server dies and that | ||
241 | 191 | the server software will accept the connection. If the attribute value is | ||
242 | 192 | \fIno\fP, the service is multi-threaded and \fBxinetd\fP will keep handling | ||
243 | 193 | new service requests and xinetd will accept the connection. It should be noted | ||
244 | 194 | that udp/dgram services normally expect the value to be yes since udp is not | ||
245 | 195 | connection oriented, while tcp/stream servers normally expect the value to be | ||
246 | 196 | no. | ||
247 | 197 | .TP | ||
248 | 198 | .B user | ||
249 | 199 | determines the uid for the server process. The user attribute can either | ||
250 | 200 | be numeric or a name. If a name is given (recommended), the user name must | ||
251 | 201 | exist in | ||
252 | 202 | .I /etc/passwd. | ||
253 | 203 | This attribute is ineffective if the effective user ID | ||
254 | 204 | of \fBxinetd\fP is not super-user. | ||
255 | 205 | .TP | ||
256 | 206 | .B group | ||
257 | 207 | determines the gid for the server process. The group attribute can either | ||
258 | 208 | be numeric or a name. If a name is given (recommended), the group name must | ||
259 | 209 | exist in | ||
260 | 210 | .I /etc/group. | ||
261 | 211 | If a group is not specified, the group | ||
262 | 212 | of \fIuser\fP will be used (from | ||
263 | 213 | .I /etc/passwd). | ||
264 | 214 | This attribute is ineffective if the effective user ID | ||
265 | 215 | of \fBxinetd\fP is not super-user and if the \fBgroups\fP attribute | ||
266 | 216 | is not set to 'yes'. | ||
267 | 217 | .TP | ||
268 | 218 | .B instances | ||
269 | 219 | determines the number of servers that can be simultaneously active | ||
270 | 220 | for a service (the default is no limit). The value of this | ||
271 | 221 | attribute can be either a number or | ||
272 | 222 | .B UNLIMITED | ||
273 | 223 | which means that there is no limit. | ||
274 | 224 | .TP | ||
275 | 225 | .B nice | ||
276 | 226 | determines the server priority. Its value is a (possibly negative) number; | ||
277 | 227 | check nice(3) for more information. | ||
278 | 228 | .TP | ||
279 | 229 | .B server | ||
280 | 230 | determines the program to execute for this service. | ||
281 | 231 | .TP | ||
282 | 232 | .B server_args | ||
283 | 233 | determines the arguments passed to the server. In contrast to \fBinetd\fP, | ||
284 | 234 | the server name should \fInot\fP be included in \fIserver_args\fP. | ||
285 | 235 | .TP | ||
286 | 236 | +.B libwrap | ||
287 | 237 | overrides the service name passed to libwrap (which defaults to the | ||
288 | 238 | server name, the first server_args component with NAMEINARGS, the id | ||
289 | 239 | for internal services and the service name for redirected services). | ||
290 | 240 | This attribute is only valid if xinetd has been configured with the libwrap | ||
291 | 241 | option. | ||
292 | 242 | .TP | ||
293 | 243 | .B only_from | ||
294 | 244 | determines the remote hosts to which the particular | ||
295 | 245 | service is available. | ||
296 | 246 | Its value is a list of IP addresses which can be specified in any | ||
297 | 247 | combination of the following ways: | ||
298 | 248 | .RS | ||
299 | 249 | .TP 5 | ||
300 | 250 | .B a) | ||
301 | 251 | a numeric address in the form of %d.%d.%d.%d. If the rightmost components are | ||
302 | 252 | 0, they are treated as wildcards | ||
303 | 253 | (for example, 128.138.12.0 matches all hosts on the 128.138.12 subnet). | ||
304 | 254 | 0.0.0.0 matches all Internet addresses. IPv6 hosts may be specified in the form of abcd:ef01::2345:6789. The rightmost rule for IPv4 addresses does not apply to IPv6 addresses. | ||
305 | 255 | .TP | ||
306 | 256 | .B b) | ||
307 | 257 | a factorized address in the form of %d.%d.%d.{%d,%d,...}. | ||
308 | 258 | There is no need for all 4 components (i.e. %d.%d.{%d,%d,...%d} is also ok). | ||
309 | 259 | However, the factorized part must be at the end of the address. This form does not work for IPv6 hosts. | ||
310 | 260 | .TP | ||
311 | 261 | .B c) | ||
312 | 262 | a network name (from | ||
313 | 263 | .I /etc/networks). This form does not work for IPv6 hosts. | ||
314 | 264 | .TP | ||
315 | 265 | .B d) | ||
316 | 266 | a host name. When a connection is made to xinetd, a reverse lookup is | ||
317 | 267 | performed, and the canonical name returned is compared to the specified host | ||
318 | 268 | name. You may also use domain names in the form of .domain.com. If the | ||
319 | 269 | reverse lookup of the client's IP is within .domain.com, a match occurs. | ||
320 | 270 | .TP | ||
321 | 271 | .B e) | ||
322 | 272 | an ip address/netmask range in the form of 1.2.3.4/32. IPv6 address/netmask | ||
323 | 273 | ranges in the form of 1234::/46 are also valid. | ||
324 | 274 | .RE | ||
325 | 275 | .TP | ||
326 | 276 | .B "" | ||
327 | 277 | Specifying this attribute | ||
328 | 278 | without a value makes the service available to nobody. | ||
329 | 279 | .TP | ||
330 | 280 | .B no_access | ||
331 | 281 | determines the remote hosts to which the particular | ||
332 | 282 | service is unavailable. Its value can be specified in the same way as the | ||
333 | 283 | value of the \fBonly_from\fP | ||
334 | 284 | attribute. These two attributes determine the location access control | ||
335 | 285 | enforced by \fBxinetd\fP. If none of the two is specified for a service, | ||
336 | 286 | the service is available to anyone. If both are specified for a service, | ||
337 | 287 | the one that is the better match for | ||
338 | 288 | the address of the remote host determines | ||
339 | 289 | if the service is available to that host (for example, if the | ||
340 | 290 | \fBonly_from\fP list contains 128.138.209.0 and the | ||
341 | 291 | \fBno_access\fP list contains 128.138.209.10 | ||
342 | 292 | then the host with the address 128.138.209.10 can not access the service). | ||
343 | 293 | .TP | ||
344 | 294 | .B access_times | ||
345 | 295 | determines the time intervals when the service is available. An interval | ||
346 | 296 | has the form \fIhour:min-hour:min\fP (connections | ||
347 | 297 | .I will | ||
348 | 298 | be accepted at the bounds of an interval). Hours can range from 0 to 23 and | ||
349 | 299 | minutes from 0 to 59. | ||
350 | 300 | .TP | ||
351 | 301 | .B log_type | ||
352 | 302 | determines where the service log output is sent. There are two formats: | ||
353 | 303 | .RS | ||
354 | 304 | .TP | ||
355 | 305 | .B SYSLOG " \fIsyslog_facility [syslog_level]\fP" | ||
356 | 306 | The log output is sent to syslog at the specified facility. Possible facility | ||
357 | 307 | names include: | ||
358 | 308 | .I daemon, | ||
359 | 309 | .I auth, | ||
360 | 310 | .I authpriv, | ||
361 | 311 | .I user, | ||
362 | 312 | .I mail, | ||
363 | 313 | .I lpr, | ||
364 | 314 | .I news, | ||
365 | 315 | .I uucp, | ||
366 | 316 | .I ftp | ||
367 | 317 | .I "local0-7." | ||
368 | 318 | Possible level names include: | ||
369 | 319 | .I emerg, | ||
370 | 320 | .I alert, | ||
371 | 321 | .I crit, | ||
372 | 322 | .I err, | ||
373 | 323 | .I warning, | ||
374 | 324 | .I notice, | ||
375 | 325 | .I info, | ||
376 | 326 | .I debug. | ||
377 | 327 | If a level is not present, the messages will be recorded at the | ||
378 | 328 | .I info | ||
379 | 329 | level. | ||
380 | 330 | .TP | ||
381 | 331 | .B FILE " \fIfile [soft_limit [hard_limit]]\fP" | ||
382 | 332 | The log output is appended to \fIfile\fP which will be created if it does | ||
383 | 333 | not exist. Two limits on the size of the log file can be optionally specified. | ||
384 | 334 | The first limit is a soft one; | ||
385 | 335 | .B xinetd | ||
386 | 336 | will log a message the first time this limit is exceeded (if | ||
387 | 337 | .B xinetd | ||
388 | 338 | logs to syslog, the message will be sent at the | ||
389 | 339 | .I alert | ||
390 | 340 | priority level). | ||
391 | 341 | The second limit is a hard limit; | ||
392 | 342 | .B xinetd | ||
393 | 343 | will stop logging for the affected service (if the log file is a | ||
394 | 344 | common log file, then more than one service may be affected) | ||
395 | 345 | and will log a message about this (if | ||
396 | 346 | .B xinetd | ||
397 | 347 | logs to syslog, the message will be sent at the | ||
398 | 348 | .I alert | ||
399 | 349 | priority level). | ||
400 | 350 | If a hard limit is not specified, it defaults to the soft limit | ||
401 | 351 | increased by 1% but the extra size must be within the parameters | ||
402 | 352 | .SM LOG_EXTRA_MIN | ||
403 | 353 | and | ||
404 | 354 | .SM LOG_EXTRA_MAX | ||
405 | 355 | which default to 5K and 20K respectively (these constants are defined in | ||
406 | 356 | \fIxconfig.h\fP). | ||
407 | 357 | .RE | ||
408 | 358 | .TP | ||
409 | 359 | .B log_on_success | ||
410 | 360 | determines what information is logged when a server is started and when | ||
411 | 361 | that server exits (the service id is always included in the log entry). | ||
412 | 362 | Any combination of the following values may be specified: | ||
413 | 363 | .RS | ||
414 | 364 | .TP 12 | ||
415 | 365 | .B PID | ||
416 | 366 | logs the server process id (if the service is implemented by \fBxinetd\fP | ||
417 | 367 | without forking another process the logged process id will be 0) | ||
418 | 368 | .TP | ||
419 | 369 | .B HOST | ||
420 | 370 | logs the remote host address | ||
421 | 371 | .TP | ||
422 | 372 | .B USERID | ||
423 | 373 | logs the user id of the remote user using the RFC 1413 identification protocol. | ||
424 | 374 | This option is available only for multi-threaded stream services. | ||
425 | 375 | .TP | ||
426 | 376 | .B EXIT | ||
427 | 377 | logs the fact that a server exited along with the exit status or the | ||
428 | 378 | termination signal | ||
429 | 379 | (the process id is also logged if the | ||
430 | 380 | .B PID | ||
431 | 381 | option is used) | ||
432 | 382 | .TP | ||
433 | 383 | .B DURATION | ||
434 | 384 | logs the duration of a service session | ||
435 | 385 | .TP | ||
436 | 386 | .B TRAFFIC | ||
437 | 387 | logs the total bytes in and out for a redirected service. | ||
438 | 388 | .RE | ||
439 | 389 | .TP | ||
440 | 390 | .B log_on_failure | ||
441 | 391 | determines what information is logged when a server cannot be started | ||
442 | 392 | (either because of a lack of resources or because of access control | ||
443 | 393 | restrictions). The service id is always included in the log entry along | ||
444 | 394 | with the reason for failure. | ||
445 | 395 | Any combination of the following values may be specified: | ||
446 | 396 | .RS | ||
447 | 397 | .TP 12 | ||
448 | 398 | .B HOST | ||
449 | 399 | logs the remote host address. | ||
450 | 400 | .TP | ||
451 | 401 | .B USERID | ||
452 | 402 | logs the user id of the remote user using the RFC 1413 identification protocol. | ||
453 | 403 | This option is available only for multi-threaded stream services. | ||
454 | 404 | .TP | ||
455 | 405 | .B ATTEMPT | ||
456 | 406 | logs the fact that a failed attempt was made | ||
457 | 407 | (this option is implied by all others). | ||
458 | 408 | .RE | ||
459 | 409 | .TP | ||
460 | 410 | .B rpc_version | ||
461 | 411 | determines the RPC version for a RPC service. The version can be | ||
462 | 412 | a single number or a range in the form \fInumber\fP-\fInumber\fP. | ||
463 | 413 | .TP | ||
464 | 414 | .B rpc_number | ||
465 | 415 | determines the number for an | ||
466 | 416 | .I UNLISTED | ||
467 | 417 | RPC service (this attribute is ignored if the service is not unlisted). | ||
468 | 418 | .TP | ||
469 | 419 | .B env | ||
470 | 420 | The value of this attribute is a list of strings of the form 'name=value'. | ||
471 | 421 | These strings will be added to the environment before | ||
472 | 422 | starting a server (therefore the server's environment will include | ||
473 | 423 | \fBxinetd\fP's environment plus the specified strings). | ||
474 | 424 | .TP | ||
475 | 425 | .B passenv | ||
476 | 426 | The value of this attribute is a list of environment variables from | ||
477 | 427 | \fBxinetd\fP's environment that will be passed to the server. | ||
478 | 428 | An empty list implies passing no variables to the server | ||
479 | 429 | except for those explicitly defined using the | ||
480 | 430 | .I env | ||
481 | 431 | attribute. | ||
482 | 432 | (notice that you can use this attribute in conjunction with the | ||
483 | 433 | .I env | ||
484 | 434 | attribute to specify exactly what environment will be passed to the server). | ||
485 | 435 | .TP | ||
486 | 436 | .B port | ||
487 | 437 | determines the service port. If this attribute is specified for a service | ||
488 | 438 | listed in | ||
489 | 439 | .I /etc/services, | ||
490 | 440 | it must be equal to the port number listed in that file. | ||
491 | 441 | .TP | ||
492 | 442 | .B redirect | ||
493 | 443 | Allows a tcp service to be redirected to another host. When xinetd receives | ||
494 | 444 | a tcp connection on this port it spawns a process that establishes a | ||
495 | 445 | connection to the host and port number specified, and forwards all data | ||
496 | 446 | between the two hosts. This option is useful when your internal machines | ||
497 | 447 | are not visible to the outside world. Syntax is: redirect = (ip address) | ||
498 | 448 | (port). You can also use a hostname instead of the IP address in this | ||
499 | 449 | field. The hostname lookup is performed only once, when xinetd is | ||
500 | 450 | started, and the first IP address returned is the one that is used | ||
501 | 451 | until xinetd is restarted. | ||
502 | 452 | The "server" attribute is not required when this option is specified. If | ||
503 | 453 | the "server" attribute is specified, this attribute takes priority. | ||
504 | 454 | .TP | ||
505 | 455 | .B bind | ||
506 | 456 | Allows a service to be bound to a specific interface on the machine. | ||
507 | 457 | This means you can have a telnet server listening on a local, secured | ||
508 | 458 | interface, and not on the external interface. Or one port on one interface | ||
509 | 459 | can do something, while the same port on a different interface can do | ||
510 | 460 | something completely different. Syntax: bind = (ip address of interface). | ||
511 | 461 | .TP | ||
512 | 462 | .B interface | ||
513 | 463 | Synonym for bind. | ||
514 | 464 | .TP | ||
515 | 465 | .B banner | ||
516 | 466 | Takes the name of a file to be splatted at the remote host when a | ||
517 | 467 | connection to that service is established. This banner is printed | ||
518 | 468 | regardless of access control. It should *always* be printed when | ||
519 | 469 | a connection has been made. \fBxinetd\fP outputs the file as-is, | ||
520 | 470 | so you must ensure the file is correctly formatted for the service's | ||
521 | 471 | protocol. In paticular, if the protocol requires CR-LF pairs for line | ||
522 | 472 | termination, you must supply them. | ||
523 | 473 | .TP | ||
524 | 474 | .B banner_success | ||
525 | 475 | Takes the name of a file to be splatted at the remote host when a | ||
526 | 476 | connection to that service is granted. This banner is printed | ||
527 | 477 | as soon as access is granted for the service. \fBxinetd\fP outputs the | ||
528 | 478 | file as-is, so you must ensure the file is correctly formatted for | ||
529 | 479 | the service's protocol. In paticular, if the protocol requires CR-LF | ||
530 | 480 | pairs for line termination, you must supply them. | ||
531 | 481 | .TP | ||
532 | 482 | .B banner_fail | ||
533 | 483 | Takes the name of a file to be splatted at the remote host when a | ||
534 | 484 | connection to that service is denied. This banner is printed | ||
535 | 485 | immediately upon denial of access. This is useful for informing | ||
536 | 486 | your users that they are doing something bad and they shouldn't be | ||
537 | 487 | doing it anymore. \fBxinetd\fP outputs the file as-is, | ||
538 | 488 | so you must ensure the file is correctly formatted for the service's | ||
539 | 489 | protocol. In paticular, if the protocol requires CR-LF pairs for line | ||
540 | 490 | termination, you must supply them. | ||
541 | 491 | .TP | ||
542 | 492 | .B per_source | ||
543 | 493 | Takes an integer or "UNLIMITED" as an argument. This specifies the | ||
544 | 494 | maximum instances of this service per source IP address. This can | ||
545 | 495 | also be specified in the defaults section. | ||
546 | 496 | .TP | ||
547 | 497 | .B cps | ||
548 | 498 | Limits the rate of incoming connections. Takes two arguments. | ||
549 | 499 | The first argument is the number of connections per second to handle. | ||
550 | 500 | If the rate of incoming connections is higher than this, the service | ||
551 | 501 | will be temporarily disabled. The second argument is the number of | ||
552 | 502 | seconds to wait before re-enabling the service after it has been disabled. | ||
553 | 503 | The default for this setting is 50 incoming connections and the interval | ||
554 | 504 | is 10 seconds. | ||
555 | 505 | .TP | ||
556 | 506 | .B max_load | ||
557 | 507 | Takes a floating point value as the load at which the service will | ||
558 | 508 | stop accepting connections. For example: 2 or 2.5. The service | ||
559 | 509 | will stop accepting connections at this load. This is the one minute | ||
560 | 510 | load average. This is an OS dependent feature, and currently only | ||
561 | 511 | Linux, Solaris, and FreeBSD are supported for this. This feature is | ||
562 | 512 | only avaliable if xinetd was configured with the -with-loadavg option. | ||
563 | 513 | .TP | ||
564 | 514 | .B groups | ||
565 | 515 | Takes either "yes" or "no". If the groups attribute is set to | ||
566 | 516 | "yes", then the server is executed with access to the groups that the | ||
567 | 517 | server's effective UID has access to. Alternatively, if the \fBgroup\fP | ||
568 | 518 | attribute is set, the server is executed with access to the groups | ||
569 | 519 | specified. If the groups attribute is set | ||
570 | 520 | to "no", then the server runs with no supplementary groups. This | ||
571 | 521 | attribute must be set to "yes" for many BSD systems. This attribute | ||
572 | 522 | can be set in the defaults section as well. | ||
573 | 523 | .TP | ||
574 | 524 | .B mdns | ||
575 | 525 | Takes either "yes" or "no". On systems that support mdns registration | ||
576 | 526 | of services (currently only Mac OS X), this will enable or disable | ||
577 | 527 | registration of the service. This defaults to "yes". | ||
578 | 528 | .TP | ||
579 | 529 | .B umask | ||
580 | 530 | Sets the inherited umask for the service. Expects an octal value. | ||
581 | 531 | This option may be set in the "defaults" section to set a umask | ||
582 | 532 | for all services. xinetd sets its own umask to the previous umask | ||
583 | 533 | OR'd with 022. This is the umask that will be inherited by all | ||
584 | 534 | child processes if the umask option is not used. | ||
585 | 535 | .TP | ||
586 | 536 | .B enabled | ||
587 | 537 | Takes a list of service ID's to enable. This will enable only the | ||
588 | 538 | services listed as arguments to this attribute; the rest will be | ||
589 | 539 | disabled. If you have 2 ftp services, you will need to list both of | ||
590 | 540 | their ID's and not just ftp. (ftp is the service name, not the ID. It | ||
591 | 541 | might accidentally be the ID, but you better check.) Note that the | ||
592 | 542 | service "disable" attribute and "DISABLE" flag can prevent a service | ||
593 | 543 | from being enabled despite being listed in this attribute. | ||
594 | 544 | .TP | ||
595 | 545 | .B include | ||
596 | 546 | Takes a filename in the form of "include /etc/xinetd/service". | ||
597 | 547 | The file is then parsed as a new configuration file. It is not | ||
598 | 548 | the same thing as pasting the file into xinetd.conf where the | ||
599 | 549 | include directive is given. The included file must be in the | ||
600 | 550 | same form as xinetd.conf. This may not be specified from within | ||
601 | 551 | a service. It must be specified outside a service declaration. | ||
602 | 552 | .TP | ||
603 | 553 | .B includedir | ||
604 | 554 | Takes a directory name in the form of "includedir /etc/xinetd.d". | ||
605 | 555 | Every file inside that directory, excluding files with names containing | ||
606 | 556 | a dot ('.') or ending with a tilde ('~'), will be parsed as xinetd | ||
607 | 557 | configuration files. The files will be parsed in alphabetical order | ||
608 | 558 | according to the C locale. This allows you to specify services one | ||
609 | 559 | per file within a directory. The | ||
610 | 560 | .B includedir | ||
611 | 561 | directive may not be specified from within a service declaration. | ||
612 | 562 | .TP | ||
613 | 563 | .B rlimit_as | ||
614 | 564 | Sets the Address Space resource limit for the service. One parameter | ||
615 | 565 | is required, which is either a positive integer representing the number | ||
616 | 566 | of bytes to set the limit to (K or M may be used to specify | ||
617 | 567 | kilobytes/megabytes) or "UNLIMITED". Due to the way Linux's libc malloc | ||
618 | 568 | is implemented, it is more useful to set this limit than rlimit_data, | ||
619 | 569 | rlimit_rss and rlimit_stack. This resource limit is only implemented on | ||
620 | 570 | Linux systems. | ||
621 | 571 | .TP | ||
622 | 572 | .B rlimit_cpu | ||
623 | 573 | Sets the maximum number of CPU seconds that the service may use. | ||
624 | 574 | One parameter is required, which is either a positive integer representing | ||
625 | 575 | the number of CPU seconds limit to, or "UNLIMITED". | ||
626 | 576 | .TP | ||
627 | 577 | .B rlimit_data | ||
628 | 578 | Sets the maximum data size resource limit for the service. | ||
629 | 579 | One parameter is required, which is either a positive integer representing | ||
630 | 580 | the number of bytes or "UNLIMITED". | ||
631 | 581 | .TP | ||
632 | 582 | .B rlimit_rss | ||
633 | 583 | Sets the maximum resident set size limit for the service. Setting this | ||
634 | 584 | value low will make the process a likely candidate for swapping out to | ||
635 | 585 | disk when memory is low. | ||
636 | 586 | One parameter is required, which is either a positive integer representing | ||
637 | 587 | the number of bytes or "UNLIMITED". | ||
638 | 588 | .TP | ||
639 | 589 | .B rlimit_stack | ||
640 | 590 | Set the maximum stack size limit for the service. | ||
641 | 591 | One parameter is required, which is either a positive integer representing | ||
642 | 592 | the number of bytes or "UNLIMITED". | ||
643 | 593 | .TP | ||
644 | 594 | .B deny_time | ||
645 | 595 | Sets the time span that access to all services on all IP addresses are | ||
646 | 596 | denied to someone that sets off the SENSOR. The unit of time is in minutes. | ||
647 | 597 | Valid options are: FOREVER, NEVER, and a numeric value. FOREVER causes | ||
648 | 598 | the IP address not to be purged until xinetd is restarted. NEVER has the | ||
649 | 599 | effect of just logging the offending IP address. A typical time value would | ||
650 | 600 | be 60 minutes. This should stop most DOS attacks while allowing IP addresses | ||
651 | 601 | that come from a pool to be recycled for legitimate purposes. This option | ||
652 | 602 | must be used in conjunction with the SENSOR flag. | ||
653 | 603 | .LP | ||
654 | 604 | You don't need to specify all of the above attributes for each service. | ||
655 | 605 | The necessary attributes for a service are: | ||
656 | 606 | .sp 1 | ||
657 | 607 | .PD .1v | ||
658 | 608 | .RS | ||
659 | 609 | .TP 18 | ||
660 | 610 | .B socket_type | ||
661 | 611 | .TP | ||
662 | 612 | .B user | ||
663 | 613 | (non-\fIinternal\fP services only) | ||
664 | 614 | .TP | ||
665 | 615 | .B server | ||
666 | 616 | (non-\fIinternal\fP services only) | ||
667 | 617 | .TP | ||
668 | 618 | .B wait | ||
669 | 619 | .TP | ||
670 | 620 | .B protocol | ||
671 | 621 | (\fIRPC\fP and \fIunlisted\fP services only) | ||
672 | 622 | .TP | ||
673 | 623 | .B rpc_version | ||
674 | 624 | (\fIRPC\fP services only) | ||
675 | 625 | .TP | ||
676 | 626 | .B rpc_number | ||
677 | 627 | (\fIunlisted\fP RPC services only) | ||
678 | 628 | .TP | ||
679 | 629 | .B port | ||
680 | 630 | (\fIunlisted\fP non-RPC services only) | ||
681 | 631 | .RE | ||
682 | 632 | .PD | ||
683 | 633 | .LP | ||
684 | 634 | The following attributes support all assignment operators: | ||
685 | 635 | .sp 1 | ||
686 | 636 | .PD .1v | ||
687 | 637 | .RS | ||
688 | 638 | .TP 18 | ||
689 | 639 | .B only_from | ||
690 | 640 | .TP | ||
691 | 641 | .B no_access | ||
692 | 642 | .TP | ||
693 | 643 | .B log_on_success | ||
694 | 644 | .TP | ||
695 | 645 | .B log_on_failure | ||
696 | 646 | .TP | ||
697 | 647 | .B passenv | ||
698 | 648 | .TP | ||
699 | 649 | .B env | ||
700 | 650 | (does not support the | ||
701 | 651 | .B '-=' | ||
702 | 652 | operator) | ||
703 | 653 | .RE | ||
704 | 654 | .PD | ||
705 | 655 | .LP | ||
706 | 656 | These attributes can also appear more than once in a service entry. | ||
707 | 657 | The remaining attributes support only the | ||
708 | 658 | .B '=' | ||
709 | 659 | operator and can appear at most once in a service entry. | ||
710 | 660 | .LP | ||
711 | 661 | The configuration file may also contain a single defaults entry | ||
712 | 662 | that has the form | ||
713 | 663 | .LP | ||
714 | 664 | .RS | ||
715 | 665 | .nf | ||
716 | 666 | .ft B | ||
717 | 667 | defaults | ||
718 | 668 | { | ||
719 | 669 | .RS | ||
720 | 670 | .ft B | ||
721 | 671 | <attribute> = <value> <value> ... | ||
722 | 672 | .I "..." | ||
723 | 673 | .RE | ||
724 | 674 | .ft B | ||
725 | 675 | } | ||
726 | 676 | .ft R | ||
727 | 677 | .fi | ||
728 | 678 | .RE | ||
729 | 679 | .LP | ||
730 | 680 | This entry provides default attribute values for service entries that | ||
731 | 681 | don't specify those attributes. Possible default attributes: | ||
732 | 682 | .sp 1 | ||
733 | 683 | .PD .1v | ||
734 | 684 | .RS | ||
735 | 685 | .TP 18 | ||
736 | 686 | .B log_type | ||
737 | 687 | (cumulative effect) | ||
738 | 688 | .TP | ||
739 | 689 | .B bind | ||
740 | 690 | .TP | ||
741 | 691 | .B per_source | ||
742 | 692 | .TP | ||
743 | 693 | .B umask | ||
744 | 694 | .TP | ||
745 | 695 | .B log_on_success | ||
746 | 696 | (cumulative effect) | ||
747 | 697 | .TP | ||
748 | 698 | .B log_on_failure | ||
749 | 699 | (cumulative effect) | ||
750 | 700 | .TP | ||
751 | 701 | .B only_from | ||
752 | 702 | (cumulative effect) | ||
753 | 703 | .TP | ||
754 | 704 | .B no_access | ||
755 | 705 | (cumulative effect) | ||
756 | 706 | .TP | ||
757 | 707 | .B passenv | ||
758 | 708 | (cumulative effect) | ||
759 | 709 | .TP | ||
760 | 710 | .B instances | ||
761 | 711 | .TP | ||
762 | 712 | .B disabled | ||
763 | 713 | (cumulative effect) | ||
764 | 714 | .TP | ||
765 | 715 | .B enabled | ||
766 | 716 | (cumulative effect) | ||
767 | 717 | .TP | ||
768 | 718 | .B banner | ||
769 | 719 | .TP | ||
770 | 720 | .B banner_success | ||
771 | 721 | .TP | ||
772 | 722 | .B banner_fail | ||
773 | 723 | .TP | ||
774 | 724 | .B per_source | ||
775 | 725 | .TP | ||
776 | 726 | .B groups | ||
777 | 727 | .TP | ||
778 | 728 | .B cps | ||
779 | 729 | .TP | ||
780 | 730 | .B max_load | ||
781 | 731 | .TP | ||
782 | 732 | .RE | ||
783 | 733 | .PD | ||
784 | 734 | .LP | ||
785 | 735 | Attributes with a cumulative effect can be specified multiple times | ||
786 | 736 | with the values specified each time accumulating (i.e. '=' does | ||
787 | 737 | the same thing as '+='). | ||
788 | 738 | With the exception of | ||
789 | 739 | .I disabled | ||
790 | 740 | they all have the same meaning as if they were specified in a service entry. | ||
791 | 741 | .I disabled | ||
792 | 742 | determines services that are disabled even if they have entries in | ||
793 | 743 | the configuration file. This allows for quick reconfiguration by | ||
794 | 744 | specifying disabled services with the | ||
795 | 745 | .I disabled | ||
796 | 746 | attribute instead of commenting them out. | ||
797 | 747 | The value of this attribute is a list of space separated service ids. | ||
798 | 748 | .I enabled | ||
799 | 749 | has the same properties as disabled. The difference being that | ||
800 | 750 | .I enabled | ||
801 | 751 | is a list of which services are to be enabled. If | ||
802 | 752 | .I enabled | ||
803 | 753 | is specified, only the services specified are available. If | ||
804 | 754 | .I enabled | ||
805 | 755 | is not specified, all services are assumed to be enabled, | ||
806 | 756 | except those listed in | ||
807 | 757 | .I disabled. | ||
808 | 758 | |||
809 | 759 | .\" *********************** INTERNAL SERVICES **************************** | ||
810 | 760 | .SH "INTERNAL SERVICES" | ||
811 | 761 | .LP | ||
812 | 762 | \fBxinetd\fP provides the following services internally (both | ||
813 | 763 | stream and datagram based): | ||
814 | 764 | .I echo, | ||
815 | 765 | .I time, | ||
816 | 766 | .I daytime, | ||
817 | 767 | .I chargen, | ||
818 | 768 | and | ||
819 | 769 | .I discard. | ||
820 | 770 | These services are under the same access restrictions as all other | ||
821 | 771 | services except for the ones that don't require \fBxinetd\fP to fork | ||
822 | 772 | another process for them. Those ones (\fItime\fP, \fIdaytime\fP, | ||
823 | 773 | and the datagram-based \fIecho\fP, \fIchargen\fP, and \fIdiscard\fP) | ||
824 | 774 | have no limitation in the number of | ||
825 | 775 | .B instances. | ||
826 | 776 | .LP | ||
827 | 777 | .\" *********************** TCPMUX Services **************************** | ||
828 | 778 | .SH "TCPMUX Services" | ||
829 | 779 | .LP | ||
830 | 780 | \fBxinetd\fP supports TCPMUX services that conform to RFC 1078. These services | ||
831 | 781 | may not have a well-known port associated with them, and can be accessed via | ||
832 | 782 | the TCPMUX well-known port. | ||
833 | 783 | .LP | ||
834 | 784 | For each service that is to be accessed via TCPMUX, a service entry in | ||
835 | 785 | \fB/etc/xinetd.conf\fP or in a configuration file in an \fBincludedir\fP | ||
836 | 786 | directory must exist. | ||
837 | 787 | .LP | ||
838 | 788 | The \fIservice_name\fP field (as defined above for each service in any | ||
839 | 789 | \fBxinetd\fP | ||
840 | 790 | configuration file) must be identical to the string that is passed (according | ||
841 | 791 | to RFC 1078 protocol) to \fBxinetd\fP when the remote service requestor first | ||
842 | 792 | makes the connection on the TCPMUX well-known port. Private protocols should | ||
843 | 793 | use a service name that has a high probability of being unique. One way is to | ||
844 | 794 | prepend the service name with some form of organization ID. | ||
845 | 795 | .LP | ||
846 | 796 | The \fItype\fP field can be either \fBTCPMUX\fP or \fBTCPMUXPLUS\fP. If the | ||
847 | 797 | type is \fBTCPMUXPLUS\fP, \fBxinetd\fP will handle the initial protocol | ||
848 | 798 | handshake (as defined in RFC 1078) with the calling process before initiating | ||
849 | 799 | the service. If the type is \fBTCPMUX\fP, the server that is started is | ||
850 | 800 | responsible for performing the handshake. | ||
851 | 801 | .LP | ||
852 | 802 | The \fItype\fP field should also include \fBUNLISTED\fP if the service is | ||
853 | 803 | not listed in a standard system file | ||
854 | 804 | (like | ||
855 | 805 | .I /etc/rpc | ||
856 | 806 | for RPC services, or | ||
857 | 807 | .I /etc/services | ||
858 | 808 | for non-RPC services). | ||
859 | 809 | .LP | ||
860 | 810 | The \fIsocket_type\fP for these services must be \fBstream\fP, and the | ||
861 | 811 | \fIprotocol\fP must be \fBtcp\fP. | ||
862 | 812 | .LP | ||
863 | 813 | Following is a sample TCPMUX service configuration: | ||
864 | 814 | .PD .1v | ||
865 | 815 | .RS | ||
866 | 816 | .nf | ||
867 | 817 | |||
868 | 818 | service myorg_server | ||
869 | 819 | { | ||
870 | 820 | .RS | ||
871 | 821 | .IP disable 20 | ||
872 | 822 | = no | ||
873 | 823 | .IP type | ||
874 | 824 | = TCPMUX | ||
875 | 825 | .IP socket_type | ||
876 | 826 | = stream | ||
877 | 827 | .IP protocol | ||
878 | 828 | = tcp | ||
879 | 829 | .IP wait | ||
880 | 830 | = no | ||
881 | 831 | .IP user | ||
882 | 832 | = root | ||
883 | 833 | .IP server | ||
884 | 834 | = /usr/etc/my_server_exec | ||
885 | 835 | .RE | ||
886 | 836 | } | ||
887 | 837 | .fi | ||
888 | 838 | .RE | ||
889 | 839 | .PD | ||
890 | 840 | .LP | ||
891 | 841 | Besides a service entry for each service that can be accessed | ||
892 | 842 | via the TCPMUX well-known port, a service entry for TCPMUX itself | ||
893 | 843 | must also be included in the \fBxinetd\fP configuration. Consider the following | ||
894 | 844 | sample: | ||
895 | 845 | .PD .1v | ||
896 | 846 | .RS | ||
897 | 847 | .nf | ||
898 | 848 | |||
899 | 849 | service tcpmux | ||
900 | 850 | { | ||
901 | 851 | .RS | ||
902 | 852 | .IP type 20 | ||
903 | 853 | = INTERNAL | ||
904 | 854 | .IP id | ||
905 | 855 | = tcpmux | ||
906 | 856 | .IP socket_type | ||
907 | 857 | = stream | ||
908 | 858 | .IP protocol | ||
909 | 859 | = tcp | ||
910 | 860 | .IP user | ||
911 | 861 | = root | ||
912 | 862 | .IP wait | ||
913 | 863 | = no | ||
914 | 864 | .RE | ||
915 | 865 | } | ||
916 | 866 | .fi | ||
917 | 867 | .RE | ||
918 | 868 | .PD | ||
919 | 869 | |||
920 | 870 | |||
921 | 871 | |||
922 | 872 | .\" *********************** NOTES **************************** | ||
923 | 873 | .SH NOTES | ||
924 | 874 | .IP 1. 4 | ||
925 | 875 | The following service attributes \fIcannot\fP be changed on reconfiguration: | ||
926 | 876 | .B socket_type, | ||
927 | 877 | .B wait, | ||
928 | 878 | .B protocol, | ||
929 | 879 | .B type. | ||
930 | 880 | .IP 2. | ||
931 | 881 | When the attributes | ||
932 | 882 | .I only_from | ||
933 | 883 | and | ||
934 | 884 | .I no_access | ||
935 | 885 | are not specified for a service (either directly or via \fIdefaults\fP) | ||
936 | 886 | the address check is considered successful (i.e. access will not be | ||
937 | 887 | denied). | ||
938 | 888 | .IP 3. | ||
939 | 889 | The address check is based on the IP address of the remote host and | ||
940 | 890 | not on its domain address. We do this so that we can avoid | ||
941 | 891 | remote name lookups which may take a long time (since | ||
942 | 892 | .B xinetd | ||
943 | 893 | is single-threaded, a name lookup will prevent the daemon from | ||
944 | 894 | accepting any other requests until the lookup is resolved). | ||
945 | 895 | The down side of this scheme is that if the IP address of a remote | ||
946 | 896 | host changes, then access to that host may be denied until | ||
947 | 897 | .B xinetd | ||
948 | 898 | is reconfigured. | ||
949 | 899 | Whether access is actually denied or not will depend on whether the | ||
950 | 900 | new host IP address is among those allowed access. For example, if | ||
951 | 901 | the IP address of a host changes from 1.2.3.4 to 1.2.3.5 and | ||
952 | 902 | only_from is specified as 1.2.3.0 then access will not be denied. | ||
953 | 903 | .IP 4. | ||
954 | 904 | If the | ||
955 | 905 | .B USERID | ||
956 | 906 | log option is specified and the remote host either does not run an | ||
957 | 907 | identification server or the server sends back a bad reply, | ||
958 | 908 | access will not be denied unless the | ||
959 | 909 | .I IDONLY | ||
960 | 910 | service flag is used. | ||
961 | 911 | .IP 5. | ||
962 | 912 | Interception works by forking a process which acts as a filter | ||
963 | 913 | between the remote host(s) and the local server. | ||
964 | 914 | This obviously has a performance impact so | ||
965 | 915 | it is up to you to make the compromise between security and performance | ||
966 | 916 | for each service. | ||
967 | 917 | The following tables show the overhead of interception. | ||
968 | 918 | The first table shows the time overhead-per-datagram for a UDP-based service | ||
969 | 919 | using various datagram sizes. | ||
970 | 920 | For TCP-based services we measured the bandwidth reduction | ||
971 | 921 | because of interception while sending | ||
972 | 922 | a certain amount of data from client to server (the time overhead should | ||
973 | 923 | the same as for UDP-based services but it is "paid" only by the first | ||
974 | 924 | packet of a continuous data transmission). | ||
975 | 925 | The amount of data is given | ||
976 | 926 | in the table as \fIsystem_calls\fPx\fIdata_sent_per_call\fP, i.e. | ||
977 | 927 | each | ||
978 | 928 | .I "send(2)" | ||
979 | 929 | system call transferred so many bytes of data. | ||
980 | 930 | The bandwidth reduction is given in terms of bytes per second and as | ||
981 | 931 | a percentage of the bandwidth when interception is not performed. | ||
982 | 932 | All measurements were done on a SparcStation IPC running SunOS 4.1. | ||
983 | 933 | .sp 1 | ||
984 | 934 | .RS | ||
985 | 935 | .RS | ||
986 | 936 | .PD .1v | ||
987 | 937 | .TP 25 | ||
988 | 938 | Datagram size (bytes) | ||
989 | 939 | Latency (msec) | ||
990 | 940 | .TP | ||
991 | 941 | --------------------- | ||
992 | 942 | -------------- | ||
993 | 943 | .TP | ||
994 | 944 | 64 | ||
995 | 945 | 1.19 | ||
996 | 946 | .TP | ||
997 | 947 | 256 | ||
998 | 948 | 1.51 | ||
999 | 949 | .TP | ||
1000 | 950 | 1024 | ||
1001 | 951 | 1.51 | ||
1002 | 952 | .TP | ||
1003 | 953 | 4096 | ||
1004 | 954 | 3.58 | ||
1005 | 955 | .sp 2 | ||
1006 | 956 | .TP | ||
1007 | 957 | Bytes sent | ||
1008 | 958 | Bandwidth reduction | ||
1009 | 959 | .TP | ||
1010 | 960 | ---------- | ||
1011 | 961 | ------------------- | ||
1012 | 962 | .TP | ||
1013 | 963 | 10000x64 | ||
1014 | 964 | 941 (1.2%) | ||
1015 | 965 | .TP | ||
1016 | 966 | 10000x256 | ||
1017 | 967 | 4,231 (1.8%) | ||
1018 | 968 | .TP | ||
1019 | 969 | 10000x1024 | ||
1020 | 970 | 319,300 (39.5%) | ||
1021 | 971 | .TP | ||
1022 | 972 | 10000x4096 | ||
1023 | 973 | 824,461 (62.1%) | ||
1024 | 974 | .RE | ||
1025 | 975 | .RE | ||
1026 | 976 | .sp 1 | ||
1027 | 977 | .\" *********************** EXAMPLE **************************** | ||
1028 | 978 | .SH EXAMPLE | ||
1029 | 979 | .LP | ||
1030 | 980 | .PD .1v | ||
1031 | 981 | .RS | ||
1032 | 982 | .nf | ||
1033 | 983 | # | ||
1034 | 984 | # Sample configuration file for xinetd | ||
1035 | 985 | # | ||
1036 | 986 | |||
1037 | 987 | defaults | ||
1038 | 988 | { | ||
1039 | 989 | .RS | ||
1040 | 990 | .IP log_type 20 | ||
1041 | 991 | = FILE /var/log/servicelog | ||
1042 | 992 | .IP log_on_success | ||
1043 | 993 | = PID | ||
1044 | 994 | .IP log_on_failure | ||
1045 | 995 | = HOST | ||
1046 | 996 | .IP only_from | ||
1047 | 997 | = 128.138.193.0 128.138.204.0 | ||
1048 | 998 | .IP only_from | ||
1049 | 999 | = 128.138.252.1 | ||
1050 | 1000 | .IP instances | ||
1051 | 1001 | = 10 | ||
1052 | 1002 | .IP disabled | ||
1053 | 1003 | = rstatd | ||
1054 | 1004 | .RE | ||
1055 | 1005 | } | ||
1056 | 1006 | |||
1057 | 1007 | # | ||
1058 | 1008 | # Note 1: the protocol attribute is not required | ||
1059 | 1009 | # Note 2: the instances attribute overrides the default | ||
1060 | 1010 | # | ||
1061 | 1011 | service login | ||
1062 | 1012 | { | ||
1063 | 1013 | .RS | ||
1064 | 1014 | .IP socket_type 20 | ||
1065 | 1015 | = stream | ||
1066 | 1016 | .IP protocol | ||
1067 | 1017 | = tcp | ||
1068 | 1018 | .IP wait | ||
1069 | 1019 | = no | ||
1070 | 1020 | .IP user | ||
1071 | 1021 | = root | ||
1072 | 1022 | .IP server | ||
1073 | 1023 | = /usr/etc/in.rlogind | ||
1074 | 1024 | .IP instances | ||
1075 | 1025 | = UNLIMITED | ||
1076 | 1026 | .RE | ||
1077 | 1027 | } | ||
1078 | 1028 | |||
1079 | 1029 | # | ||
1080 | 1030 | # Note 1: the instances attribute overrides the default | ||
1081 | 1031 | # Note 2: the log_on_success flags are augmented | ||
1082 | 1032 | # | ||
1083 | 1033 | service shell | ||
1084 | 1034 | { | ||
1085 | 1035 | .RS | ||
1086 | 1036 | .IP socket_type 20 | ||
1087 | 1037 | = stream | ||
1088 | 1038 | .IP wait | ||
1089 | 1039 | = no | ||
1090 | 1040 | .IP user | ||
1091 | 1041 | = root | ||
1092 | 1042 | .IP instances | ||
1093 | 1043 | = UNLIMITED | ||
1094 | 1044 | .IP server | ||
1095 | 1045 | = /usr/etc/in.rshd | ||
1096 | 1046 | .IP log_on_success | ||
1097 | 1047 | += HOST | ||
1098 | 1048 | .RE | ||
1099 | 1049 | } | ||
1100 | 1050 | |||
1101 | 1051 | service ftp | ||
1102 | 1052 | { | ||
1103 | 1053 | .RS | ||
1104 | 1054 | .IP socket_type 20 | ||
1105 | 1055 | = stream | ||
1106 | 1056 | .IP wait | ||
1107 | 1057 | = no | ||
1108 | 1058 | .IP nice | ||
1109 | 1059 | = 10 | ||
1110 | 1060 | .IP user | ||
1111 | 1061 | = root | ||
1112 | 1062 | .IP server | ||
1113 | 1063 | = /usr/etc/in.ftpd | ||
1114 | 1064 | .IP server_args | ||
1115 | 1065 | = -l | ||
1116 | 1066 | .IP instances | ||
1117 | 1067 | = 4 | ||
1118 | 1068 | .IP log_on_success | ||
1119 | 1069 | += DURATION HOST USERID | ||
1120 | 1070 | .IP access_times | ||
1121 | 1071 | = 2:00-9:00 12:00-24:00 | ||
1122 | 1072 | .RE | ||
1123 | 1073 | } | ||
1124 | 1074 | |||
1125 | 1075 | # Limit telnet sessions to 8 Mbytes of memory and a total | ||
1126 | 1076 | # 20 CPU seconds for child processes. | ||
1127 | 1077 | service telnet | ||
1128 | 1078 | { | ||
1129 | 1079 | .RS | ||
1130 | 1080 | .IP socket_type 20 | ||
1131 | 1081 | = stream | ||
1132 | 1082 | .IP wait | ||
1133 | 1083 | = no | ||
1134 | 1084 | .IP nice | ||
1135 | 1085 | = 10 | ||
1136 | 1086 | .IP user | ||
1137 | 1087 | = root | ||
1138 | 1088 | .IP server | ||
1139 | 1089 | = /usr/etc/in.telnetd | ||
1140 | 1090 | .IP rlimit_as | ||
1141 | 1091 | = 8M | ||
1142 | 1092 | .IP rlimit_cpu | ||
1143 | 1093 | = 20 | ||
1144 | 1094 | .RE | ||
1145 | 1095 | } | ||
1146 | 1096 | |||
1147 | 1097 | # | ||
1148 | 1098 | # This entry and the next one specify internal services. Since | ||
1149 | 1099 | # this is the same service using a different socket type, the | ||
1150 | 1100 | # id attribute is used to uniquely identify each entry | ||
1151 | 1101 | # | ||
1152 | 1102 | service echo | ||
1153 | 1103 | { | ||
1154 | 1104 | .RS | ||
1155 | 1105 | .IP id 20 | ||
1156 | 1106 | = echo-stream | ||
1157 | 1107 | .IP type | ||
1158 | 1108 | = INTERNAL | ||
1159 | 1109 | .IP socket_type | ||
1160 | 1110 | = stream | ||
1161 | 1111 | .IP user | ||
1162 | 1112 | = root | ||
1163 | 1113 | .IP wait | ||
1164 | 1114 | = no | ||
1165 | 1115 | .RE | ||
1166 | 1116 | } | ||
1167 | 1117 | |||
1168 | 1118 | service echo | ||
1169 | 1119 | { | ||
1170 | 1120 | .RS | ||
1171 | 1121 | .IP id 20 | ||
1172 | 1122 | = echo-dgram | ||
1173 | 1123 | .IP type | ||
1174 | 1124 | = INTERNAL | ||
1175 | 1125 | .IP socket_type | ||
1176 | 1126 | = dgram | ||
1177 | 1127 | .IP user | ||
1178 | 1128 | = root | ||
1179 | 1129 | .IP wait | ||
1180 | 1130 | = no | ||
1181 | 1131 | .RE | ||
1182 | 1132 | } | ||
1183 | 1133 | |||
1184 | 1134 | # | ||
1185 | 1135 | # Sample RPC service | ||
1186 | 1136 | # | ||
1187 | 1137 | service rstatd | ||
1188 | 1138 | { | ||
1189 | 1139 | .RS | ||
1190 | 1140 | .IP type 20 | ||
1191 | 1141 | = RPC | ||
1192 | 1142 | .IP socket_type | ||
1193 | 1143 | = dgram | ||
1194 | 1144 | .IP protocol | ||
1195 | 1145 | = udp | ||
1196 | 1146 | .IP server | ||
1197 | 1147 | = /usr/etc/rpc.rstatd | ||
1198 | 1148 | .IP wait | ||
1199 | 1149 | = yes | ||
1200 | 1150 | .IP user | ||
1201 | 1151 | = root | ||
1202 | 1152 | .IP rpc_version | ||
1203 | 1153 | = 2-4 | ||
1204 | 1154 | .IP env | ||
1205 | 1155 | = LD_LIBRARY_PATH=/etc/securelib | ||
1206 | 1156 | .RE | ||
1207 | 1157 | } | ||
1208 | 1158 | |||
1209 | 1159 | # | ||
1210 | 1160 | # Sample unlisted service | ||
1211 | 1161 | # | ||
1212 | 1162 | service unlisted | ||
1213 | 1163 | { | ||
1214 | 1164 | .RS | ||
1215 | 1165 | .IP type 20 | ||
1216 | 1166 | = UNLISTED | ||
1217 | 1167 | .IP socket_type | ||
1218 | 1168 | = stream | ||
1219 | 1169 | .IP protocol | ||
1220 | 1170 | = tcp | ||
1221 | 1171 | .IP wait | ||
1222 | 1172 | = no | ||
1223 | 1173 | .IP server | ||
1224 | 1174 | = /home/user/some_server | ||
1225 | 1175 | .IP port | ||
1226 | 1176 | = 20020 | ||
1227 | 1177 | .RE | ||
1228 | 1178 | } | ||
1229 | 1179 | .RE | ||
1230 | 1180 | .PD | ||
1231 | 1181 | .\" *********************** SEE ALSO **************************** | ||
1232 | 1182 | .SH "SEE ALSO" | ||
1233 | 1183 | .I "xinetd(1L)," | ||
1234 | 1184 | .LP | ||
1235 | 1185 | .I "xinetd.log(5)" | ||
1236 | 1186 | .LP | ||
1237 | 1187 | Postel J., | ||
1238 | 1188 | .IR "Echo Protocol" , | ||
1239 | 1189 | RFC 862, | ||
1240 | 1190 | May 1983 | ||
1241 | 1191 | .LP | ||
1242 | 1192 | Postel J., | ||
1243 | 1193 | .IR "Discard Protocol" , | ||
1244 | 1194 | RFC 863, | ||
1245 | 1195 | May 1983 | ||
1246 | 1196 | .LP | ||
1247 | 1197 | Postel J., | ||
1248 | 1198 | .IR "Character Generator Protocol" , | ||
1249 | 1199 | RFC 864, | ||
1250 | 1200 | May 1983 | ||
1251 | 1201 | .LP | ||
1252 | 1202 | Postel J., | ||
1253 | 1203 | .IR "Daytime Protocol" , | ||
1254 | 1204 | RFC 867, | ||
1255 | 1205 | May 1983 | ||
1256 | 1206 | .LP | ||
1257 | 1207 | Postel J., Harrenstien K., | ||
1258 | 1208 | .IR "Time Protocol" , | ||
1259 | 1209 | RFC 868, | ||
1260 | 1210 | May 1983 | ||
1261 | 1211 | .LP | ||
1262 | 1212 | M. Lottor, | ||
1263 | 1213 | .IR "TCP Port Service Multiplexer (TCPMUX)" , | ||
1264 | 1214 | RFC 1078 | ||
1265 | 1215 | Nov 1988 | ||
1266 | 1216 | .LP | ||
1267 | 1217 | StJohns M., | ||
1268 | 1218 | .IR " Identification Protocol" , | ||
1269 | 1219 | RFC 1413, | ||
1270 | 1220 | February 1993 | ||
1271 | 1221 | .\" *********************** BUGS **************************** | ||
1272 | 1222 | .SH BUGS | ||
1273 | 1223 | .LP | ||
1274 | 1224 | If the | ||
1275 | 1225 | .B INTERCEPT | ||
1276 | 1226 | flag is not used, | ||
1277 | 1227 | access control on the address of the remote host is not performed when | ||
1278 | 1228 | \fIwait\fP is \fIyes\fP and \fIsocket_type\fP is \fIstream\fP. | ||
1279 | 1229 | .LP | ||
1280 | 1230 | The NOLIBWRAP flag is automatically turned on for RPC services whose | ||
1281 | 1231 | \fIsocket_type\fP is \fIstream\fP because xinetd cannot determine the | ||
1282 | 1232 | address of the remote host. | ||
1283 | 1233 | .LP | ||
1284 | 1234 | If the | ||
1285 | 1235 | .B INTERCEPT | ||
1286 | 1236 | flag is not used, | ||
1287 | 1237 | access control on the address of the remote host for | ||
1288 | 1238 | services where \fIwait\fP is \fIyes\fP and \fIsocket_type\fP is \fIdgram\fP | ||
1289 | 1239 | is performed only on the first packet. The server may then accept packets | ||
1290 | 1240 | from hosts not in the access control list. This can happen with | ||
1291 | 1241 | .B RPC | ||
1292 | 1242 | services. | ||
1293 | 1243 | .LP | ||
1294 | 1244 | There is no way to put a | ||
1295 | 1245 | .SM SPACE | ||
1296 | 1246 | in an environment variable. | ||
1297 | 1247 | .LP | ||
1298 | 1248 | When \fIwait\fP is \fIyes\fP and \fIsocket_type\fP is \fIstream\fP, | ||
1299 | 1249 | the socket passed to the server can only accept connections. | ||
1300 | 1250 | .LP | ||
1301 | 1251 | The | ||
1302 | 1252 | .B INTERCEPT | ||
1303 | 1253 | flag is not supported for internal services or multi-threaded services. | ||
1304 | 0 | 1254 | ||
1305 | === added file '.pc/000001-documentation_fixes/xinetd/xinetd.man' | |||
1306 | --- .pc/000001-documentation_fixes/xinetd/xinetd.man 1970-01-01 00:00:00 +0000 | |||
1307 | +++ .pc/000001-documentation_fixes/xinetd/xinetd.man 2013-08-14 10:06:03 +0000 | |||
1308 | @@ -0,0 +1,194 @@ | |||
1309 | 1 | .\"(c) Copyright 1992 by Panagiotis Tsirigotis | ||
1310 | 2 | .\"(c) Sections Copyright 1998-2001 by Rob Braun | ||
1311 | 3 | .\"All rights reserved. The file named COPYRIGHT specifies the terms | ||
1312 | 4 | .\"and conditions for redistribution. | ||
1313 | 5 | .\" | ||
1314 | 6 | .\" $Id: xinetd.man,v 1.3 2003-05-30 15:10:57 steveg Exp $ | ||
1315 | 7 | .TH XINETD 8 "14 June 2001" | ||
1316 | 8 | .\" *************************** NAME ********************************* | ||
1317 | 9 | .SH NAME | ||
1318 | 10 | xinetd \- the extended Internet services daemon | ||
1319 | 11 | .\" *************************** SYNOPSIS ********************************* | ||
1320 | 12 | .SH SYNOPSIS | ||
1321 | 13 | .B xinetd | ||
1322 | 14 | [\fIoptions\fP] | ||
1323 | 15 | .\" *************************** DESCRIPTION ********************************* | ||
1324 | 16 | .SH DESCRIPTION | ||
1325 | 17 | \fBxinetd\fP performs the same function as \fBinetd\fP: it starts | ||
1326 | 18 | programs that provide Internet services. Instead of having such | ||
1327 | 19 | servers started at system initialization time, and be dormant until a | ||
1328 | 20 | connection request arrives, \fBxinetd\fP is the only daemon process | ||
1329 | 21 | started and it listens on all service ports for the services listed in | ||
1330 | 22 | its configuration file. When a request comes in, \fBxinetd\fP starts | ||
1331 | 23 | the appropriate server. Because of the way it operates, \fBxinetd\fP | ||
1332 | 24 | (as well as \fBinetd\fP) is also referred to as a super-server. | ||
1333 | 25 | .LP | ||
1334 | 26 | The services listed in \fBxinetd\fP's configuration file can be | ||
1335 | 27 | separated into two groups. Services in the first group are called | ||
1336 | 28 | .I "multi-threaded" | ||
1337 | 29 | and they require the forking of a new server process for each new | ||
1338 | 30 | connection request. The new server then handles that connection. For | ||
1339 | 31 | such services, \fBxinetd\fP keeps listening for new requests so that it | ||
1340 | 32 | can spawn new servers. On the other hand, the second group includes | ||
1341 | 33 | services for which the service daemon is responsible for handling all | ||
1342 | 34 | new connection requests. Such services are called | ||
1343 | 35 | .I "single-threaded" | ||
1344 | 36 | and \fBxinetd\fP will stop handling new requests for them until the | ||
1345 | 37 | server dies. Services in this group are usually datagram-based. | ||
1346 | 38 | .LP | ||
1347 | 39 | So far, the only reason for the existence of a super-server was to | ||
1348 | 40 | conserve system resources by avoiding to fork a lot of processes which | ||
1349 | 41 | might be dormant for most of their lifetime. While fulfilling this | ||
1350 | 42 | function, \fBxinetd\fP takes advantage of the idea of a super-server to | ||
1351 | 43 | provide features such as access control and logging. Furthermore, | ||
1352 | 44 | \fBxinetd\fP is not limited to services listed in | ||
1353 | 45 | .I /etc/services. | ||
1354 | 46 | Therefore, anybody can use \fBxinetd\fP to start special-purpose | ||
1355 | 47 | servers. | ||
1356 | 48 | .\" *************************** OPTIONS ********************************* | ||
1357 | 49 | .SH OPTIONS | ||
1358 | 50 | .TP | ||
1359 | 51 | .BR \-d | ||
1360 | 52 | Enables debug mode. This produces a lot of debugging output, and it | ||
1361 | 53 | makes it possible to use a debugger on \fBxinetd\fP. | ||
1362 | 54 | .TP | ||
1363 | 55 | .BI \-syslog " syslog_facility" | ||
1364 | 56 | This option enables syslog logging of \fBxinetd\fP-produced messages | ||
1365 | 57 | using the specified syslog facility. | ||
1366 | 58 | The following facility names are supported: | ||
1367 | 59 | .I daemon, | ||
1368 | 60 | .I auth, | ||
1369 | 61 | .I user, | ||
1370 | 62 | .I "local[0-7]" | ||
1371 | 63 | (check \fIsyslog.conf(5)\fP for their meanings). | ||
1372 | 64 | This option is ineffective in debug mode since all relevant messages are sent | ||
1373 | 65 | to the terminal. | ||
1374 | 66 | .TP | ||
1375 | 67 | .BI \-filelog " logfile" | ||
1376 | 68 | \fBxinetd\fP-produced messages will be placed in the specified file. | ||
1377 | 69 | Messages are always appended to the file. | ||
1378 | 70 | If the file does not exist, it will be created. | ||
1379 | 71 | This option is ineffective in debug mode since all relevant messages are sent | ||
1380 | 72 | to the terminal. | ||
1381 | 73 | .TP | ||
1382 | 74 | .BI \-f " config_file" | ||
1383 | 75 | Determines the file that \fBxinetd\fP uses for configuration. The | ||
1384 | 76 | default is \fI/etc/xinetd.conf\fP. | ||
1385 | 77 | .TP | ||
1386 | 78 | .BR \-pidfile " pid_file" | ||
1387 | 79 | .br | ||
1388 | 80 | The process ID is written to the file. This option is ineffective in debug mode. | ||
1389 | 81 | .TP | ||
1390 | 82 | .BI \-dontfork | ||
1391 | 83 | Tells xinetd to stay in the foreground rather than detaching itself, to | ||
1392 | 84 | support being run from init or daemontools. This option automatically sets | ||
1393 | 85 | .B \-stayalive | ||
1394 | 86 | (see below). | ||
1395 | 87 | .TP | ||
1396 | 88 | .BI \-stayalive | ||
1397 | 89 | Tells xinetd to stay running even if no services are specified. | ||
1398 | 90 | .TP | ||
1399 | 91 | .BI \-limit " proc_limit" | ||
1400 | 92 | This option places a limit on the number of concurrently running processes | ||
1401 | 93 | that can be started by | ||
1402 | 94 | .B xinetd. | ||
1403 | 95 | Its purpose is to prevent process table overflows. | ||
1404 | 96 | .TP | ||
1405 | 97 | .BI \-logprocs " limit" | ||
1406 | 98 | This option places a limit on the number of concurrently running servers | ||
1407 | 99 | for remote userid acquisition. | ||
1408 | 100 | .TP | ||
1409 | 101 | .BI \-version | ||
1410 | 102 | This option causes xinetd to print out its version information. | ||
1411 | 103 | .TP | ||
1412 | 104 | .BI \-inetd_compat | ||
1413 | 105 | This option causes xinetd to read /etc/inetd.conf in addition to the | ||
1414 | 106 | standard xinetd config files. /etc/inetd.conf is read after the | ||
1415 | 107 | standard xinetd config files. | ||
1416 | 108 | .TP | ||
1417 | 109 | .BI \-cc " interval" | ||
1418 | 110 | This option instructs | ||
1419 | 111 | .B xinetd | ||
1420 | 112 | to perform periodic consistency checks on its internal state every | ||
1421 | 113 | .I interval | ||
1422 | 114 | seconds. | ||
1423 | 115 | .LP | ||
1424 | 116 | The \fIsyslog\fP and \fIfilelog\fP options are mutually exclusive. | ||
1425 | 117 | If none is specified, the default is syslog using the | ||
1426 | 118 | .I daemon | ||
1427 | 119 | facility. | ||
1428 | 120 | You should not confuse \fBxinetd\fP messages with messages related to | ||
1429 | 121 | service logging. The latter are logged only if this is specified | ||
1430 | 122 | via the configuration file. | ||
1431 | 123 | .\" *********************** CONTROLLING XINETD **************************** | ||
1432 | 124 | .SH "CONTROLLING XINETD" | ||
1433 | 125 | .LP | ||
1434 | 126 | \fBxinetd\fP performs certain actions when it receives certain signals. | ||
1435 | 127 | The actions associated with the specific signals can be redefined | ||
1436 | 128 | by editing \fIconfig.h\fP and recompiling. | ||
1437 | 129 | .TP 15 | ||
1438 | 130 | .B SIGHUP | ||
1439 | 131 | causes a hard reconfiguration, which means that \fBxinetd\fP re-reads | ||
1440 | 132 | the configuration file and terminates the servers for services that | ||
1441 | 133 | are no longer available. Access control is performed again on | ||
1442 | 134 | running servers by checking the remote location, access times and | ||
1443 | 135 | server instances. If the number of server instances is lowered, some | ||
1444 | 136 | arbitrarily picked servers will be killed to satisfy the limit; this | ||
1445 | 137 | will happen \fIafter\fP any servers are terminated because of failing | ||
1446 | 138 | the remote location or access time checks. | ||
1447 | 139 | Also, if the | ||
1448 | 140 | .B INTERCEPT | ||
1449 | 141 | flag was clear and is set, any running servers for that service will | ||
1450 | 142 | be terminated; | ||
1451 | 143 | \fIthe purpose of this is to ensure that after a hard reconfiguration | ||
1452 | 144 | there will be no running servers that can accept packets from addresses | ||
1453 | 145 | that do not meet the access control criteria\fP. | ||
1454 | 146 | .TP | ||
1455 | 147 | .B SIGQUIT | ||
1456 | 148 | causes program termination. | ||
1457 | 149 | .TP | ||
1458 | 150 | .B SIGTERM | ||
1459 | 151 | terminates all running servers before terminating \fBxinetd\fP. | ||
1460 | 152 | .TP | ||
1461 | 153 | .B SIGUSR1 | ||
1462 | 154 | causes an internal state dump (the default dump file is | ||
1463 | 155 | \fI/var/run/xinetd.dump\fP; | ||
1464 | 156 | to change the filename, edit \fIconfig.h\fP and recompile). | ||
1465 | 157 | .TP | ||
1466 | 158 | .B SIGIOT | ||
1467 | 159 | causes an internal consistency check to verify that the data structures | ||
1468 | 160 | used by the program have not been corrupted. | ||
1469 | 161 | When the check is completed | ||
1470 | 162 | .B xinetd | ||
1471 | 163 | will generate a message that says if the check was successful or not. | ||
1472 | 164 | .LP | ||
1473 | 165 | On reconfiguration the log files are closed and reopened. This allows | ||
1474 | 166 | removal of old log files. | ||
1475 | 167 | .\" *********************** FILES **************************** | ||
1476 | 168 | .SH FILES | ||
1477 | 169 | .LP | ||
1478 | 170 | .PD .1v | ||
1479 | 171 | .TP 20 | ||
1480 | 172 | .B /etc/xinetd.conf | ||
1481 | 173 | default configuration file | ||
1482 | 174 | .TP | ||
1483 | 175 | .B /var/run/xinetd.dump | ||
1484 | 176 | default dump file | ||
1485 | 177 | .PD | ||
1486 | 178 | .\" *********************** SEE ALSO **************************** | ||
1487 | 179 | .SH "SEE ALSO" | ||
1488 | 180 | .I "inetd(8)," | ||
1489 | 181 | .LP | ||
1490 | 182 | .I "xinetd.conf(5)," | ||
1491 | 183 | .LP | ||
1492 | 184 | .I "xinetd.log(5)" | ||
1493 | 185 | .LP | ||
1494 | 186 | .I "http://cr.yp.to/daemontools.html" | ||
1495 | 187 | .\" *********************** AUTHOR **************************** | ||
1496 | 188 | .SH AUTHOR | ||
1497 | 189 | Panos Tsirigotis, CS Dept, University of Colorado, Boulder | ||
1498 | 190 | Rob Braun | ||
1499 | 191 | .\" *********************** PRONUNCIATION **************************** | ||
1500 | 192 | .SH PRONUNCIATION | ||
1501 | 193 | zy-net-d | ||
1502 | 194 | |||
1503 | 0 | 195 | ||
1504 | === added directory '.pc/000004-Fix-xinetd.log.man-installation-path' | |||
1505 | === added file '.pc/000004-Fix-xinetd.log.man-installation-path/.timestamp' | |||
1506 | === added file '.pc/000004-Fix-xinetd.log.man-installation-path/Makefile.in' | |||
1507 | --- .pc/000004-Fix-xinetd.log.man-installation-path/Makefile.in 1970-01-01 00:00:00 +0000 | |||
1508 | +++ .pc/000004-Fix-xinetd.log.man-installation-path/Makefile.in 2013-08-14 10:06:03 +0000 | |||
1509 | @@ -0,0 +1,123 @@ | |||
1510 | 1 | CC = @CC@ | ||
1511 | 2 | |||
1512 | 3 | INSTALL_CMD = @INSTALL@ | ||
1513 | 4 | |||
1514 | 5 | RANLIB = @RANLIB@ | ||
1515 | 6 | SRCDIR = @srcdir@ | ||
1516 | 7 | VPATH = @srcdir@ | ||
1517 | 8 | |||
1518 | 9 | prefix = @prefix@ | ||
1519 | 10 | exec_prefix = @exec_prefix@ | ||
1520 | 11 | DAEMONDIR = @sbindir@ | ||
1521 | 12 | MANDIR = @mandir@ | ||
1522 | 13 | topdir = @top_srcdir@ | ||
1523 | 14 | |||
1524 | 15 | LIBS = -lsio -lstr -lmisc -lxlog -lportable -lpset @LIBS@ | ||
1525 | 16 | |||
1526 | 17 | CFLAGS += @CFLAGS@ | ||
1527 | 18 | DCFLAGS = -Wall -Wredundant-decls -W -Wfloat-equal -Wundef -Wcast-qual -Wwrite-strings -Wmissing-noreturn -Wmissing-format-attribute -Wshadow -Wpointer-arith -Wno-unused -g | ||
1528 | 19 | |||
1529 | 20 | |||
1530 | 21 | DEFS = @DEFS@ | ||
1531 | 22 | |||
1532 | 23 | SIO_DEFS = @DEFS@ | ||
1533 | 24 | MISC_DEFS = @DEFS@ | ||
1534 | 25 | LIB_DEFS = @DEFS@ | ||
1535 | 26 | PROG_DEFS = @DEFS@ | ||
1536 | 27 | |||
1537 | 28 | LIBMAKEDEFS = CC='$(CC)' CFLAGS='$(CFLAGS) -I../../include' | ||
1538 | 29 | PROGMAKEDEFS = CC='$(CC)' CFLAGS='$(CFLAGS) -I../libs/include' LDFLAGS='$(LDFLAGS) -L../libs/lib' | ||
1539 | 30 | DEBUGLIBMAKEDEFS = CC='$(CC)' CFLAGS='$(DCFLAGS) -I../../include' | ||
1540 | 31 | DEBUGMAKEDEFS = CC='$(CC)' CFLAGS='$(DCFLAGS) -I../libs/include' LDFLAGS='$(LDFLAGS) -L../libs/lib' | ||
1541 | 32 | |||
1542 | 33 | MANDATORY_LIBS = portable sio str misc xlog pset | ||
1543 | 34 | ALL_LIBS = portable sio str misc xlog pset | ||
1544 | 35 | |||
1545 | 36 | build: makelibs makeprog | ||
1546 | 37 | |||
1547 | 38 | debug: debugmakelibs debugmakeprog | ||
1548 | 39 | |||
1549 | 40 | makeprog: makelibs | ||
1550 | 41 | cd xinetd ; $(MAKE) $(PROGMAKEDEFS) | ||
1551 | 42 | |||
1552 | 43 | debugmakeprog: | ||
1553 | 44 | cd xinetd ; $(MAKE) $(DEBUGMAKEDEFS) | ||
1554 | 45 | |||
1555 | 46 | makelibs: libmisc libportable libpset libsio libstr libxlog | ||
1556 | 47 | |||
1557 | 48 | debugmakelibs: dlibmisc dlibportable dlibpset dlibsio dlibstr dlibxlog | ||
1558 | 49 | |||
1559 | 50 | libmisc: libstr | ||
1560 | 51 | cd libs/src/misc ; $(MAKE) $(LIBMAKEDEFS) install | ||
1561 | 52 | libportable: | ||
1562 | 53 | cd libs/src/portable ; $(MAKE) $(LIBMAKEDEFS) install | ||
1563 | 54 | libpset: | ||
1564 | 55 | cd libs/src/pset ; $(MAKE) $(LIBMAKEDEFS) install | ||
1565 | 56 | libsio: libportable | ||
1566 | 57 | cd libs/src/sio ; $(MAKE) $(LIBMAKEDEFS) install | ||
1567 | 58 | libstr: libsio | ||
1568 | 59 | cd libs/src/str ; $(MAKE) $(LIBMAKEDEFS) install | ||
1569 | 60 | libxlog: libsio libstr | ||
1570 | 61 | cd libs/src/xlog ; $(MAKE) $(LIBMAKEDEFS) install | ||
1571 | 62 | |||
1572 | 63 | dlibmisc: dlibstr | ||
1573 | 64 | cd libs/src/misc ; $(MAKE) $(DEBUGLIBMAKEDEFS) install | ||
1574 | 65 | dlibportable: | ||
1575 | 66 | cd libs/src/portable ; $(MAKE) $(DEBUGLIBMAKEDEFS) install | ||
1576 | 67 | dlibpset: | ||
1577 | 68 | cd libs/src/pset ; $(MAKE) $(DEBUGLIBMAKEDEFS) install | ||
1578 | 69 | dlibsio: dlibportable | ||
1579 | 70 | cd libs/src/sio ; $(MAKE) $(DEBUGLIBMAKEDEFS) install | ||
1580 | 71 | dlibstr: dlibsio | ||
1581 | 72 | cd libs/src/str ; $(MAKE) $(DEBUGLIBMAKEDEFS) install | ||
1582 | 73 | dlibxlog: dlibsio dlibstr | ||
1583 | 74 | cd libs/src/xlog ; $(MAKE) $(DEBUGLIBMAKEDEFS) install | ||
1584 | 75 | |||
1585 | 76 | install: build | ||
1586 | 77 | for i in $(DAEMONDIR) $(BINDIR) $(MANDIR)/man5 $(MANDIR)/man8 ; do \ | ||
1587 | 78 | test -d $$i || mkdir -p $$i ; done | ||
1588 | 79 | $(INSTALL_CMD) -m 755 xinetd/xinetd $(DAEMONDIR) | ||
1589 | 80 | $(INSTALL_CMD) -m 755 xinetd/itox $(DAEMONDIR) | ||
1590 | 81 | $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DAEMONDIR) | ||
1591 | 82 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(MANDIR)/man5/xinetd.conf.5 | ||
1592 | 83 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(MANDIR)/man8/xinetd.log.8 | ||
1593 | 84 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(MANDIR)/man8/xinetd.8 | ||
1594 | 85 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(MANDIR)/man8/itox.8 | ||
1595 | 86 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.pl.8 | ||
1596 | 87 | @echo "You must put your xinetd.conf in /etc/xinetd.conf" | ||
1597 | 88 | @echo "There is a sample config file in xinetd/sample.conf and you can" | ||
1598 | 89 | @echo "use xconv.pl to convert your old inetd.conf file to an xinetd format" | ||
1599 | 90 | |||
1600 | 91 | uninstall: | ||
1601 | 92 | rm -f $(DAEMONDIR)/xinetd | ||
1602 | 93 | rm -f $(DAEMONDIR)/itox | ||
1603 | 94 | rm -f $(DAEMONDIR)/xconv.pl | ||
1604 | 95 | rm -f $(MANDIR)/man5/xinetd.conf.5 | ||
1605 | 96 | rm -f $(MANDIR)/man8/xinetd.log.8 | ||
1606 | 97 | rm -f $(MANDIR)/man8/xinetd.8 | ||
1607 | 98 | rm -f $(MANDIR)/man8/itox.8 | ||
1608 | 99 | |||
1609 | 100 | distclean: clean | ||
1610 | 101 | rm -f config.cache config.log Makefile config.status xinetd/itox | ||
1611 | 102 | rm -f config.h @srcdir@/libs/include/* @srcdir@/libs/man/* | ||
1612 | 103 | for lib in $(ALL_LIBS) ; do \ | ||
1613 | 104 | cd @srcdir@/libs/src/$$lib ; $(MAKE) distclean ; \ | ||
1614 | 105 | cd ../../.. ; \ | ||
1615 | 106 | done | ||
1616 | 107 | cd xinetd ; $(MAKE) distclean | ||
1617 | 108 | |||
1618 | 109 | clean: cleanlibs cleanprog | ||
1619 | 110 | rm -f @srcdir@/libs/lib/*.a | ||
1620 | 111 | |||
1621 | 112 | cleanlibs: | ||
1622 | 113 | for lib in $(ALL_LIBS) ; do \ | ||
1623 | 114 | cd @srcdir@/libs/src/$$lib ; $(MAKE) clean ; \ | ||
1624 | 115 | cd ../../.. ; \ | ||
1625 | 116 | done | ||
1626 | 117 | |||
1627 | 118 | cleanprog: | ||
1628 | 119 | cd xinetd ; $(MAKE) clean | ||
1629 | 120 | |||
1630 | 121 | spotless: clean | ||
1631 | 122 | rm -f @srcdir@/libs/include/*.h @srcdir@/libs/man/*.3 | ||
1632 | 123 | cd libs ; for i in lib include man ; do rm $$i/* ; done | ||
1633 | 0 | 124 | ||
1634 | === added directory '.pc/000008-fix-manpages' | |||
1635 | === added file '.pc/000008-fix-manpages/.timestamp' | |||
1636 | === added directory '.pc/000008-fix-manpages/xinetd' | |||
1637 | === added file '.pc/000008-fix-manpages/xinetd/itox.8' | |||
1638 | --- .pc/000008-fix-manpages/xinetd/itox.8 1970-01-01 00:00:00 +0000 | |||
1639 | +++ .pc/000008-fix-manpages/xinetd/itox.8 2013-08-14 10:06:03 +0000 | |||
1640 | @@ -0,0 +1,22 @@ | |||
1641 | 1 | .TH ITOX 8 "March 2005" "xinetd" | ||
1642 | 2 | .SH NAME | ||
1643 | 3 | itox \- converts inetd.conf style configuration files to xinetd.conf | ||
1644 | 4 | .SH SYNOPSIS | ||
1645 | 5 | itox [-daemon_dir <dir_name>] | ||
1646 | 6 | .SH DESCRIPTION | ||
1647 | 7 | .B itox | ||
1648 | 8 | takes on its standard input inetd.conf style entries and dumps to | ||
1649 | 9 | standard output the corresponding xinetd.conf style entries. | ||
1650 | 10 | .SH OPTIONS | ||
1651 | 11 | .TP | ||
1652 | 12 | .I -daemon_dir <dir_name> | ||
1653 | 13 | If you use tcpd, this option specifies the directory where all the daemons are. | ||
1654 | 14 | You must specify this option if you use tcpd and the daemon file names are not | ||
1655 | 15 | absolute. | ||
1656 | 16 | .SH EXAMPLES | ||
1657 | 17 | itox -daemon_dir /usr/sbin < inetd.conf > xinetd.conf | ||
1658 | 18 | .SH AUTHOR | ||
1659 | 19 | xinetd and itox were written by Panagiotis Tsirigotis. | ||
1660 | 20 | .sp | ||
1661 | 21 | This man page was written by Norbert Veber <nveber@debian.org> and Thomas Seyrat | ||
1662 | 22 | <tomasera@debian.org> | ||
1663 | 0 | 23 | ||
1664 | === added file '.pc/000008-fix-manpages/xinetd/xinetd.conf.man' | |||
1665 | --- .pc/000008-fix-manpages/xinetd/xinetd.conf.man 1970-01-01 00:00:00 +0000 | |||
1666 | +++ .pc/000008-fix-manpages/xinetd/xinetd.conf.man 2013-08-14 10:06:03 +0000 | |||
1667 | @@ -0,0 +1,1253 @@ | |||
1668 | 1 | .\"(c) Copyright 1992, by Panagiotis Tsirigotis | ||
1669 | 2 | .\"(c) Sections Copyright 1998-2001 by Rob Braun | ||
1670 | 3 | .\"All rights reserved. The file named COPYRIGHT specifies the terms | ||
1671 | 4 | .\"and conditions for redistribution. | ||
1672 | 5 | .\" | ||
1673 | 6 | .\" $Id: xinetd.conf.man,v 1.20 2007-09-20 14:58:27 bbraun Exp $ | ||
1674 | 7 | .TH XINETD.CONF 5 "14 June 2001" | ||
1675 | 8 | .\" *************************** NAME ********************************* | ||
1676 | 9 | .SH NAME | ||
1677 | 10 | xinetd.conf \- Extended Internet Services Daemon configuration file | ||
1678 | 11 | .\" *********************** DESCRIPTION **************************** | ||
1679 | 12 | .SH DESCRIPTION | ||
1680 | 13 | .B "xinetd.conf" | ||
1681 | 14 | is the configuration file that | ||
1682 | 15 | determines the services provided by \fBxinetd\fP. | ||
1683 | 16 | Any line whose first non-white-space character is a '#' is considered | ||
1684 | 17 | a comment line. Empty lines are ignored. | ||
1685 | 18 | .LP | ||
1686 | 19 | The file contains entries of the form: | ||
1687 | 20 | .RS | ||
1688 | 21 | .nf | ||
1689 | 22 | .ft B | ||
1690 | 23 | .sp | ||
1691 | 24 | service <service_name> | ||
1692 | 25 | { | ||
1693 | 26 | .RS | ||
1694 | 27 | .ft B | ||
1695 | 28 | <attribute> <assign_op> <value> <value> ... | ||
1696 | 29 | .I "..." | ||
1697 | 30 | .RE | ||
1698 | 31 | } | ||
1699 | 32 | .ft R | ||
1700 | 33 | .fi | ||
1701 | 34 | .RE | ||
1702 | 35 | .LP | ||
1703 | 36 | The assignment operator, | ||
1704 | 37 | .I assign_op, | ||
1705 | 38 | can be one of | ||
1706 | 39 | .B '=', | ||
1707 | 40 | .B '+=', | ||
1708 | 41 | .B '-='. | ||
1709 | 42 | The majority of attributes support only the simple assignment operator, | ||
1710 | 43 | .B '='. | ||
1711 | 44 | Attributes whose value is a set of values support all assignment operators. | ||
1712 | 45 | For such attributes, | ||
1713 | 46 | .B '+=' | ||
1714 | 47 | means adding a value to the set and | ||
1715 | 48 | .B '-=' | ||
1716 | 49 | means removing a value from the set. | ||
1717 | 50 | A list of these attributes will be given | ||
1718 | 51 | after all the attributes are described. | ||
1719 | 52 | .LP | ||
1720 | 53 | Each entry defines a service identified by the \fIservice_name\fP. | ||
1721 | 54 | The following is a list of available attributes: | ||
1722 | 55 | .TP 17 | ||
1723 | 56 | .B id | ||
1724 | 57 | This attribute is used to uniquely identify a service. | ||
1725 | 58 | This is useful because there exist services that can use different | ||
1726 | 59 | protocols and need to be described with different entries in the | ||
1727 | 60 | configuration file. | ||
1728 | 61 | By default, the service id is the same as the service name. | ||
1729 | 62 | .TP | ||
1730 | 63 | .B type | ||
1731 | 64 | Any combination of the following values may be used: | ||
1732 | 65 | .RS | ||
1733 | 66 | .TP 12 | ||
1734 | 67 | .B RPC | ||
1735 | 68 | if this is an RPC service | ||
1736 | 69 | .TP | ||
1737 | 70 | .B INTERNAL | ||
1738 | 71 | if this is a service provided by \fBxinetd\fP. | ||
1739 | 72 | .TP | ||
1740 | 73 | .B TCPMUX/TCPMUXPLUS | ||
1741 | 74 | if this is a service that will be started according to the RFC 1078 protocol on the TCPMUX well-known port. See the section describing TCPMUX services below. | ||
1742 | 75 | .TP | ||
1743 | 76 | .B UNLISTED | ||
1744 | 77 | if this is a service not listed in a standard system file | ||
1745 | 78 | (like | ||
1746 | 79 | .I /etc/rpc | ||
1747 | 80 | for RPC services, or | ||
1748 | 81 | .I /etc/services | ||
1749 | 82 | for non-RPC services). | ||
1750 | 83 | .RE | ||
1751 | 84 | .TP | ||
1752 | 85 | .B flags | ||
1753 | 86 | Any combination of the following flags may be used: | ||
1754 | 87 | .RS | ||
1755 | 88 | .TP 12 | ||
1756 | 89 | .B INTERCEPT | ||
1757 | 90 | Intercept packets or accepted connections in order to verify that they | ||
1758 | 91 | are coming from acceptable locations (internal or multi-threaded | ||
1759 | 92 | services cannot be intercepted). | ||
1760 | 93 | .TP | ||
1761 | 94 | .B NORETRY | ||
1762 | 95 | Avoid retry attempts in case of fork failure. | ||
1763 | 96 | .TP | ||
1764 | 97 | .B IDONLY | ||
1765 | 98 | Accept connections only when the remote end identifies the remote user | ||
1766 | 99 | (i.e. the remote host must run an identification server). | ||
1767 | 100 | This flag applies only to connection-based services. | ||
1768 | 101 | This flag is ineffective if the | ||
1769 | 102 | .B USERID | ||
1770 | 103 | log option is not used. | ||
1771 | 104 | .TP | ||
1772 | 105 | .B NAMEINARGS | ||
1773 | 106 | This will cause the first argument in "server_args" to be argv[0] when | ||
1774 | 107 | executing the server, as specified in "server". This allows you to use | ||
1775 | 108 | tcpd by putting tcpd in "server" and the name of the server in "server_args" | ||
1776 | 109 | like in normal inetd. | ||
1777 | 110 | .TP | ||
1778 | 111 | .B NODELAY | ||
1779 | 112 | If the service is a tcp service and the NODELAY flag is set, then the | ||
1780 | 113 | TCP_NODELAY flag will be set on the socket. If the service is not | ||
1781 | 114 | a tcp service, this option has no effect. | ||
1782 | 115 | .TP | ||
1783 | 116 | .B KEEPALIVE | ||
1784 | 117 | If the service is a tcp service and the KEEPALIVE flag is set, then | ||
1785 | 118 | the SO_KEEPALIVE socket flag will be set on the socket. If the service | ||
1786 | 119 | is not a tcp service, this option has no effect. | ||
1787 | 120 | .TP | ||
1788 | 121 | .B NOLIBWRAP | ||
1789 | 122 | This disables internal calling of the tcpwrap library to determine access | ||
1790 | 123 | to the service. This may be needed in order to use libwrap functionality | ||
1791 | 124 | not available to long-running processes such as xinetd; in this case, | ||
1792 | 125 | the tcpd program can be called explicitly (see also the NAMEINARGS flag). | ||
1793 | 126 | For RPC services using TCP transport, this flag is automatically turned on, | ||
1794 | 127 | because xinetd cannot get remote host address information for the rpc port. | ||
1795 | 128 | .TP | ||
1796 | 129 | .B SENSOR | ||
1797 | 130 | This replaces the service with a sensor that detects accesses to the | ||
1798 | 131 | specified port. NOTE: It will NOT detect stealth scans. This flag | ||
1799 | 132 | should be used only on services that you know you don't need. When an | ||
1800 | 133 | access is made to this service's port, the IP Address is added to a global | ||
1801 | 134 | no_access list. This causes all subsequent accesses from the originating IP | ||
1802 | 135 | address to be denied access until the deny_time setting expires. The amount | ||
1803 | 136 | of time spent on this list is configurable as the deny_time attribute. The | ||
1804 | 137 | SENSOR flag will also cause xinetd to consider the server attribute to be | ||
1805 | 138 | INTERNAL no matter what is typed on the same line. Another important thing | ||
1806 | 139 | to remember is that if the socket_type is set to stream, then the wait | ||
1807 | 140 | attribute should be set to no. | ||
1808 | 141 | .TP | ||
1809 | 142 | .B IPv4 | ||
1810 | 143 | Sets the service to be an IPv4 service (AF_INET). | ||
1811 | 144 | .TP | ||
1812 | 145 | .B IPv6 | ||
1813 | 146 | Sets the service to be an IPv6 service (AF_INET6), if IPv6 is available on the system. | ||
1814 | 147 | .TP | ||
1815 | 148 | .B LABELED | ||
1816 | 149 | The LABELED flag will tell xinetd to change the child processes SE Linux context to match that of the incoming connection as it starts the service. This only works for external tcp non-waiting servers and is an error if applied to an internal, udp, or tcp-wait server. | ||
1817 | 150 | .TP | ||
1818 | 151 | .B REUSE | ||
1819 | 152 | The REUSE flag is deprecated. All services now implicitly use the REUSE flag. | ||
1820 | 153 | .RE | ||
1821 | 154 | .TP | ||
1822 | 155 | .B disable | ||
1823 | 156 | This is boolean "yes" or "no". This will result in the service | ||
1824 | 157 | being disabled and not starting. See the DISABLE flag description. | ||
1825 | 158 | .RE | ||
1826 | 159 | .TP | ||
1827 | 160 | .B socket_type | ||
1828 | 161 | Possible values for this attribute include: | ||
1829 | 162 | .RS | ||
1830 | 163 | .TP 12 | ||
1831 | 164 | .I stream | ||
1832 | 165 | stream-based service | ||
1833 | 166 | .TP | ||
1834 | 167 | .I dgram | ||
1835 | 168 | datagram-based service | ||
1836 | 169 | .TP | ||
1837 | 170 | .I raw | ||
1838 | 171 | service that requires direct access to IP | ||
1839 | 172 | .TP | ||
1840 | 173 | .I seqpacket | ||
1841 | 174 | service that requires reliable sequential datagram transmission | ||
1842 | 175 | .RE | ||
1843 | 176 | .TP | ||
1844 | 177 | .B protocol | ||
1845 | 178 | determines the protocol that is employed by the service. | ||
1846 | 179 | The protocol must exist in | ||
1847 | 180 | .I /etc/protocols. | ||
1848 | 181 | If this | ||
1849 | 182 | attribute is not defined, the default protocol employed by the service | ||
1850 | 183 | will be used. | ||
1851 | 184 | .TP | ||
1852 | 185 | .B wait | ||
1853 | 186 | This attribute determines if the service is single-threaded or | ||
1854 | 187 | multi-threaded and whether or not xinetd accepts the connection or the server | ||
1855 | 188 | program accepts the connection. If its value is \fIyes\fP, the service is | ||
1856 | 189 | single-threaded; this means that \fBxinetd\fP will start the server and then | ||
1857 | 190 | it will stop handling requests for the service until the server dies and that | ||
1858 | 191 | the server software will accept the connection. If the attribute value is | ||
1859 | 192 | \fIno\fP, the service is multi-threaded and \fBxinetd\fP will keep handling | ||
1860 | 193 | new service requests and xinetd will accept the connection. It should be noted | ||
1861 | 194 | that udp/dgram services normally expect the value to be yes since udp is not | ||
1862 | 195 | connection oriented, while tcp/stream servers normally expect the value to be | ||
1863 | 196 | no. | ||
1864 | 197 | .TP | ||
1865 | 198 | .B user | ||
1866 | 199 | determines the uid for the server process. The user attribute can either | ||
1867 | 200 | be numeric or a name. If a name is given (recommended), the user name must | ||
1868 | 201 | exist in | ||
1869 | 202 | .I /etc/passwd. | ||
1870 | 203 | This attribute is ineffective if the effective user ID | ||
1871 | 204 | of \fBxinetd\fP is not super-user. | ||
1872 | 205 | .TP | ||
1873 | 206 | .B group | ||
1874 | 207 | determines the gid for the server process. The group attribute can either | ||
1875 | 208 | be numeric or a name. If a name is given (recommended), the group name must | ||
1876 | 209 | exist in | ||
1877 | 210 | .I /etc/group. | ||
1878 | 211 | If a group is not specified, the group | ||
1879 | 212 | of \fIuser\fP will be used (from | ||
1880 | 213 | .I /etc/passwd). | ||
1881 | 214 | This attribute is ineffective if the effective user ID | ||
1882 | 215 | of \fBxinetd\fP is not super-user and if the \fBgroups\fP attribute | ||
1883 | 216 | is not set to 'yes'. | ||
1884 | 217 | .TP | ||
1885 | 218 | .B instances | ||
1886 | 219 | determines the number of servers that can be simultaneously active | ||
1887 | 220 | for a service (the default is no limit). The value of this | ||
1888 | 221 | attribute can be either a number or | ||
1889 | 222 | .B UNLIMITED | ||
1890 | 223 | which means that there is no limit. | ||
1891 | 224 | .TP | ||
1892 | 225 | .B nice | ||
1893 | 226 | determines the server priority. Its value is a (possibly negative) number; | ||
1894 | 227 | check nice(3) for more information. | ||
1895 | 228 | .TP | ||
1896 | 229 | .B server | ||
1897 | 230 | determines the program to execute for this service. | ||
1898 | 231 | .TP | ||
1899 | 232 | .B server_args | ||
1900 | 233 | determines the arguments passed to the server. In contrast to \fBinetd\fP, | ||
1901 | 234 | the server name should \fInot\fP be included in \fIserver_args\fP. | ||
1902 | 235 | .TP | ||
1903 | 236 | .B libwrap | ||
1904 | 237 | overrides the service name passed to libwrap (which defaults to the | ||
1905 | 238 | server name, the first server_args component with NAMEINARGS, the id | ||
1906 | 239 | for internal services and the service name for redirected services). | ||
1907 | 240 | This attribute is only valid if xinetd has been configured with the libwrap | ||
1908 | 241 | option. | ||
1909 | 242 | .TP | ||
1910 | 243 | .B only_from | ||
1911 | 244 | determines the remote hosts to which the particular | ||
1912 | 245 | service is available. | ||
1913 | 246 | Its value is a list of IP addresses which can be specified in any | ||
1914 | 247 | combination of the following ways: | ||
1915 | 248 | .RS | ||
1916 | 249 | .TP 5 | ||
1917 | 250 | .B a) | ||
1918 | 251 | a numeric address in the form of %d.%d.%d.%d. If the rightmost components are | ||
1919 | 252 | 0, they are treated as wildcards | ||
1920 | 253 | (for example, 128.138.12.0 matches all hosts on the 128.138.12 subnet). | ||
1921 | 254 | 0.0.0.0 matches all Internet addresses. IPv6 hosts may be specified in the form of abcd:ef01::2345:6789. The rightmost rule for IPv4 addresses does not apply to IPv6 addresses. | ||
1922 | 255 | .TP | ||
1923 | 256 | .B b) | ||
1924 | 257 | a factorized address in the form of %d.%d.%d.{%d,%d,...}. | ||
1925 | 258 | There is no need for all 4 components (i.e. %d.%d.{%d,%d,...%d} is also ok). | ||
1926 | 259 | However, the factorized part must be at the end of the address. This form does not work for IPv6 hosts. | ||
1927 | 260 | .TP | ||
1928 | 261 | .B c) | ||
1929 | 262 | a network name (from | ||
1930 | 263 | .I /etc/networks). This form does not work for IPv6 hosts. | ||
1931 | 264 | .TP | ||
1932 | 265 | .B d) | ||
1933 | 266 | a host name. When a connection is made to xinetd, a reverse lookup is | ||
1934 | 267 | performed, and the canonical name returned is compared to the specified host | ||
1935 | 268 | name. You may also use domain names in the form of .domain.com. If the | ||
1936 | 269 | reverse lookup of the client's IP is within .domain.com, a match occurs. | ||
1937 | 270 | .TP | ||
1938 | 271 | .B e) | ||
1939 | 272 | an ip address/netmask range in the form of 1.2.3.4/32. IPv6 address/netmask | ||
1940 | 273 | ranges in the form of 1234::/46 are also valid. | ||
1941 | 274 | .RE | ||
1942 | 275 | .TP | ||
1943 | 276 | .B "" | ||
1944 | 277 | Specifying this attribute | ||
1945 | 278 | without a value makes the service available to nobody. | ||
1946 | 279 | .TP | ||
1947 | 280 | .B no_access | ||
1948 | 281 | determines the remote hosts to which the particular | ||
1949 | 282 | service is unavailable. Its value can be specified in the same way as the | ||
1950 | 283 | value of the \fBonly_from\fP | ||
1951 | 284 | attribute. These two attributes determine the location access control | ||
1952 | 285 | enforced by \fBxinetd\fP. If none of the two is specified for a service, | ||
1953 | 286 | the service is available to anyone. If both are specified for a service, | ||
1954 | 287 | the one that is the better match for | ||
1955 | 288 | the address of the remote host determines | ||
1956 | 289 | if the service is available to that host (for example, if the | ||
1957 | 290 | \fBonly_from\fP list contains 128.138.209.0 and the | ||
1958 | 291 | \fBno_access\fP list contains 128.138.209.10 | ||
1959 | 292 | then the host with the address 128.138.209.10 can not access the service). | ||
1960 | 293 | .TP | ||
1961 | 294 | .B access_times | ||
1962 | 295 | determines the time intervals when the service is available. An interval | ||
1963 | 296 | has the form \fIhour:min-hour:min\fP (connections | ||
1964 | 297 | .I will | ||
1965 | 298 | be accepted at the bounds of an interval). Hours can range from 0 to 23 and | ||
1966 | 299 | minutes from 0 to 59. | ||
1967 | 300 | .TP | ||
1968 | 301 | .B log_type | ||
1969 | 302 | determines where the service log output is sent. There are two formats: | ||
1970 | 303 | .RS | ||
1971 | 304 | .TP | ||
1972 | 305 | .B SYSLOG " \fIsyslog_facility [syslog_level]\fP" | ||
1973 | 306 | The log output is sent to syslog at the specified facility. Possible facility | ||
1974 | 307 | names include: | ||
1975 | 308 | .I daemon, | ||
1976 | 309 | .I auth, | ||
1977 | 310 | .I authpriv, | ||
1978 | 311 | .I user, | ||
1979 | 312 | .I mail, | ||
1980 | 313 | .I lpr, | ||
1981 | 314 | .I news, | ||
1982 | 315 | .I uucp, | ||
1983 | 316 | .I ftp | ||
1984 | 317 | .I "local0-7." | ||
1985 | 318 | Possible level names include: | ||
1986 | 319 | .I emerg, | ||
1987 | 320 | .I alert, | ||
1988 | 321 | .I crit, | ||
1989 | 322 | .I err, | ||
1990 | 323 | .I warning, | ||
1991 | 324 | .I notice, | ||
1992 | 325 | .I info, | ||
1993 | 326 | .I debug. | ||
1994 | 327 | If a level is not present, the messages will be recorded at the | ||
1995 | 328 | .I info | ||
1996 | 329 | level. | ||
1997 | 330 | .TP | ||
1998 | 331 | .B FILE " \fIfile [soft_limit [hard_limit]]\fP" | ||
1999 | 332 | The log output is appended to \fIfile\fP which will be created if it does | ||
2000 | 333 | not exist. Two limits on the size of the log file can be optionally specified. | ||
2001 | 334 | The first limit is a soft one; | ||
2002 | 335 | .B xinetd | ||
2003 | 336 | will log a message the first time this limit is exceeded (if | ||
2004 | 337 | .B xinetd | ||
2005 | 338 | logs to syslog, the message will be sent at the | ||
2006 | 339 | .I alert | ||
2007 | 340 | priority level). | ||
2008 | 341 | The second limit is a hard limit; | ||
2009 | 342 | .B xinetd | ||
2010 | 343 | will stop logging for the affected service (if the log file is a | ||
2011 | 344 | common log file, then more than one service may be affected) | ||
2012 | 345 | and will log a message about this (if | ||
2013 | 346 | .B xinetd | ||
2014 | 347 | logs to syslog, the message will be sent at the | ||
2015 | 348 | .I alert | ||
2016 | 349 | priority level). | ||
2017 | 350 | If a hard limit is not specified, it defaults to the soft limit | ||
2018 | 351 | increased by 1% but the extra size must be within the parameters | ||
2019 | 352 | .SM LOG_EXTRA_MIN | ||
2020 | 353 | and | ||
2021 | 354 | .SM LOG_EXTRA_MAX | ||
2022 | 355 | which default to 5K and 20K respectively (these constants are defined in | ||
2023 | 356 | \fIxconfig.h\fP). | ||
2024 | 357 | .RE | ||
2025 | 358 | .TP | ||
2026 | 359 | .B log_on_success | ||
2027 | 360 | determines what information is logged when a server is started and when | ||
2028 | 361 | that server exits (the service id is always included in the log entry). | ||
2029 | 362 | Any combination of the following values may be specified: | ||
2030 | 363 | .RS | ||
2031 | 364 | .TP 12 | ||
2032 | 365 | .B PID | ||
2033 | 366 | logs the server process id (if the service is implemented by \fBxinetd\fP | ||
2034 | 367 | without forking another process the logged process id will be 0) | ||
2035 | 368 | .TP | ||
2036 | 369 | .B HOST | ||
2037 | 370 | logs the remote host address | ||
2038 | 371 | .TP | ||
2039 | 372 | .B USERID | ||
2040 | 373 | logs the user id of the remote user using the RFC 1413 identification protocol. | ||
2041 | 374 | This option is available only for multi-threaded stream services. | ||
2042 | 375 | .TP | ||
2043 | 376 | .B EXIT | ||
2044 | 377 | logs the fact that a server exited along with the exit status or the | ||
2045 | 378 | termination signal | ||
2046 | 379 | (the process id is also logged if the | ||
2047 | 380 | .B PID | ||
2048 | 381 | option is used) | ||
2049 | 382 | .TP | ||
2050 | 383 | .B DURATION | ||
2051 | 384 | logs the duration of a service session | ||
2052 | 385 | .TP | ||
2053 | 386 | .B TRAFFIC | ||
2054 | 387 | logs the total bytes in and out for a redirected service. | ||
2055 | 388 | .RE | ||
2056 | 389 | .TP | ||
2057 | 390 | .B log_on_failure | ||
2058 | 391 | determines what information is logged when a server cannot be started | ||
2059 | 392 | (either because of a lack of resources or because of access control | ||
2060 | 393 | restrictions). The service id is always included in the log entry along | ||
2061 | 394 | with the reason for failure. | ||
2062 | 395 | Any combination of the following values may be specified: | ||
2063 | 396 | .RS | ||
2064 | 397 | .TP 12 | ||
2065 | 398 | .B HOST | ||
2066 | 399 | logs the remote host address. | ||
2067 | 400 | .TP | ||
2068 | 401 | .B USERID | ||
2069 | 402 | logs the user id of the remote user using the RFC 1413 identification protocol. | ||
2070 | 403 | This option is available only for multi-threaded stream services. | ||
2071 | 404 | .TP | ||
2072 | 405 | .B ATTEMPT | ||
2073 | 406 | logs the fact that a failed attempt was made | ||
2074 | 407 | (this option is implied by all others). | ||
2075 | 408 | .RE | ||
2076 | 409 | .TP | ||
2077 | 410 | .B rpc_version | ||
2078 | 411 | determines the RPC version for a RPC service. The version can be | ||
2079 | 412 | a single number or a range in the form \fInumber\fP-\fInumber\fP. | ||
2080 | 413 | .TP | ||
2081 | 414 | .B rpc_number | ||
2082 | 415 | determines the number for an | ||
2083 | 416 | .I UNLISTED | ||
2084 | 417 | RPC service (this attribute is ignored if the service is not unlisted). | ||
2085 | 418 | .TP | ||
2086 | 419 | .B env | ||
2087 | 420 | The value of this attribute is a list of strings of the form 'name=value'. | ||
2088 | 421 | These strings will be added to the environment before | ||
2089 | 422 | starting a server (therefore the server's environment will include | ||
2090 | 423 | \fBxinetd\fP's environment plus the specified strings). | ||
2091 | 424 | .TP | ||
2092 | 425 | .B passenv | ||
2093 | 426 | The value of this attribute is a list of environment variables from | ||
2094 | 427 | \fBxinetd\fP's environment that will be passed to the server. | ||
2095 | 428 | An empty list implies passing no variables to the server | ||
2096 | 429 | except for those explicitly defined using the | ||
2097 | 430 | .I env | ||
2098 | 431 | attribute. | ||
2099 | 432 | (notice that you can use this attribute in conjunction with the | ||
2100 | 433 | .I env | ||
2101 | 434 | attribute to specify exactly what environment will be passed to the server). | ||
2102 | 435 | .TP | ||
2103 | 436 | .B port | ||
2104 | 437 | determines the service port. If this attribute is specified for a service | ||
2105 | 438 | listed in | ||
2106 | 439 | .I /etc/services, | ||
2107 | 440 | it must be equal to the port number listed in that file. | ||
2108 | 441 | .TP | ||
2109 | 442 | .B redirect | ||
2110 | 443 | Allows a tcp service to be redirected to another host. When xinetd receives | ||
2111 | 444 | a tcp connection on this port it spawns a process that establishes a | ||
2112 | 445 | connection to the host and port number specified, and forwards all data | ||
2113 | 446 | between the two hosts. This option is useful when your internal machines | ||
2114 | 447 | are not visible to the outside world. Syntax is: redirect = (ip address) | ||
2115 | 448 | (port). You can also use a hostname instead of the IP address in this | ||
2116 | 449 | field. The hostname lookup is performed only once, when xinetd is | ||
2117 | 450 | started, and the first IP address returned is the one that is used | ||
2118 | 451 | until xinetd is restarted. | ||
2119 | 452 | The "server" attribute is not required when this option is specified. If | ||
2120 | 453 | the "server" attribute is specified, this attribute takes priority. | ||
2121 | 454 | .TP | ||
2122 | 455 | .B bind | ||
2123 | 456 | Allows a service to be bound to a specific interface on the machine. | ||
2124 | 457 | This means you can have a telnet server listening on a local, secured | ||
2125 | 458 | interface, and not on the external interface. Or one port on one interface | ||
2126 | 459 | can do something, while the same port on a different interface can do | ||
2127 | 460 | something completely different. Syntax: bind = (ip address of interface). | ||
2128 | 461 | .TP | ||
2129 | 462 | .B interface | ||
2130 | 463 | Synonym for bind. | ||
2131 | 464 | .TP | ||
2132 | 465 | .B banner | ||
2133 | 466 | Takes the name of a file to be splatted at the remote host when a | ||
2134 | 467 | connection to that service is established. This banner is printed | ||
2135 | 468 | regardless of access control. It should *always* be printed when | ||
2136 | 469 | a connection has been made. \fBxinetd\fP outputs the file as-is, | ||
2137 | 470 | so you must ensure the file is correctly formatted for the service's | ||
2138 | 471 | protocol. In paticular, if the protocol requires CR-LF pairs for line | ||
2139 | 472 | termination, you must supply them. | ||
2140 | 473 | .TP | ||
2141 | 474 | .B banner_success | ||
2142 | 475 | Takes the name of a file to be splatted at the remote host when a | ||
2143 | 476 | connection to that service is granted. This banner is printed | ||
2144 | 477 | as soon as access is granted for the service. \fBxinetd\fP outputs the | ||
2145 | 478 | file as-is, so you must ensure the file is correctly formatted for | ||
2146 | 479 | the service's protocol. In paticular, if the protocol requires CR-LF | ||
2147 | 480 | pairs for line termination, you must supply them. | ||
2148 | 481 | .TP | ||
2149 | 482 | .B banner_fail | ||
2150 | 483 | Takes the name of a file to be splatted at the remote host when a | ||
2151 | 484 | connection to that service is denied. This banner is printed | ||
2152 | 485 | immediately upon denial of access. This is useful for informing | ||
2153 | 486 | your users that they are doing something bad and they shouldn't be | ||
2154 | 487 | doing it anymore. \fBxinetd\fP outputs the file as-is, | ||
2155 | 488 | so you must ensure the file is correctly formatted for the service's | ||
2156 | 489 | protocol. In paticular, if the protocol requires CR-LF pairs for line | ||
2157 | 490 | termination, you must supply them. | ||
2158 | 491 | .TP | ||
2159 | 492 | .B per_source | ||
2160 | 493 | Takes an integer or "UNLIMITED" as an argument. This specifies the | ||
2161 | 494 | maximum instances of this service per source IP address. This can | ||
2162 | 495 | also be specified in the defaults section. | ||
2163 | 496 | .TP | ||
2164 | 497 | .B cps | ||
2165 | 498 | Limits the rate of incoming connections. Takes two arguments. | ||
2166 | 499 | The first argument is the number of connections per second to handle. | ||
2167 | 500 | If the rate of incoming connections is higher than this, the service | ||
2168 | 501 | will be temporarily disabled. The second argument is the number of | ||
2169 | 502 | seconds to wait before re-enabling the service after it has been disabled. | ||
2170 | 503 | The default for this setting is 50 incoming connections and the interval | ||
2171 | 504 | is 10 seconds. | ||
2172 | 505 | .TP | ||
2173 | 506 | .B max_load | ||
2174 | 507 | Takes a floating point value as the load at which the service will | ||
2175 | 508 | stop accepting connections. For example: 2 or 2.5. The service | ||
2176 | 509 | will stop accepting connections at this load. This is the one minute | ||
2177 | 510 | load average. This is an OS dependent feature, and currently only | ||
2178 | 511 | Linux, Solaris, and FreeBSD are supported for this. This feature is | ||
2179 | 512 | only avaliable if xinetd was configured with the -with-loadavg option. | ||
2180 | 513 | .TP | ||
2181 | 514 | .B groups | ||
2182 | 515 | Takes either "yes" or "no". If the groups attribute is set to | ||
2183 | 516 | "yes", then the server is executed with access to the groups that the | ||
2184 | 517 | server's effective UID has access to. Alternatively, if the \fBgroup\fP | ||
2185 | 518 | attribute is set, the server is executed with access to the groups | ||
2186 | 519 | specified. If the groups attribute is set | ||
2187 | 520 | to "no", then the server runs with no supplementary groups. This | ||
2188 | 521 | attribute must be set to "yes" for many BSD systems. This attribute | ||
2189 | 522 | can be set in the defaults section as well. | ||
2190 | 523 | .TP | ||
2191 | 524 | .B mdns | ||
2192 | 525 | Takes either "yes" or "no". On systems that support mdns registration | ||
2193 | 526 | of services (currently only Mac OS X), this will enable or disable | ||
2194 | 527 | registration of the service. This defaults to "yes". | ||
2195 | 528 | .TP | ||
2196 | 529 | .B umask | ||
2197 | 530 | Sets the inherited umask for the service. Expects an octal value. | ||
2198 | 531 | This option may be set in the "defaults" section to set a umask | ||
2199 | 532 | for all services. xinetd sets its own umask to the previous umask | ||
2200 | 533 | OR'd with 022. This is the umask that will be inherited by all | ||
2201 | 534 | child processes if the umask option is not used. | ||
2202 | 535 | .TP | ||
2203 | 536 | .B enabled | ||
2204 | 537 | Takes a list of service ID's to enable. This will enable only the | ||
2205 | 538 | services listed as arguments to this attribute; the rest will be | ||
2206 | 539 | disabled. If you have 2 ftp services, you will need to list both of | ||
2207 | 540 | their ID's and not just ftp. (ftp is the service name, not the ID. It | ||
2208 | 541 | might accidentally be the ID, but you better check.) Note that the | ||
2209 | 542 | service "disable" attribute and "DISABLE" flag can prevent a service | ||
2210 | 543 | from being enabled despite being listed in this attribute. | ||
2211 | 544 | .TP | ||
2212 | 545 | .B include | ||
2213 | 546 | Takes a filename in the form of "include /etc/xinetd/service". | ||
2214 | 547 | The file is then parsed as a new configuration file. It is not | ||
2215 | 548 | the same thing as pasting the file into xinetd.conf where the | ||
2216 | 549 | include directive is given. The included file must be in the | ||
2217 | 550 | same form as xinetd.conf. This may not be specified from within | ||
2218 | 551 | a service. It must be specified outside a service declaration. | ||
2219 | 552 | .TP | ||
2220 | 553 | .B includedir | ||
2221 | 554 | Takes a directory name in the form of "includedir /etc/xinetd.d". | ||
2222 | 555 | Every file inside that directory, excluding files with names containing | ||
2223 | 556 | a dot ('.') or ending with a tilde ('~'), will be parsed as xinetd | ||
2224 | 557 | configuration files. The files will be parsed in alphabetical order | ||
2225 | 558 | according to the C locale. This allows you to specify services one | ||
2226 | 559 | per file within a directory. The | ||
2227 | 560 | .B includedir | ||
2228 | 561 | directive may not be specified from within a service declaration. | ||
2229 | 562 | .TP | ||
2230 | 563 | .B rlimit_as | ||
2231 | 564 | Sets the Address Space resource limit for the service. One parameter | ||
2232 | 565 | is required, which is either a positive integer representing the number | ||
2233 | 566 | of bytes to set the limit to (K or M may be used to specify | ||
2234 | 567 | kilobytes/megabytes) or "UNLIMITED". Due to the way Linux's libc malloc | ||
2235 | 568 | is implemented, it is more useful to set this limit than rlimit_data, | ||
2236 | 569 | rlimit_rss and rlimit_stack. This resource limit is only implemented on | ||
2237 | 570 | Linux systems. | ||
2238 | 571 | .TP | ||
2239 | 572 | .B rlimit_cpu | ||
2240 | 573 | Sets the maximum number of CPU seconds that the service may use. | ||
2241 | 574 | One parameter is required, which is either a positive integer representing | ||
2242 | 575 | the number of CPU seconds limit to, or "UNLIMITED". | ||
2243 | 576 | .TP | ||
2244 | 577 | .B rlimit_data | ||
2245 | 578 | Sets the maximum data size resource limit for the service. | ||
2246 | 579 | One parameter is required, which is either a positive integer representing | ||
2247 | 580 | the number of bytes or "UNLIMITED". | ||
2248 | 581 | .TP | ||
2249 | 582 | .B rlimit_rss | ||
2250 | 583 | Sets the maximum resident set size limit for the service. Setting this | ||
2251 | 584 | value low will make the process a likely candidate for swapping out to | ||
2252 | 585 | disk when memory is low. | ||
2253 | 586 | One parameter is required, which is either a positive integer representing | ||
2254 | 587 | the number of bytes or "UNLIMITED". | ||
2255 | 588 | .TP | ||
2256 | 589 | .B rlimit_stack | ||
2257 | 590 | Set the maximum stack size limit for the service. | ||
2258 | 591 | One parameter is required, which is either a positive integer representing | ||
2259 | 592 | the number of bytes or "UNLIMITED". | ||
2260 | 593 | .TP | ||
2261 | 594 | .B deny_time | ||
2262 | 595 | Sets the time span that access to all services on all IP addresses are | ||
2263 | 596 | denied to someone that sets off the SENSOR. The unit of time is in minutes. | ||
2264 | 597 | Valid options are: FOREVER, NEVER, and a numeric value. FOREVER causes | ||
2265 | 598 | the IP address not to be purged until xinetd is restarted. NEVER has the | ||
2266 | 599 | effect of just logging the offending IP address. A typical time value would | ||
2267 | 600 | be 60 minutes. This should stop most DOS attacks while allowing IP addresses | ||
2268 | 601 | that come from a pool to be recycled for legitimate purposes. This option | ||
2269 | 602 | must be used in conjunction with the SENSOR flag. | ||
2270 | 603 | .LP | ||
2271 | 604 | You don't need to specify all of the above attributes for each service. | ||
2272 | 605 | The necessary attributes for a service are: | ||
2273 | 606 | .sp 1 | ||
2274 | 607 | .PD .1v | ||
2275 | 608 | .RS | ||
2276 | 609 | .TP 18 | ||
2277 | 610 | .B socket_type | ||
2278 | 611 | .TP | ||
2279 | 612 | .B user | ||
2280 | 613 | (non-\fIinternal\fP services only) | ||
2281 | 614 | .TP | ||
2282 | 615 | .B server | ||
2283 | 616 | (non-\fIinternal\fP services only) | ||
2284 | 617 | .TP | ||
2285 | 618 | .B wait | ||
2286 | 619 | .TP | ||
2287 | 620 | .B protocol | ||
2288 | 621 | (\fIRPC\fP and \fIunlisted\fP services only) | ||
2289 | 622 | .TP | ||
2290 | 623 | .B rpc_version | ||
2291 | 624 | (\fIRPC\fP services only) | ||
2292 | 625 | .TP | ||
2293 | 626 | .B rpc_number | ||
2294 | 627 | (\fIunlisted\fP RPC services only) | ||
2295 | 628 | .TP | ||
2296 | 629 | .B port | ||
2297 | 630 | (\fIunlisted\fP non-RPC services only) | ||
2298 | 631 | .RE | ||
2299 | 632 | .PD | ||
2300 | 633 | .LP | ||
2301 | 634 | The following attributes support all assignment operators: | ||
2302 | 635 | .sp 1 | ||
2303 | 636 | .PD .1v | ||
2304 | 637 | .RS | ||
2305 | 638 | .TP 18 | ||
2306 | 639 | .B only_from | ||
2307 | 640 | .TP | ||
2308 | 641 | .B no_access | ||
2309 | 642 | .TP | ||
2310 | 643 | .B log_on_success | ||
2311 | 644 | .TP | ||
2312 | 645 | .B log_on_failure | ||
2313 | 646 | .TP | ||
2314 | 647 | .B passenv | ||
2315 | 648 | .TP | ||
2316 | 649 | .B env | ||
2317 | 650 | (does not support the | ||
2318 | 651 | .B '-=' | ||
2319 | 652 | operator) | ||
2320 | 653 | .RE | ||
2321 | 654 | .PD | ||
2322 | 655 | .LP | ||
2323 | 656 | These attributes can also appear more than once in a service entry. | ||
2324 | 657 | The remaining attributes support only the | ||
2325 | 658 | .B '=' | ||
2326 | 659 | operator and can appear at most once in a service entry. | ||
2327 | 660 | .LP | ||
2328 | 661 | The configuration file may also contain a single defaults entry | ||
2329 | 662 | that has the form | ||
2330 | 663 | .LP | ||
2331 | 664 | .RS | ||
2332 | 665 | .nf | ||
2333 | 666 | .ft B | ||
2334 | 667 | defaults | ||
2335 | 668 | { | ||
2336 | 669 | .RS | ||
2337 | 670 | .ft B | ||
2338 | 671 | <attribute> = <value> <value> ... | ||
2339 | 672 | .I "..." | ||
2340 | 673 | .RE | ||
2341 | 674 | .ft B | ||
2342 | 675 | } | ||
2343 | 676 | .ft R | ||
2344 | 677 | .fi | ||
2345 | 678 | .RE | ||
2346 | 679 | .LP | ||
2347 | 680 | This entry provides default attribute values for service entries that | ||
2348 | 681 | don't specify those attributes. Possible default attributes: | ||
2349 | 682 | .sp 1 | ||
2350 | 683 | .PD .1v | ||
2351 | 684 | .RS | ||
2352 | 685 | .TP 18 | ||
2353 | 686 | .B log_type | ||
2354 | 687 | (cumulative effect) | ||
2355 | 688 | .TP | ||
2356 | 689 | .B bind | ||
2357 | 690 | .TP | ||
2358 | 691 | .B per_source | ||
2359 | 692 | .TP | ||
2360 | 693 | .B umask | ||
2361 | 694 | .TP | ||
2362 | 695 | .B log_on_success | ||
2363 | 696 | (cumulative effect) | ||
2364 | 697 | .TP | ||
2365 | 698 | .B log_on_failure | ||
2366 | 699 | (cumulative effect) | ||
2367 | 700 | .TP | ||
2368 | 701 | .B only_from | ||
2369 | 702 | (cumulative effect) | ||
2370 | 703 | .TP | ||
2371 | 704 | .B no_access | ||
2372 | 705 | (cumulative effect) | ||
2373 | 706 | .TP | ||
2374 | 707 | .B passenv | ||
2375 | 708 | (cumulative effect) | ||
2376 | 709 | .TP | ||
2377 | 710 | .B instances | ||
2378 | 711 | .TP | ||
2379 | 712 | .B disabled | ||
2380 | 713 | (cumulative effect) | ||
2381 | 714 | .TP | ||
2382 | 715 | .B enabled | ||
2383 | 716 | (cumulative effect) | ||
2384 | 717 | .TP | ||
2385 | 718 | .B banner | ||
2386 | 719 | .TP | ||
2387 | 720 | .B banner_success | ||
2388 | 721 | .TP | ||
2389 | 722 | .B banner_fail | ||
2390 | 723 | .TP | ||
2391 | 724 | .B per_source | ||
2392 | 725 | .TP | ||
2393 | 726 | .B groups | ||
2394 | 727 | .TP | ||
2395 | 728 | .B cps | ||
2396 | 729 | .TP | ||
2397 | 730 | .B max_load | ||
2398 | 731 | .TP | ||
2399 | 732 | .RE | ||
2400 | 733 | .PD | ||
2401 | 734 | .LP | ||
2402 | 735 | Attributes with a cumulative effect can be specified multiple times | ||
2403 | 736 | with the values specified each time accumulating (i.e. '=' does | ||
2404 | 737 | the same thing as '+='). | ||
2405 | 738 | With the exception of | ||
2406 | 739 | .I disabled | ||
2407 | 740 | they all have the same meaning as if they were specified in a service entry. | ||
2408 | 741 | .I disabled | ||
2409 | 742 | determines services that are disabled even if they have entries in | ||
2410 | 743 | the configuration file. This allows for quick reconfiguration by | ||
2411 | 744 | specifying disabled services with the | ||
2412 | 745 | .I disabled | ||
2413 | 746 | attribute instead of commenting them out. | ||
2414 | 747 | The value of this attribute is a list of space separated service ids. | ||
2415 | 748 | .I enabled | ||
2416 | 749 | has the same properties as disabled. The difference being that | ||
2417 | 750 | .I enabled | ||
2418 | 751 | is a list of which services are to be enabled. If | ||
2419 | 752 | .I enabled | ||
2420 | 753 | is specified, only the services specified are available. If | ||
2421 | 754 | .I enabled | ||
2422 | 755 | is not specified, all services are assumed to be enabled, | ||
2423 | 756 | except those listed in | ||
2424 | 757 | .I disabled. | ||
2425 | 758 | |||
2426 | 759 | .\" *********************** INTERNAL SERVICES **************************** | ||
2427 | 760 | .SH "INTERNAL SERVICES" | ||
2428 | 761 | .LP | ||
2429 | 762 | \fBxinetd\fP provides the following services internally (both | ||
2430 | 763 | stream and datagram based): | ||
2431 | 764 | .I echo, | ||
2432 | 765 | .I time, | ||
2433 | 766 | .I daytime, | ||
2434 | 767 | .I chargen, | ||
2435 | 768 | and | ||
2436 | 769 | .I discard. | ||
2437 | 770 | These services are under the same access restrictions as all other | ||
2438 | 771 | services except for the ones that don't require \fBxinetd\fP to fork | ||
2439 | 772 | another process for them. Those ones (\fItime\fP, \fIdaytime\fP, | ||
2440 | 773 | and the datagram-based \fIecho\fP, \fIchargen\fP, and \fIdiscard\fP) | ||
2441 | 774 | have no limitation in the number of | ||
2442 | 775 | .B instances. | ||
2443 | 776 | .LP | ||
2444 | 777 | .\" *********************** TCPMUX Services **************************** | ||
2445 | 778 | .SH "TCPMUX Services" | ||
2446 | 779 | .LP | ||
2447 | 780 | \fBxinetd\fP supports TCPMUX services that conform to RFC 1078. These services | ||
2448 | 781 | may not have a well-known port associated with them, and can be accessed via | ||
2449 | 782 | the TCPMUX well-known port. | ||
2450 | 783 | .LP | ||
2451 | 784 | For each service that is to be accessed via TCPMUX, a service entry in | ||
2452 | 785 | \fB/etc/xinetd.conf\fP or in a configuration file in an \fBincludedir\fP | ||
2453 | 786 | directory must exist. | ||
2454 | 787 | .LP | ||
2455 | 788 | The \fIservice_name\fP field (as defined above for each service in any | ||
2456 | 789 | \fBxinetd\fP | ||
2457 | 790 | configuration file) must be identical to the string that is passed (according | ||
2458 | 791 | to RFC 1078 protocol) to \fBxinetd\fP when the remote service requestor first | ||
2459 | 792 | makes the connection on the TCPMUX well-known port. Private protocols should | ||
2460 | 793 | use a service name that has a high probability of being unique. One way is to | ||
2461 | 794 | prepend the service name with some form of organization ID. | ||
2462 | 795 | .LP | ||
2463 | 796 | The \fItype\fP field can be either \fBTCPMUX\fP or \fBTCPMUXPLUS\fP. If the | ||
2464 | 797 | type is \fBTCPMUXPLUS\fP, \fBxinetd\fP will handle the initial protocol | ||
2465 | 798 | handshake (as defined in RFC 1078) with the calling process before initiating | ||
2466 | 799 | the service. If the type is \fBTCPMUX\fP, the server that is started is | ||
2467 | 800 | responsible for performing the handshake. | ||
2468 | 801 | .LP | ||
2469 | 802 | The \fItype\fP field should also include \fBUNLISTED\fP if the service is | ||
2470 | 803 | not listed in a standard system file | ||
2471 | 804 | (like | ||
2472 | 805 | .I /etc/rpc | ||
2473 | 806 | for RPC services, or | ||
2474 | 807 | .I /etc/services | ||
2475 | 808 | for non-RPC services). | ||
2476 | 809 | .LP | ||
2477 | 810 | The \fIsocket_type\fP for these services must be \fBstream\fP, and the | ||
2478 | 811 | \fIprotocol\fP must be \fBtcp\fP. | ||
2479 | 812 | .LP | ||
2480 | 813 | Following is a sample TCPMUX service configuration: | ||
2481 | 814 | .PD .1v | ||
2482 | 815 | .RS | ||
2483 | 816 | .nf | ||
2484 | 817 | |||
2485 | 818 | service myorg_server | ||
2486 | 819 | { | ||
2487 | 820 | .RS | ||
2488 | 821 | .IP disable 20 | ||
2489 | 822 | = no | ||
2490 | 823 | .IP type | ||
2491 | 824 | = TCPMUX | ||
2492 | 825 | .IP socket_type | ||
2493 | 826 | = stream | ||
2494 | 827 | .IP protocol | ||
2495 | 828 | = tcp | ||
2496 | 829 | .IP wait | ||
2497 | 830 | = no | ||
2498 | 831 | .IP user | ||
2499 | 832 | = root | ||
2500 | 833 | .IP server | ||
2501 | 834 | = /usr/etc/my_server_exec | ||
2502 | 835 | .RE | ||
2503 | 836 | } | ||
2504 | 837 | .fi | ||
2505 | 838 | .RE | ||
2506 | 839 | .PD | ||
2507 | 840 | .LP | ||
2508 | 841 | Besides a service entry for each service that can be accessed | ||
2509 | 842 | via the TCPMUX well-known port, a service entry for TCPMUX itself | ||
2510 | 843 | must also be included in the \fBxinetd\fP configuration. Consider the following | ||
2511 | 844 | sample: | ||
2512 | 845 | .PD .1v | ||
2513 | 846 | .RS | ||
2514 | 847 | .nf | ||
2515 | 848 | |||
2516 | 849 | service tcpmux | ||
2517 | 850 | { | ||
2518 | 851 | .RS | ||
2519 | 852 | .IP type 20 | ||
2520 | 853 | = INTERNAL | ||
2521 | 854 | .IP id | ||
2522 | 855 | = tcpmux | ||
2523 | 856 | .IP socket_type | ||
2524 | 857 | = stream | ||
2525 | 858 | .IP protocol | ||
2526 | 859 | = tcp | ||
2527 | 860 | .IP user | ||
2528 | 861 | = root | ||
2529 | 862 | .IP wait | ||
2530 | 863 | = no | ||
2531 | 864 | .RE | ||
2532 | 865 | } | ||
2533 | 866 | .fi | ||
2534 | 867 | .RE | ||
2535 | 868 | .PD | ||
2536 | 869 | |||
2537 | 870 | |||
2538 | 871 | |||
2539 | 872 | .\" *********************** NOTES **************************** | ||
2540 | 873 | .SH NOTES | ||
2541 | 874 | .IP 1. 4 | ||
2542 | 875 | The following service attributes \fIcannot\fP be changed on reconfiguration: | ||
2543 | 876 | .B socket_type, | ||
2544 | 877 | .B wait, | ||
2545 | 878 | .B protocol, | ||
2546 | 879 | .B type. | ||
2547 | 880 | .IP 2. | ||
2548 | 881 | When the attributes | ||
2549 | 882 | .I only_from | ||
2550 | 883 | and | ||
2551 | 884 | .I no_access | ||
2552 | 885 | are not specified for a service (either directly or via \fIdefaults\fP) | ||
2553 | 886 | the address check is considered successful (i.e. access will not be | ||
2554 | 887 | denied). | ||
2555 | 888 | .IP 3. | ||
2556 | 889 | The address check is based on the IP address of the remote host and | ||
2557 | 890 | not on its domain address. We do this so that we can avoid | ||
2558 | 891 | remote name lookups which may take a long time (since | ||
2559 | 892 | .B xinetd | ||
2560 | 893 | is single-threaded, a name lookup will prevent the daemon from | ||
2561 | 894 | accepting any other requests until the lookup is resolved). | ||
2562 | 895 | The down side of this scheme is that if the IP address of a remote | ||
2563 | 896 | host changes, then access to that host may be denied until | ||
2564 | 897 | .B xinetd | ||
2565 | 898 | is reconfigured. | ||
2566 | 899 | Whether access is actually denied or not will depend on whether the | ||
2567 | 900 | new host IP address is among those allowed access. For example, if | ||
2568 | 901 | the IP address of a host changes from 1.2.3.4 to 1.2.3.5 and | ||
2569 | 902 | only_from is specified as 1.2.3.0 then access will not be denied. | ||
2570 | 903 | .IP 4. | ||
2571 | 904 | If the | ||
2572 | 905 | .B USERID | ||
2573 | 906 | log option is specified and the remote host either does not run an | ||
2574 | 907 | identification server or the server sends back a bad reply, | ||
2575 | 908 | access will not be denied unless the | ||
2576 | 909 | .I IDONLY | ||
2577 | 910 | service flag is used. | ||
2578 | 911 | .IP 5. | ||
2579 | 912 | Interception works by forking a process which acts as a filter | ||
2580 | 913 | between the remote host(s) and the local server. | ||
2581 | 914 | This obviously has a performance impact so | ||
2582 | 915 | it is up to you to make the compromise between security and performance | ||
2583 | 916 | for each service. | ||
2584 | 917 | The following tables show the overhead of interception. | ||
2585 | 918 | The first table shows the time overhead-per-datagram for a UDP-based service | ||
2586 | 919 | using various datagram sizes. | ||
2587 | 920 | For TCP-based services we measured the bandwidth reduction | ||
2588 | 921 | because of interception while sending | ||
2589 | 922 | a certain amount of data from client to server (the time overhead should | ||
2590 | 923 | the same as for UDP-based services but it is "paid" only by the first | ||
2591 | 924 | packet of a continuous data transmission). | ||
2592 | 925 | The amount of data is given | ||
2593 | 926 | in the table as \fIsystem_calls\fPx\fIdata_sent_per_call\fP, i.e. | ||
2594 | 927 | each | ||
2595 | 928 | .I "send(2)" | ||
2596 | 929 | system call transferred so many bytes of data. | ||
2597 | 930 | The bandwidth reduction is given in terms of bytes per second and as | ||
2598 | 931 | a percentage of the bandwidth when interception is not performed. | ||
2599 | 932 | All measurements were done on a SparcStation IPC running SunOS 4.1. | ||
2600 | 933 | .sp 1 | ||
2601 | 934 | .RS | ||
2602 | 935 | .RS | ||
2603 | 936 | .PD .1v | ||
2604 | 937 | .TP 25 | ||
2605 | 938 | Datagram size (bytes) | ||
2606 | 939 | Latency (msec) | ||
2607 | 940 | .TP | ||
2608 | 941 | --------------------- | ||
2609 | 942 | -------------- | ||
2610 | 943 | .TP | ||
2611 | 944 | 64 | ||
2612 | 945 | 1.19 | ||
2613 | 946 | .TP | ||
2614 | 947 | 256 | ||
2615 | 948 | 1.51 | ||
2616 | 949 | .TP | ||
2617 | 950 | 1024 | ||
2618 | 951 | 1.51 | ||
2619 | 952 | .TP | ||
2620 | 953 | 4096 | ||
2621 | 954 | 3.58 | ||
2622 | 955 | .sp 2 | ||
2623 | 956 | .TP | ||
2624 | 957 | Bytes sent | ||
2625 | 958 | Bandwidth reduction | ||
2626 | 959 | .TP | ||
2627 | 960 | ---------- | ||
2628 | 961 | ------------------- | ||
2629 | 962 | .TP | ||
2630 | 963 | 10000x64 | ||
2631 | 964 | 941 (1.2%) | ||
2632 | 965 | .TP | ||
2633 | 966 | 10000x256 | ||
2634 | 967 | 4,231 (1.8%) | ||
2635 | 968 | .TP | ||
2636 | 969 | 10000x1024 | ||
2637 | 970 | 319,300 (39.5%) | ||
2638 | 971 | .TP | ||
2639 | 972 | 10000x4096 | ||
2640 | 973 | 824,461 (62.1%) | ||
2641 | 974 | .RE | ||
2642 | 975 | .RE | ||
2643 | 976 | .sp 1 | ||
2644 | 977 | .\" *********************** EXAMPLE **************************** | ||
2645 | 978 | .SH EXAMPLE | ||
2646 | 979 | .LP | ||
2647 | 980 | .PD .1v | ||
2648 | 981 | .RS | ||
2649 | 982 | .nf | ||
2650 | 983 | # | ||
2651 | 984 | # Sample configuration file for xinetd | ||
2652 | 985 | # | ||
2653 | 986 | |||
2654 | 987 | defaults | ||
2655 | 988 | { | ||
2656 | 989 | .RS | ||
2657 | 990 | .IP log_type 20 | ||
2658 | 991 | = FILE /var/log/servicelog | ||
2659 | 992 | .IP log_on_success | ||
2660 | 993 | = PID | ||
2661 | 994 | .IP log_on_failure | ||
2662 | 995 | = HOST | ||
2663 | 996 | .IP only_from | ||
2664 | 997 | = 128.138.193.0 128.138.204.0 | ||
2665 | 998 | .IP only_from | ||
2666 | 999 | = 128.138.252.1 | ||
2667 | 1000 | .IP instances | ||
2668 | 1001 | = 10 | ||
2669 | 1002 | .IP disabled | ||
2670 | 1003 | = rstatd | ||
2671 | 1004 | .RE | ||
2672 | 1005 | } | ||
2673 | 1006 | |||
2674 | 1007 | # | ||
2675 | 1008 | # Note 1: the protocol attribute is not required | ||
2676 | 1009 | # Note 2: the instances attribute overrides the default | ||
2677 | 1010 | # | ||
2678 | 1011 | service login | ||
2679 | 1012 | { | ||
2680 | 1013 | .RS | ||
2681 | 1014 | .IP socket_type 20 | ||
2682 | 1015 | = stream | ||
2683 | 1016 | .IP protocol | ||
2684 | 1017 | = tcp | ||
2685 | 1018 | .IP wait | ||
2686 | 1019 | = no | ||
2687 | 1020 | .IP user | ||
2688 | 1021 | = root | ||
2689 | 1022 | .IP server | ||
2690 | 1023 | = /usr/etc/in.rlogind | ||
2691 | 1024 | .IP instances | ||
2692 | 1025 | = UNLIMITED | ||
2693 | 1026 | .RE | ||
2694 | 1027 | } | ||
2695 | 1028 | |||
2696 | 1029 | # | ||
2697 | 1030 | # Note 1: the instances attribute overrides the default | ||
2698 | 1031 | # Note 2: the log_on_success flags are augmented | ||
2699 | 1032 | # | ||
2700 | 1033 | service shell | ||
2701 | 1034 | { | ||
2702 | 1035 | .RS | ||
2703 | 1036 | .IP socket_type 20 | ||
2704 | 1037 | = stream | ||
2705 | 1038 | .IP wait | ||
2706 | 1039 | = no | ||
2707 | 1040 | .IP user | ||
2708 | 1041 | = root | ||
2709 | 1042 | .IP instances | ||
2710 | 1043 | = UNLIMITED | ||
2711 | 1044 | .IP server | ||
2712 | 1045 | = /usr/etc/in.rshd | ||
2713 | 1046 | .IP log_on_success | ||
2714 | 1047 | += HOST | ||
2715 | 1048 | .RE | ||
2716 | 1049 | } | ||
2717 | 1050 | |||
2718 | 1051 | service ftp | ||
2719 | 1052 | { | ||
2720 | 1053 | .RS | ||
2721 | 1054 | .IP socket_type 20 | ||
2722 | 1055 | = stream | ||
2723 | 1056 | .IP wait | ||
2724 | 1057 | = no | ||
2725 | 1058 | .IP nice | ||
2726 | 1059 | = 10 | ||
2727 | 1060 | .IP user | ||
2728 | 1061 | = root | ||
2729 | 1062 | .IP server | ||
2730 | 1063 | = /usr/etc/in.ftpd | ||
2731 | 1064 | .IP server_args | ||
2732 | 1065 | = -l | ||
2733 | 1066 | .IP instances | ||
2734 | 1067 | = 4 | ||
2735 | 1068 | .IP log_on_success | ||
2736 | 1069 | += DURATION HOST USERID | ||
2737 | 1070 | .IP access_times | ||
2738 | 1071 | = 2:00-9:00 12:00-24:00 | ||
2739 | 1072 | .RE | ||
2740 | 1073 | } | ||
2741 | 1074 | |||
2742 | 1075 | # Limit telnet sessions to 8 Mbytes of memory and a total | ||
2743 | 1076 | # 20 CPU seconds for child processes. | ||
2744 | 1077 | service telnet | ||
2745 | 1078 | { | ||
2746 | 1079 | .RS | ||
2747 | 1080 | .IP socket_type 20 | ||
2748 | 1081 | = stream | ||
2749 | 1082 | .IP wait | ||
2750 | 1083 | = no | ||
2751 | 1084 | .IP nice | ||
2752 | 1085 | = 10 | ||
2753 | 1086 | .IP user | ||
2754 | 1087 | = root | ||
2755 | 1088 | .IP server | ||
2756 | 1089 | = /usr/etc/in.telnetd | ||
2757 | 1090 | .IP rlimit_as | ||
2758 | 1091 | = 8M | ||
2759 | 1092 | .IP rlimit_cpu | ||
2760 | 1093 | = 20 | ||
2761 | 1094 | .RE | ||
2762 | 1095 | } | ||
2763 | 1096 | |||
2764 | 1097 | # | ||
2765 | 1098 | # This entry and the next one specify internal services. Since | ||
2766 | 1099 | # this is the same service using a different socket type, the | ||
2767 | 1100 | # id attribute is used to uniquely identify each entry | ||
2768 | 1101 | # | ||
2769 | 1102 | service echo | ||
2770 | 1103 | { | ||
2771 | 1104 | .RS | ||
2772 | 1105 | .IP id 20 | ||
2773 | 1106 | = echo-stream | ||
2774 | 1107 | .IP type | ||
2775 | 1108 | = INTERNAL | ||
2776 | 1109 | .IP socket_type | ||
2777 | 1110 | = stream | ||
2778 | 1111 | .IP user | ||
2779 | 1112 | = root | ||
2780 | 1113 | .IP wait | ||
2781 | 1114 | = no | ||
2782 | 1115 | .RE | ||
2783 | 1116 | } | ||
2784 | 1117 | |||
2785 | 1118 | service echo | ||
2786 | 1119 | { | ||
2787 | 1120 | .RS | ||
2788 | 1121 | .IP id 20 | ||
2789 | 1122 | = echo-dgram | ||
2790 | 1123 | .IP type | ||
2791 | 1124 | = INTERNAL | ||
2792 | 1125 | .IP socket_type | ||
2793 | 1126 | = dgram | ||
2794 | 1127 | .IP user | ||
2795 | 1128 | = root | ||
2796 | 1129 | .IP wait | ||
2797 | 1130 | = no | ||
2798 | 1131 | .RE | ||
2799 | 1132 | } | ||
2800 | 1133 | |||
2801 | 1134 | # | ||
2802 | 1135 | # Sample RPC service | ||
2803 | 1136 | # | ||
2804 | 1137 | service rstatd | ||
2805 | 1138 | { | ||
2806 | 1139 | .RS | ||
2807 | 1140 | .IP type 20 | ||
2808 | 1141 | = RPC | ||
2809 | 1142 | .IP socket_type | ||
2810 | 1143 | = dgram | ||
2811 | 1144 | .IP protocol | ||
2812 | 1145 | = udp | ||
2813 | 1146 | .IP server | ||
2814 | 1147 | = /usr/etc/rpc.rstatd | ||
2815 | 1148 | .IP wait | ||
2816 | 1149 | = yes | ||
2817 | 1150 | .IP user | ||
2818 | 1151 | = root | ||
2819 | 1152 | .IP rpc_version | ||
2820 | 1153 | = 2-4 | ||
2821 | 1154 | .IP env | ||
2822 | 1155 | = LD_LIBRARY_PATH=/etc/securelib | ||
2823 | 1156 | .RE | ||
2824 | 1157 | } | ||
2825 | 1158 | |||
2826 | 1159 | # | ||
2827 | 1160 | # Sample unlisted service | ||
2828 | 1161 | # | ||
2829 | 1162 | service unlisted | ||
2830 | 1163 | { | ||
2831 | 1164 | .RS | ||
2832 | 1165 | .IP type 20 | ||
2833 | 1166 | = UNLISTED | ||
2834 | 1167 | .IP socket_type | ||
2835 | 1168 | = stream | ||
2836 | 1169 | .IP protocol | ||
2837 | 1170 | = tcp | ||
2838 | 1171 | .IP wait | ||
2839 | 1172 | = no | ||
2840 | 1173 | .IP server | ||
2841 | 1174 | = /home/user/some_server | ||
2842 | 1175 | .IP port | ||
2843 | 1176 | = 20020 | ||
2844 | 1177 | .RE | ||
2845 | 1178 | } | ||
2846 | 1179 | .RE | ||
2847 | 1180 | .PD | ||
2848 | 1181 | .\" *********************** SEE ALSO **************************** | ||
2849 | 1182 | .SH "SEE ALSO" | ||
2850 | 1183 | .I "xinetd(1L)," | ||
2851 | 1184 | .LP | ||
2852 | 1185 | .I "xinetd.log(5)" | ||
2853 | 1186 | .LP | ||
2854 | 1187 | Postel J., | ||
2855 | 1188 | .IR "Echo Protocol" , | ||
2856 | 1189 | RFC 862, | ||
2857 | 1190 | May 1983 | ||
2858 | 1191 | .LP | ||
2859 | 1192 | Postel J., | ||
2860 | 1193 | .IR "Discard Protocol" , | ||
2861 | 1194 | RFC 863, | ||
2862 | 1195 | May 1983 | ||
2863 | 1196 | .LP | ||
2864 | 1197 | Postel J., | ||
2865 | 1198 | .IR "Character Generator Protocol" , | ||
2866 | 1199 | RFC 864, | ||
2867 | 1200 | May 1983 | ||
2868 | 1201 | .LP | ||
2869 | 1202 | Postel J., | ||
2870 | 1203 | .IR "Daytime Protocol" , | ||
2871 | 1204 | RFC 867, | ||
2872 | 1205 | May 1983 | ||
2873 | 1206 | .LP | ||
2874 | 1207 | Postel J., Harrenstien K., | ||
2875 | 1208 | .IR "Time Protocol" , | ||
2876 | 1209 | RFC 868, | ||
2877 | 1210 | May 1983 | ||
2878 | 1211 | .LP | ||
2879 | 1212 | M. Lottor, | ||
2880 | 1213 | .IR "TCP Port Service Multiplexer (TCPMUX)" , | ||
2881 | 1214 | RFC 1078 | ||
2882 | 1215 | Nov 1988 | ||
2883 | 1216 | .LP | ||
2884 | 1217 | StJohns M., | ||
2885 | 1218 | .IR " Identification Protocol" , | ||
2886 | 1219 | RFC 1413, | ||
2887 | 1220 | February 1993 | ||
2888 | 1221 | .\" *********************** BUGS **************************** | ||
2889 | 1222 | .SH BUGS | ||
2890 | 1223 | .LP | ||
2891 | 1224 | If the | ||
2892 | 1225 | .B INTERCEPT | ||
2893 | 1226 | flag is not used, | ||
2894 | 1227 | access control on the address of the remote host is not performed when | ||
2895 | 1228 | \fIwait\fP is \fIyes\fP and \fIsocket_type\fP is \fIstream\fP. | ||
2896 | 1229 | .LP | ||
2897 | 1230 | The NOLIBWRAP flag is automatically turned on for RPC services whose | ||
2898 | 1231 | \fIsocket_type\fP is \fIstream\fP because xinetd cannot determine the | ||
2899 | 1232 | address of the remote host. | ||
2900 | 1233 | .LP | ||
2901 | 1234 | If the | ||
2902 | 1235 | .B INTERCEPT | ||
2903 | 1236 | flag is not used, | ||
2904 | 1237 | access control on the address of the remote host for | ||
2905 | 1238 | services where \fIwait\fP is \fIyes\fP and \fIsocket_type\fP is \fIdgram\fP | ||
2906 | 1239 | is performed only on the first packet. The server may then accept packets | ||
2907 | 1240 | from hosts not in the access control list. This can happen with | ||
2908 | 1241 | .B RPC | ||
2909 | 1242 | services. | ||
2910 | 1243 | .LP | ||
2911 | 1244 | There is no way to put a | ||
2912 | 1245 | .SM SPACE | ||
2913 | 1246 | in an environment variable. | ||
2914 | 1247 | .LP | ||
2915 | 1248 | When \fIwait\fP is \fIyes\fP and \fIsocket_type\fP is \fIstream\fP, | ||
2916 | 1249 | the socket passed to the server can only accept connections. | ||
2917 | 1250 | .LP | ||
2918 | 1251 | The | ||
2919 | 1252 | .B INTERCEPT | ||
2920 | 1253 | flag is not supported for internal services or multi-threaded services. | ||
2921 | 0 | 1254 | ||
2922 | === added file '.pc/applied-patches' | |||
2923 | --- .pc/applied-patches 1970-01-01 00:00:00 +0000 | |||
2924 | +++ .pc/applied-patches 2013-08-14 10:06:03 +0000 | |||
2925 | @@ -0,0 +1,3 @@ | |||
2926 | 1 | 000001-documentation_fixes | ||
2927 | 2 | 000004-Fix-xinetd.log.man-installation-path | ||
2928 | 3 | 000008-fix-manpages | ||
2929 | 0 | 4 | ||
2930 | === modified file 'CHANGELOG' | |||
2931 | --- CHANGELOG 2006-01-19 15:34:04 +0000 | |||
2932 | +++ CHANGELOG 2013-08-14 10:06:03 +0000 | |||
2933 | @@ -907,3 +907,28 @@ | |||
2934 | 907 | Based on a patch from Tony Ernst. | 907 | Based on a patch from Tony Ernst. |
2935 | 908 | Remove the <1024 port check for UDP builtin services. | 908 | Remove the <1024 port check for UDP builtin services. |
2936 | 909 | This check has been rather antiquated for years. | 909 | This check has been rather antiquated for years. |
2937 | 910 | |||
2938 | 911 | 2.3.15 | ||
2939 | 912 | If the address we're binding to is a multicast address, do the | ||
2940 | 913 | multicast join. | ||
2941 | 914 | Merge the Fedora patch to turn off libwrap processing on tcp | ||
2942 | 915 | rpc services. Patch xinetd-2.3.12-tcp_rpc.patch. | ||
2943 | 916 | Merge the Fedora patch to add labeled networking. | ||
2944 | 917 | Patch xinetd-2.3.14-label.patch r1.4. | ||
2945 | 918 | Merge the Fedora patch to fix getpeercon() for labeled networking | ||
2946 | 919 | in MLS environments. | ||
2947 | 920 | Patch xinetd-2.3.14-contextconf.patch r1.1 | ||
2948 | 921 | Merge the Fedora patch for int->ssize_t. | ||
2949 | 922 | Patch xinetd-2.3.14-ssize_t.patch r1.1 | ||
2950 | 923 | Some modifications to this patch were necessary. | ||
2951 | 924 | Change compiler flags, -Wconversion generates excessive and | ||
2952 | 925 | unnecessary warnings with gcc, particularly all | ||
2953 | 926 | cases of ntohs(uint16_t). | ||
2954 | 927 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6614 | ||
2955 | 928 | Additionally add -Wno-unused to prevent unnecessary | ||
2956 | 929 | warnings regarding unused function parameters when | ||
2957 | 930 | the function is a callback conforming to a standard | ||
2958 | 931 | interface. | ||
2959 | 932 | Change version number to 2.3.15devel, indicating an interim | ||
2960 | 933 | developmental source snapshot. | ||
2961 | 934 | Merge patch from Thomas Swan regarding CVE-2012-0862 | ||
2962 | 910 | 935 | ||
2963 | === modified file 'Makefile.in' | |||
2964 | --- Makefile.in 2007-11-29 09:29:55 +0000 | |||
2965 | +++ Makefile.in 2013-08-14 10:06:03 +0000 | |||
2966 | @@ -15,7 +15,7 @@ | |||
2967 | 15 | LIBS = -lsio -lstr -lmisc -lxlog -lportable -lpset @LIBS@ | 15 | LIBS = -lsio -lstr -lmisc -lxlog -lportable -lpset @LIBS@ |
2968 | 16 | 16 | ||
2969 | 17 | CFLAGS += @CFLAGS@ | 17 | CFLAGS += @CFLAGS@ |
2971 | 18 | DCFLAGS = -Wall -Wredundant-decls -W -Wfloat-equal -Wundef -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Wmissing-format-attribute -Wshadow -Wpointer-arith -g | 18 | DCFLAGS = -Wall -Wredundant-decls -W -Wfloat-equal -Wundef -Wcast-qual -Wwrite-strings -Wmissing-noreturn -Wmissing-format-attribute -Wshadow -Wpointer-arith -Wno-unused -g |
2972 | 19 | 19 | ||
2973 | 20 | 20 | ||
2974 | 21 | DEFS = @DEFS@ | 21 | DEFS = @DEFS@ |
2975 | @@ -80,7 +80,7 @@ | |||
2976 | 80 | $(INSTALL_CMD) -m 755 xinetd/itox $(DAEMONDIR) | 80 | $(INSTALL_CMD) -m 755 xinetd/itox $(DAEMONDIR) |
2977 | 81 | $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DAEMONDIR) | 81 | $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DAEMONDIR) |
2978 | 82 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(MANDIR)/man5/xinetd.conf.5 | 82 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(MANDIR)/man5/xinetd.conf.5 |
2980 | 83 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(MANDIR)/man8/xinetd.log.8 | 83 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(MANDIR)/man5/xinetd.log.5 |
2981 | 84 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(MANDIR)/man8/xinetd.8 | 84 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(MANDIR)/man8/xinetd.8 |
2982 | 85 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(MANDIR)/man8/itox.8 | 85 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(MANDIR)/man8/itox.8 |
2983 | 86 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.pl.8 | 86 | $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.pl.8 |
2984 | 87 | 87 | ||
2985 | === modified file 'config.guess' | |||
2986 | --- config.guess 2012-05-27 19:26:42 +0000 | |||
2987 | +++ config.guess 2013-08-14 10:06:03 +0000 | |||
2988 | @@ -1,10 +1,9 @@ | |||
2989 | 1 | #! /bin/sh | 1 | #! /bin/sh |
2990 | 2 | # Attempt to guess a canonical system name. | 2 | # Attempt to guess a canonical system name. |
2991 | 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
2994 | 4 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, | 4 | # 2000, 2001, 2002 Free Software Foundation, Inc. |
2993 | 5 | # 2011, 2012 Free Software Foundation, Inc. | ||
2995 | 6 | 5 | ||
2997 | 7 | timestamp='2012-02-10' | 6 | timestamp='2002-03-20' |
2998 | 8 | 7 | ||
2999 | 9 | # This file is free software; you can redistribute it and/or modify it | 8 | # This file is free software; you can redistribute it and/or modify it |
3000 | 10 | # under the terms of the GNU General Public License as published by | 9 | # under the terms of the GNU General Public License as published by |
3001 | @@ -17,24 +16,24 @@ | |||
3002 | 17 | # General Public License for more details. | 16 | # General Public License for more details. |
3003 | 18 | # | 17 | # |
3004 | 19 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
3006 | 20 | # along with this program; if not, see <http://www.gnu.org/licenses/>. | 19 | # along with this program; if not, write to the Free Software |
3007 | 20 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
3008 | 21 | # | 21 | # |
3009 | 22 | # As a special exception to the GNU General Public License, if you | 22 | # As a special exception to the GNU General Public License, if you |
3010 | 23 | # distribute this file as part of a program that contains a | 23 | # distribute this file as part of a program that contains a |
3011 | 24 | # configuration script generated by Autoconf, you may include it under | 24 | # configuration script generated by Autoconf, you may include it under |
3012 | 25 | # the same distribution terms that you use for the rest of that program. | 25 | # the same distribution terms that you use for the rest of that program. |
3013 | 26 | 26 | ||
3018 | 27 | 27 | # Originally written by Per Bothner <per@bothner.com>. | |
3019 | 28 | # Originally written by Per Bothner. Please send patches (context | 28 | # Please send patches to <config-patches@gnu.org>. Submit a context |
3020 | 29 | # diff format) to <config-patches@gnu.org> and include a ChangeLog | 29 | # diff and a properly formatted ChangeLog entry. |
3017 | 30 | # entry. | ||
3021 | 31 | # | 30 | # |
3022 | 32 | # This script attempts to guess a canonical system name similar to | 31 | # This script attempts to guess a canonical system name similar to |
3023 | 33 | # config.sub. If it succeeds, it prints the system name on stdout, and | 32 | # config.sub. If it succeeds, it prints the system name on stdout, and |
3024 | 34 | # exits with 0. Otherwise, it exits with 1. | 33 | # exits with 0. Otherwise, it exits with 1. |
3025 | 35 | # | 34 | # |
3028 | 36 | # You can get the latest version of this script from: | 35 | # The plan is that this can be called by configure scripts if you |
3029 | 37 | # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD | 36 | # don't specify an explicit build system type. |
3030 | 38 | 37 | ||
3031 | 39 | me=`echo "$0" | sed -e 's,.*/,,'` | 38 | me=`echo "$0" | sed -e 's,.*/,,'` |
3032 | 40 | 39 | ||
3033 | @@ -54,8 +53,7 @@ | |||
3034 | 54 | GNU config.guess ($timestamp) | 53 | GNU config.guess ($timestamp) |
3035 | 55 | 54 | ||
3036 | 56 | Originally written by Per Bothner. | 55 | Originally written by Per Bothner. |
3039 | 57 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, | 56 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 |
3038 | 58 | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 | ||
3040 | 59 | Free Software Foundation, Inc. | 57 | Free Software Foundation, Inc. |
3041 | 60 | 58 | ||
3042 | 61 | This is free software; see the source for copying conditions. There is NO | 59 | This is free software; see the source for copying conditions. There is NO |
3043 | @@ -68,11 +66,11 @@ | |||
3044 | 68 | while test $# -gt 0 ; do | 66 | while test $# -gt 0 ; do |
3045 | 69 | case $1 in | 67 | case $1 in |
3046 | 70 | --time-stamp | --time* | -t ) | 68 | --time-stamp | --time* | -t ) |
3048 | 71 | echo "$timestamp" ; exit ;; | 69 | echo "$timestamp" ; exit 0 ;; |
3049 | 72 | --version | -v ) | 70 | --version | -v ) |
3051 | 73 | echo "$version" ; exit ;; | 71 | echo "$version" ; exit 0 ;; |
3052 | 74 | --help | --h* | -h ) | 72 | --help | --h* | -h ) |
3054 | 75 | echo "$usage"; exit ;; | 73 | echo "$usage"; exit 0 ;; |
3055 | 76 | -- ) # Stop option processing | 74 | -- ) # Stop option processing |
3056 | 77 | shift; break ;; | 75 | shift; break ;; |
3057 | 78 | - ) # Use stdin as input. | 76 | - ) # Use stdin as input. |
3058 | @@ -90,42 +88,30 @@ | |||
3059 | 90 | exit 1 | 88 | exit 1 |
3060 | 91 | fi | 89 | fi |
3061 | 92 | 90 | ||
3069 | 93 | trap 'exit 1' 1 2 15 | 91 | |
3070 | 94 | 92 | dummy=dummy-$$ | |
3071 | 95 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a | 93 | trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 |
3072 | 96 | # compiler to aid in system detection is discouraged as it requires | 94 | |
3073 | 97 | # temporary files to be created and, as you can see below, it is a | 95 | # CC_FOR_BUILD -- compiler used by this script. |
3067 | 98 | # headache to deal with in a portable fashion. | ||
3068 | 99 | |||
3074 | 100 | # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still | 96 | # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still |
3075 | 101 | # use `HOST_CC' if defined, but it is deprecated. | 97 | # use `HOST_CC' if defined, but it is deprecated. |
3076 | 102 | 98 | ||
3091 | 103 | # Portable tmp directory creation inspired by the Autoconf team. | 99 | set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in |
3092 | 104 | 100 | ,,) echo "int dummy(){}" > $dummy.c ; | |
3079 | 105 | set_cc_for_build=' | ||
3080 | 106 | trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; | ||
3081 | 107 | trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; | ||
3082 | 108 | : ${TMPDIR=/tmp} ; | ||
3083 | 109 | { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || | ||
3084 | 110 | { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || | ||
3085 | 111 | { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || | ||
3086 | 112 | { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; | ||
3087 | 113 | dummy=$tmp/dummy ; | ||
3088 | 114 | tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; | ||
3089 | 115 | case $CC_FOR_BUILD,$HOST_CC,$CC in | ||
3090 | 116 | ,,) echo "int x;" > $dummy.c ; | ||
3093 | 117 | for c in cc gcc c89 c99 ; do | 101 | for c in cc gcc c89 c99 ; do |
3095 | 118 | if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then | 102 | ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; |
3096 | 103 | if test $? = 0 ; then | ||
3097 | 119 | CC_FOR_BUILD="$c"; break ; | 104 | CC_FOR_BUILD="$c"; break ; |
3098 | 120 | fi ; | 105 | fi ; |
3099 | 121 | done ; | 106 | done ; |
3100 | 107 | rm -f $dummy.c $dummy.o $dummy.rel ; | ||
3101 | 122 | if test x"$CC_FOR_BUILD" = x ; then | 108 | if test x"$CC_FOR_BUILD" = x ; then |
3102 | 123 | CC_FOR_BUILD=no_compiler_found ; | 109 | CC_FOR_BUILD=no_compiler_found ; |
3103 | 124 | fi | 110 | fi |
3104 | 125 | ;; | 111 | ;; |
3105 | 126 | ,,*) CC_FOR_BUILD=$CC ;; | 112 | ,,*) CC_FOR_BUILD=$CC ;; |
3106 | 127 | ,*,*) CC_FOR_BUILD=$HOST_CC ;; | 113 | ,*,*) CC_FOR_BUILD=$HOST_CC ;; |
3108 | 128 | esac ; set_cc_for_build= ;' | 114 | esac' |
3109 | 129 | 115 | ||
3110 | 130 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. | 116 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
3111 | 131 | # (ghazi@noc.rutgers.edu 1994-08-24) | 117 | # (ghazi@noc.rutgers.edu 1994-08-24) |
3112 | @@ -143,7 +129,7 @@ | |||
3113 | 143 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | 129 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
3114 | 144 | *:NetBSD:*:*) | 130 | *:NetBSD:*:*) |
3115 | 145 | # NetBSD (nbsd) targets should (where applicable) match one or | 131 | # NetBSD (nbsd) targets should (where applicable) match one or |
3117 | 146 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, | 132 | # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, |
3118 | 147 | # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently | 133 | # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently |
3119 | 148 | # switched to ELF, *-*-netbsd* would select the old | 134 | # switched to ELF, *-*-netbsd* would select the old |
3120 | 149 | # object file format. This provides both forward | 135 | # object file format. This provides both forward |
3121 | @@ -156,11 +142,9 @@ | |||
3122 | 156 | UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ | 142 | UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ |
3123 | 157 | /usr/sbin/$sysctl 2>/dev/null || echo unknown)` | 143 | /usr/sbin/$sysctl 2>/dev/null || echo unknown)` |
3124 | 158 | case "${UNAME_MACHINE_ARCH}" in | 144 | case "${UNAME_MACHINE_ARCH}" in |
3125 | 159 | armeb) machine=armeb-unknown ;; | ||
3126 | 160 | arm*) machine=arm-unknown ;; | 145 | arm*) machine=arm-unknown ;; |
3127 | 161 | sh3el) machine=shl-unknown ;; | 146 | sh3el) machine=shl-unknown ;; |
3128 | 162 | sh3eb) machine=sh-unknown ;; | 147 | sh3eb) machine=sh-unknown ;; |
3129 | 163 | sh5el) machine=sh5le-unknown ;; | ||
3130 | 164 | *) machine=${UNAME_MACHINE_ARCH}-unknown ;; | 148 | *) machine=${UNAME_MACHINE_ARCH}-unknown ;; |
3131 | 165 | esac | 149 | esac |
3132 | 166 | # The Operating System including object format, if it has switched | 150 | # The Operating System including object format, if it has switched |
3133 | @@ -169,7 +153,7 @@ | |||
3134 | 169 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) | 153 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
3135 | 170 | eval $set_cc_for_build | 154 | eval $set_cc_for_build |
3136 | 171 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | 155 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
3138 | 172 | | grep -q __ELF__ | 156 | | grep __ELF__ >/dev/null |
3139 | 173 | then | 157 | then |
3140 | 174 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). | 158 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). |
3141 | 175 | # Return netbsd for either. FIX? | 159 | # Return netbsd for either. FIX? |
3142 | @@ -179,135 +163,145 @@ | |||
3143 | 179 | fi | 163 | fi |
3144 | 180 | ;; | 164 | ;; |
3145 | 181 | *) | 165 | *) |
3147 | 182 | os=netbsd | 166 | os=netbsd |
3148 | 183 | ;; | 167 | ;; |
3149 | 184 | esac | 168 | esac |
3150 | 185 | # The OS release | 169 | # The OS release |
3163 | 186 | # Debian GNU/NetBSD machines have a different userland, and | 170 | release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` |
3152 | 187 | # thus, need a distinct triplet. However, they do not need | ||
3153 | 188 | # kernel version information, so it can be replaced with a | ||
3154 | 189 | # suitable tag, in the style of linux-gnu. | ||
3155 | 190 | case "${UNAME_VERSION}" in | ||
3156 | 191 | Debian*) | ||
3157 | 192 | release='-gnu' | ||
3158 | 193 | ;; | ||
3159 | 194 | *) | ||
3160 | 195 | release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | ||
3161 | 196 | ;; | ||
3162 | 197 | esac | ||
3164 | 198 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: | 171 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
3165 | 199 | # contains redundant information, the shorter form: | 172 | # contains redundant information, the shorter form: |
3166 | 200 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. | 173 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
3167 | 201 | echo "${machine}-${os}${release}" | 174 | echo "${machine}-${os}${release}" |
3169 | 202 | exit ;; | 175 | exit 0 ;; |
3170 | 176 | amiga:OpenBSD:*:*) | ||
3171 | 177 | echo m68k-unknown-openbsd${UNAME_RELEASE} | ||
3172 | 178 | exit 0 ;; | ||
3173 | 179 | arc:OpenBSD:*:*) | ||
3174 | 180 | echo mipsel-unknown-openbsd${UNAME_RELEASE} | ||
3175 | 181 | exit 0 ;; | ||
3176 | 182 | hp300:OpenBSD:*:*) | ||
3177 | 183 | echo m68k-unknown-openbsd${UNAME_RELEASE} | ||
3178 | 184 | exit 0 ;; | ||
3179 | 185 | mac68k:OpenBSD:*:*) | ||
3180 | 186 | echo m68k-unknown-openbsd${UNAME_RELEASE} | ||
3181 | 187 | exit 0 ;; | ||
3182 | 188 | macppc:OpenBSD:*:*) | ||
3183 | 189 | echo powerpc-unknown-openbsd${UNAME_RELEASE} | ||
3184 | 190 | exit 0 ;; | ||
3185 | 191 | mvme68k:OpenBSD:*:*) | ||
3186 | 192 | echo m68k-unknown-openbsd${UNAME_RELEASE} | ||
3187 | 193 | exit 0 ;; | ||
3188 | 194 | mvme88k:OpenBSD:*:*) | ||
3189 | 195 | echo m88k-unknown-openbsd${UNAME_RELEASE} | ||
3190 | 196 | exit 0 ;; | ||
3191 | 197 | mvmeppc:OpenBSD:*:*) | ||
3192 | 198 | echo powerpc-unknown-openbsd${UNAME_RELEASE} | ||
3193 | 199 | exit 0 ;; | ||
3194 | 200 | pmax:OpenBSD:*:*) | ||
3195 | 201 | echo mipsel-unknown-openbsd${UNAME_RELEASE} | ||
3196 | 202 | exit 0 ;; | ||
3197 | 203 | sgi:OpenBSD:*:*) | ||
3198 | 204 | echo mipseb-unknown-openbsd${UNAME_RELEASE} | ||
3199 | 205 | exit 0 ;; | ||
3200 | 206 | sun3:OpenBSD:*:*) | ||
3201 | 207 | echo m68k-unknown-openbsd${UNAME_RELEASE} | ||
3202 | 208 | exit 0 ;; | ||
3203 | 209 | wgrisc:OpenBSD:*:*) | ||
3204 | 210 | echo mipsel-unknown-openbsd${UNAME_RELEASE} | ||
3205 | 211 | exit 0 ;; | ||
3206 | 203 | *:OpenBSD:*:*) | 212 | *:OpenBSD:*:*) |
3222 | 204 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` | 213 | echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} |
3223 | 205 | echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} | 214 | exit 0 ;; |
3209 | 206 | exit ;; | ||
3210 | 207 | *:ekkoBSD:*:*) | ||
3211 | 208 | echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} | ||
3212 | 209 | exit ;; | ||
3213 | 210 | *:SolidBSD:*:*) | ||
3214 | 211 | echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} | ||
3215 | 212 | exit ;; | ||
3216 | 213 | macppc:MirBSD:*:*) | ||
3217 | 214 | echo powerpc-unknown-mirbsd${UNAME_RELEASE} | ||
3218 | 215 | exit ;; | ||
3219 | 216 | *:MirBSD:*:*) | ||
3220 | 217 | echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} | ||
3221 | 218 | exit ;; | ||
3224 | 219 | alpha:OSF1:*:*) | 215 | alpha:OSF1:*:*) |
3227 | 220 | case $UNAME_RELEASE in | 216 | if test $UNAME_RELEASE = "V4.0"; then |
3226 | 221 | *4.0) | ||
3228 | 222 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` | 217 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
3272 | 223 | ;; | 218 | fi |
3230 | 224 | *5.*) | ||
3231 | 225 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` | ||
3232 | 226 | ;; | ||
3233 | 227 | esac | ||
3234 | 228 | # According to Compaq, /usr/sbin/psrinfo has been available on | ||
3235 | 229 | # OSF/1 and Tru64 systems produced since 1995. I hope that | ||
3236 | 230 | # covers most systems running today. This code pipes the CPU | ||
3237 | 231 | # types through head -n 1, so we only detect the type of CPU 0. | ||
3238 | 232 | ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` | ||
3239 | 233 | case "$ALPHA_CPU_TYPE" in | ||
3240 | 234 | "EV4 (21064)") | ||
3241 | 235 | UNAME_MACHINE="alpha" ;; | ||
3242 | 236 | "EV4.5 (21064)") | ||
3243 | 237 | UNAME_MACHINE="alpha" ;; | ||
3244 | 238 | "LCA4 (21066/21068)") | ||
3245 | 239 | UNAME_MACHINE="alpha" ;; | ||
3246 | 240 | "EV5 (21164)") | ||
3247 | 241 | UNAME_MACHINE="alphaev5" ;; | ||
3248 | 242 | "EV5.6 (21164A)") | ||
3249 | 243 | UNAME_MACHINE="alphaev56" ;; | ||
3250 | 244 | "EV5.6 (21164PC)") | ||
3251 | 245 | UNAME_MACHINE="alphapca56" ;; | ||
3252 | 246 | "EV5.7 (21164PC)") | ||
3253 | 247 | UNAME_MACHINE="alphapca57" ;; | ||
3254 | 248 | "EV6 (21264)") | ||
3255 | 249 | UNAME_MACHINE="alphaev6" ;; | ||
3256 | 250 | "EV6.7 (21264A)") | ||
3257 | 251 | UNAME_MACHINE="alphaev67" ;; | ||
3258 | 252 | "EV6.8CB (21264C)") | ||
3259 | 253 | UNAME_MACHINE="alphaev68" ;; | ||
3260 | 254 | "EV6.8AL (21264B)") | ||
3261 | 255 | UNAME_MACHINE="alphaev68" ;; | ||
3262 | 256 | "EV6.8CX (21264D)") | ||
3263 | 257 | UNAME_MACHINE="alphaev68" ;; | ||
3264 | 258 | "EV6.9A (21264/EV69A)") | ||
3265 | 259 | UNAME_MACHINE="alphaev69" ;; | ||
3266 | 260 | "EV7 (21364)") | ||
3267 | 261 | UNAME_MACHINE="alphaev7" ;; | ||
3268 | 262 | "EV7.9 (21364A)") | ||
3269 | 263 | UNAME_MACHINE="alphaev79" ;; | ||
3270 | 264 | esac | ||
3271 | 265 | # A Pn.n version is a patched version. | ||
3273 | 266 | # A Vn.n version is a released version. | 219 | # A Vn.n version is a released version. |
3274 | 267 | # A Tn.n version is a released field test version. | 220 | # A Tn.n version is a released field test version. |
3275 | 268 | # A Xn.n version is an unreleased experimental baselevel. | 221 | # A Xn.n version is an unreleased experimental baselevel. |
3276 | 269 | # 1.2 uses "1.2" for uname -r. | 222 | # 1.2 uses "1.2" for uname -r. |
3282 | 270 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | 223 | cat <<EOF >$dummy.s |
3283 | 271 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | 224 | .data |
3284 | 272 | exitcode=$? | 225 | \$Lformat: |
3285 | 273 | trap '' 0 | 226 | .byte 37,100,45,37,120,10,0 # "%d-%x\n" |
3286 | 274 | exit $exitcode ;; | 227 | |
3287 | 228 | .text | ||
3288 | 229 | .globl main | ||
3289 | 230 | .align 4 | ||
3290 | 231 | .ent main | ||
3291 | 232 | main: | ||
3292 | 233 | .frame \$30,16,\$26,0 | ||
3293 | 234 | ldgp \$29,0(\$27) | ||
3294 | 235 | .prologue 1 | ||
3295 | 236 | .long 0x47e03d80 # implver \$0 | ||
3296 | 237 | lda \$2,-1 | ||
3297 | 238 | .long 0x47e20c21 # amask \$2,\$1 | ||
3298 | 239 | lda \$16,\$Lformat | ||
3299 | 240 | mov \$0,\$17 | ||
3300 | 241 | not \$1,\$18 | ||
3301 | 242 | jsr \$26,printf | ||
3302 | 243 | ldgp \$29,0(\$26) | ||
3303 | 244 | mov 0,\$16 | ||
3304 | 245 | jsr \$26,exit | ||
3305 | 246 | .end main | ||
3306 | 247 | EOF | ||
3307 | 248 | eval $set_cc_for_build | ||
3308 | 249 | $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null | ||
3309 | 250 | if test "$?" = 0 ; then | ||
3310 | 251 | case `./$dummy` in | ||
3311 | 252 | 0-0) | ||
3312 | 253 | UNAME_MACHINE="alpha" | ||
3313 | 254 | ;; | ||
3314 | 255 | 1-0) | ||
3315 | 256 | UNAME_MACHINE="alphaev5" | ||
3316 | 257 | ;; | ||
3317 | 258 | 1-1) | ||
3318 | 259 | UNAME_MACHINE="alphaev56" | ||
3319 | 260 | ;; | ||
3320 | 261 | 1-101) | ||
3321 | 262 | UNAME_MACHINE="alphapca56" | ||
3322 | 263 | ;; | ||
3323 | 264 | 2-303) | ||
3324 | 265 | UNAME_MACHINE="alphaev6" | ||
3325 | 266 | ;; | ||
3326 | 267 | 2-307) | ||
3327 | 268 | UNAME_MACHINE="alphaev67" | ||
3328 | 269 | ;; | ||
3329 | 270 | 2-1307) | ||
3330 | 271 | UNAME_MACHINE="alphaev68" | ||
3331 | 272 | ;; | ||
3332 | 273 | esac | ||
3333 | 274 | fi | ||
3334 | 275 | rm -f $dummy.s $dummy | ||
3335 | 276 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | ||
3336 | 277 | exit 0 ;; | ||
3337 | 275 | Alpha\ *:Windows_NT*:*) | 278 | Alpha\ *:Windows_NT*:*) |
3338 | 276 | # How do we know it's Interix rather than the generic POSIX subsystem? | 279 | # How do we know it's Interix rather than the generic POSIX subsystem? |
3339 | 277 | # Should we change UNAME_MACHINE based on the output of uname instead | 280 | # Should we change UNAME_MACHINE based on the output of uname instead |
3340 | 278 | # of the specific Alpha model? | 281 | # of the specific Alpha model? |
3341 | 279 | echo alpha-pc-interix | 282 | echo alpha-pc-interix |
3343 | 280 | exit ;; | 283 | exit 0 ;; |
3344 | 281 | 21064:Windows_NT:50:3) | 284 | 21064:Windows_NT:50:3) |
3345 | 282 | echo alpha-dec-winnt3.5 | 285 | echo alpha-dec-winnt3.5 |
3347 | 283 | exit ;; | 286 | exit 0 ;; |
3348 | 284 | Amiga*:UNIX_System_V:4.0:*) | 287 | Amiga*:UNIX_System_V:4.0:*) |
3349 | 285 | echo m68k-unknown-sysv4 | 288 | echo m68k-unknown-sysv4 |
3351 | 286 | exit ;; | 289 | exit 0;; |
3352 | 287 | *:[Aa]miga[Oo][Ss]:*:*) | 290 | *:[Aa]miga[Oo][Ss]:*:*) |
3353 | 288 | echo ${UNAME_MACHINE}-unknown-amigaos | 291 | echo ${UNAME_MACHINE}-unknown-amigaos |
3355 | 289 | exit ;; | 292 | exit 0 ;; |
3356 | 290 | *:[Mm]orph[Oo][Ss]:*:*) | 293 | *:[Mm]orph[Oo][Ss]:*:*) |
3357 | 291 | echo ${UNAME_MACHINE}-unknown-morphos | 294 | echo ${UNAME_MACHINE}-unknown-morphos |
3359 | 292 | exit ;; | 295 | exit 0 ;; |
3360 | 293 | *:OS/390:*:*) | 296 | *:OS/390:*:*) |
3361 | 294 | echo i370-ibm-openedition | 297 | echo i370-ibm-openedition |
3369 | 295 | exit ;; | 298 | exit 0 ;; |
3363 | 296 | *:z/VM:*:*) | ||
3364 | 297 | echo s390-ibm-zvmoe | ||
3365 | 298 | exit ;; | ||
3366 | 299 | *:OS400:*:*) | ||
3367 | 300 | echo powerpc-ibm-os400 | ||
3368 | 301 | exit ;; | ||
3370 | 302 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) | 299 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
3371 | 303 | echo arm-acorn-riscix${UNAME_RELEASE} | 300 | echo arm-acorn-riscix${UNAME_RELEASE} |
3376 | 304 | exit ;; | 301 | exit 0;; |
3373 | 305 | arm:riscos:*:*|arm:RISCOS:*:*) | ||
3374 | 306 | echo arm-unknown-riscos | ||
3375 | 307 | exit ;; | ||
3377 | 308 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) | 302 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
3378 | 309 | echo hppa1.1-hitachi-hiuxmpp | 303 | echo hppa1.1-hitachi-hiuxmpp |
3380 | 310 | exit ;; | 304 | exit 0;; |
3381 | 311 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) | 305 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
3382 | 312 | # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. | 306 | # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. |
3383 | 313 | if test "`(/bin/universe) 2>/dev/null`" = att ; then | 307 | if test "`(/bin/universe) 2>/dev/null`" = att ; then |
3384 | @@ -315,51 +309,25 @@ | |||
3385 | 315 | else | 309 | else |
3386 | 316 | echo pyramid-pyramid-bsd | 310 | echo pyramid-pyramid-bsd |
3387 | 317 | fi | 311 | fi |
3389 | 318 | exit ;; | 312 | exit 0 ;; |
3390 | 319 | NILE*:*:*:dcosx) | 313 | NILE*:*:*:dcosx) |
3391 | 320 | echo pyramid-pyramid-svr4 | 314 | echo pyramid-pyramid-svr4 |
3403 | 321 | exit ;; | 315 | exit 0 ;; |
3393 | 322 | DRS?6000:unix:4.0:6*) | ||
3394 | 323 | echo sparc-icl-nx6 | ||
3395 | 324 | exit ;; | ||
3396 | 325 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) | ||
3397 | 326 | case `/usr/bin/uname -p` in | ||
3398 | 327 | sparc) echo sparc-icl-nx7; exit ;; | ||
3399 | 328 | esac ;; | ||
3400 | 329 | s390x:SunOS:*:*) | ||
3401 | 330 | echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
3402 | 331 | exit ;; | ||
3404 | 332 | sun4H:SunOS:5.*:*) | 316 | sun4H:SunOS:5.*:*) |
3405 | 333 | echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | 317 | echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
3407 | 334 | exit ;; | 318 | exit 0 ;; |
3408 | 335 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) | 319 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
3409 | 336 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | 320 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
3430 | 337 | exit ;; | 321 | exit 0 ;; |
3431 | 338 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) | 322 | i86pc:SunOS:5.*:*) |
3432 | 339 | echo i386-pc-auroraux${UNAME_RELEASE} | 323 | echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
3433 | 340 | exit ;; | 324 | exit 0 ;; |
3414 | 341 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) | ||
3415 | 342 | eval $set_cc_for_build | ||
3416 | 343 | SUN_ARCH="i386" | ||
3417 | 344 | # If there is a compiler, see if it is configured for 64-bit objects. | ||
3418 | 345 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. | ||
3419 | 346 | # This test works for both compilers. | ||
3420 | 347 | if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | ||
3421 | 348 | if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ | ||
3422 | 349 | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | ||
3423 | 350 | grep IS_64BIT_ARCH >/dev/null | ||
3424 | 351 | then | ||
3425 | 352 | SUN_ARCH="x86_64" | ||
3426 | 353 | fi | ||
3427 | 354 | fi | ||
3428 | 355 | echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
3429 | 356 | exit ;; | ||
3434 | 357 | sun4*:SunOS:6*:*) | 325 | sun4*:SunOS:6*:*) |
3435 | 358 | # According to config.sub, this is the proper way to canonicalize | 326 | # According to config.sub, this is the proper way to canonicalize |
3436 | 359 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but | 327 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
3437 | 360 | # it's likely to be more like Solaris than SunOS4. | 328 | # it's likely to be more like Solaris than SunOS4. |
3438 | 361 | echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | 329 | echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
3440 | 362 | exit ;; | 330 | exit 0 ;; |
3441 | 363 | sun4*:SunOS:*:*) | 331 | sun4*:SunOS:*:*) |
3442 | 364 | case "`/usr/bin/arch -k`" in | 332 | case "`/usr/bin/arch -k`" in |
3443 | 365 | Series*|S4*) | 333 | Series*|S4*) |
3444 | @@ -368,10 +336,10 @@ | |||
3445 | 368 | esac | 336 | esac |
3446 | 369 | # Japanese Language versions have a version number like `4.1.3-JL'. | 337 | # Japanese Language versions have a version number like `4.1.3-JL'. |
3447 | 370 | echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` | 338 | echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` |
3449 | 371 | exit ;; | 339 | exit 0 ;; |
3450 | 372 | sun3*:SunOS:*:*) | 340 | sun3*:SunOS:*:*) |
3451 | 373 | echo m68k-sun-sunos${UNAME_RELEASE} | 341 | echo m68k-sun-sunos${UNAME_RELEASE} |
3453 | 374 | exit ;; | 342 | exit 0 ;; |
3454 | 375 | sun*:*:4.2BSD:*) | 343 | sun*:*:4.2BSD:*) |
3455 | 376 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` | 344 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
3456 | 377 | test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 | 345 | test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 |
3457 | @@ -383,10 +351,10 @@ | |||
3458 | 383 | echo sparc-sun-sunos${UNAME_RELEASE} | 351 | echo sparc-sun-sunos${UNAME_RELEASE} |
3459 | 384 | ;; | 352 | ;; |
3460 | 385 | esac | 353 | esac |
3462 | 386 | exit ;; | 354 | exit 0 ;; |
3463 | 387 | aushp:SunOS:*:*) | 355 | aushp:SunOS:*:*) |
3464 | 388 | echo sparc-auspex-sunos${UNAME_RELEASE} | 356 | echo sparc-auspex-sunos${UNAME_RELEASE} |
3466 | 389 | exit ;; | 357 | exit 0 ;; |
3467 | 390 | # The situation for MiNT is a little confusing. The machine name | 358 | # The situation for MiNT is a little confusing. The machine name |
3468 | 391 | # can be virtually everything (everything which is not | 359 | # can be virtually everything (everything which is not |
3469 | 392 | # "atarist" or "atariste" at least should have a processor | 360 | # "atarist" or "atariste" at least should have a processor |
3470 | @@ -396,41 +364,38 @@ | |||
3471 | 396 | # MiNT. But MiNT is downward compatible to TOS, so this should | 364 | # MiNT. But MiNT is downward compatible to TOS, so this should |
3472 | 397 | # be no problem. | 365 | # be no problem. |
3473 | 398 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) | 366 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
3476 | 399 | echo m68k-atari-mint${UNAME_RELEASE} | 367 | echo m68k-atari-mint${UNAME_RELEASE} |
3477 | 400 | exit ;; | 368 | exit 0 ;; |
3478 | 401 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) | 369 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
3479 | 402 | echo m68k-atari-mint${UNAME_RELEASE} | 370 | echo m68k-atari-mint${UNAME_RELEASE} |
3481 | 403 | exit ;; | 371 | exit 0 ;; |
3482 | 404 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) | 372 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
3485 | 405 | echo m68k-atari-mint${UNAME_RELEASE} | 373 | echo m68k-atari-mint${UNAME_RELEASE} |
3486 | 406 | exit ;; | 374 | exit 0 ;; |
3487 | 407 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) | 375 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
3490 | 408 | echo m68k-milan-mint${UNAME_RELEASE} | 376 | echo m68k-milan-mint${UNAME_RELEASE} |
3491 | 409 | exit ;; | 377 | exit 0 ;; |
3492 | 410 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) | 378 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
3495 | 411 | echo m68k-hades-mint${UNAME_RELEASE} | 379 | echo m68k-hades-mint${UNAME_RELEASE} |
3496 | 412 | exit ;; | 380 | exit 0 ;; |
3497 | 413 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) | 381 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
3503 | 414 | echo m68k-unknown-mint${UNAME_RELEASE} | 382 | echo m68k-unknown-mint${UNAME_RELEASE} |
3504 | 415 | exit ;; | 383 | exit 0 ;; |
3500 | 416 | m68k:machten:*:*) | ||
3501 | 417 | echo m68k-apple-machten${UNAME_RELEASE} | ||
3502 | 418 | exit ;; | ||
3505 | 419 | powerpc:machten:*:*) | 384 | powerpc:machten:*:*) |
3506 | 420 | echo powerpc-apple-machten${UNAME_RELEASE} | 385 | echo powerpc-apple-machten${UNAME_RELEASE} |
3508 | 421 | exit ;; | 386 | exit 0 ;; |
3509 | 422 | RISC*:Mach:*:*) | 387 | RISC*:Mach:*:*) |
3510 | 423 | echo mips-dec-mach_bsd4.3 | 388 | echo mips-dec-mach_bsd4.3 |
3512 | 424 | exit ;; | 389 | exit 0 ;; |
3513 | 425 | RISC*:ULTRIX:*:*) | 390 | RISC*:ULTRIX:*:*) |
3514 | 426 | echo mips-dec-ultrix${UNAME_RELEASE} | 391 | echo mips-dec-ultrix${UNAME_RELEASE} |
3516 | 427 | exit ;; | 392 | exit 0 ;; |
3517 | 428 | VAX*:ULTRIX*:*:*) | 393 | VAX*:ULTRIX*:*:*) |
3518 | 429 | echo vax-dec-ultrix${UNAME_RELEASE} | 394 | echo vax-dec-ultrix${UNAME_RELEASE} |
3520 | 430 | exit ;; | 395 | exit 0 ;; |
3521 | 431 | 2020:CLIX:*:* | 2430:CLIX:*:*) | 396 | 2020:CLIX:*:* | 2430:CLIX:*:*) |
3522 | 432 | echo clipper-intergraph-clix${UNAME_RELEASE} | 397 | echo clipper-intergraph-clix${UNAME_RELEASE} |
3524 | 433 | exit ;; | 398 | exit 0 ;; |
3525 | 434 | mips:*:*:UMIPS | mips:*:*:RISCos) | 399 | mips:*:*:UMIPS | mips:*:*:RISCos) |
3526 | 435 | eval $set_cc_for_build | 400 | eval $set_cc_for_build |
3527 | 436 | sed 's/^ //' << EOF >$dummy.c | 401 | sed 's/^ //' << EOF >$dummy.c |
3528 | @@ -454,36 +419,30 @@ | |||
3529 | 454 | exit (-1); | 419 | exit (-1); |
3530 | 455 | } | 420 | } |
3531 | 456 | EOF | 421 | EOF |
3536 | 457 | $CC_FOR_BUILD -o $dummy $dummy.c && | 422 | $CC_FOR_BUILD $dummy.c -o $dummy \ |
3537 | 458 | dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && | 423 | && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ |
3538 | 459 | SYSTEM_NAME=`$dummy $dummyarg` && | 424 | && rm -f $dummy.c $dummy && exit 0 |
3539 | 460 | { echo "$SYSTEM_NAME"; exit; } | 425 | rm -f $dummy.c $dummy |
3540 | 461 | echo mips-mips-riscos${UNAME_RELEASE} | 426 | echo mips-mips-riscos${UNAME_RELEASE} |
3542 | 462 | exit ;; | 427 | exit 0 ;; |
3543 | 463 | Motorola:PowerMAX_OS:*:*) | 428 | Motorola:PowerMAX_OS:*:*) |
3544 | 464 | echo powerpc-motorola-powermax | 429 | echo powerpc-motorola-powermax |
3552 | 465 | exit ;; | 430 | exit 0 ;; |
3546 | 466 | Motorola:*:4.3:PL8-*) | ||
3547 | 467 | echo powerpc-harris-powermax | ||
3548 | 468 | exit ;; | ||
3549 | 469 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) | ||
3550 | 470 | echo powerpc-harris-powermax | ||
3551 | 471 | exit ;; | ||
3553 | 472 | Night_Hawk:Power_UNIX:*:*) | 431 | Night_Hawk:Power_UNIX:*:*) |
3554 | 473 | echo powerpc-harris-powerunix | 432 | echo powerpc-harris-powerunix |
3556 | 474 | exit ;; | 433 | exit 0 ;; |
3557 | 475 | m88k:CX/UX:7*:*) | 434 | m88k:CX/UX:7*:*) |
3558 | 476 | echo m88k-harris-cxux7 | 435 | echo m88k-harris-cxux7 |
3560 | 477 | exit ;; | 436 | exit 0 ;; |
3561 | 478 | m88k:*:4*:R4*) | 437 | m88k:*:4*:R4*) |
3562 | 479 | echo m88k-motorola-sysv4 | 438 | echo m88k-motorola-sysv4 |
3564 | 480 | exit ;; | 439 | exit 0 ;; |
3565 | 481 | m88k:*:3*:R3*) | 440 | m88k:*:3*:R3*) |
3566 | 482 | echo m88k-motorola-sysv3 | 441 | echo m88k-motorola-sysv3 |
3568 | 483 | exit ;; | 442 | exit 0 ;; |
3569 | 484 | AViiON:dgux:*:*) | 443 | AViiON:dgux:*:*) |
3572 | 485 | # DG/UX returns AViiON for all architectures | 444 | # DG/UX returns AViiON for all architectures |
3573 | 486 | UNAME_PROCESSOR=`/usr/bin/uname -p` | 445 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
3574 | 487 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] | 446 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] |
3575 | 488 | then | 447 | then |
3576 | 489 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ | 448 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ |
3577 | @@ -496,29 +455,29 @@ | |||
3578 | 496 | else | 455 | else |
3579 | 497 | echo i586-dg-dgux${UNAME_RELEASE} | 456 | echo i586-dg-dgux${UNAME_RELEASE} |
3580 | 498 | fi | 457 | fi |
3582 | 499 | exit ;; | 458 | exit 0 ;; |
3583 | 500 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) | 459 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
3584 | 501 | echo m88k-dolphin-sysv3 | 460 | echo m88k-dolphin-sysv3 |
3586 | 502 | exit ;; | 461 | exit 0 ;; |
3587 | 503 | M88*:*:R3*:*) | 462 | M88*:*:R3*:*) |
3588 | 504 | # Delta 88k system running SVR3 | 463 | # Delta 88k system running SVR3 |
3589 | 505 | echo m88k-motorola-sysv3 | 464 | echo m88k-motorola-sysv3 |
3591 | 506 | exit ;; | 465 | exit 0 ;; |
3592 | 507 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) | 466 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) |
3593 | 508 | echo m88k-tektronix-sysv3 | 467 | echo m88k-tektronix-sysv3 |
3595 | 509 | exit ;; | 468 | exit 0 ;; |
3596 | 510 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) | 469 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) |
3597 | 511 | echo m68k-tektronix-bsd | 470 | echo m68k-tektronix-bsd |
3599 | 512 | exit ;; | 471 | exit 0 ;; |
3600 | 513 | *:IRIX*:*:*) | 472 | *:IRIX*:*:*) |
3601 | 514 | echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` | 473 | echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` |
3603 | 515 | exit ;; | 474 | exit 0 ;; |
3604 | 516 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. | 475 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. |
3607 | 517 | echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id | 476 | echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id |
3608 | 518 | exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' | 477 | exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' |
3609 | 519 | i*86:AIX:*:*) | 478 | i*86:AIX:*:*) |
3610 | 520 | echo i386-ibm-aix | 479 | echo i386-ibm-aix |
3612 | 521 | exit ;; | 480 | exit 0 ;; |
3613 | 522 | ia64:AIX:*:*) | 481 | ia64:AIX:*:*) |
3614 | 523 | if [ -x /usr/bin/oslevel ] ; then | 482 | if [ -x /usr/bin/oslevel ] ; then |
3615 | 524 | IBM_REV=`/usr/bin/oslevel` | 483 | IBM_REV=`/usr/bin/oslevel` |
3616 | @@ -526,7 +485,7 @@ | |||
3617 | 526 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | 485 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} |
3618 | 527 | fi | 486 | fi |
3619 | 528 | echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} | 487 | echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} |
3621 | 529 | exit ;; | 488 | exit 0 ;; |
3622 | 530 | *:AIX:2:3) | 489 | *:AIX:2:3) |
3623 | 531 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then | 490 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
3624 | 532 | eval $set_cc_for_build | 491 | eval $set_cc_for_build |
3625 | @@ -541,19 +500,16 @@ | |||
3626 | 541 | exit(0); | 500 | exit(0); |
3627 | 542 | } | 501 | } |
3628 | 543 | EOF | 502 | EOF |
3635 | 544 | if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` | 503 | $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 |
3636 | 545 | then | 504 | rm -f $dummy.c $dummy |
3637 | 546 | echo "$SYSTEM_NAME" | 505 | echo rs6000-ibm-aix3.2.5 |
3632 | 547 | else | ||
3633 | 548 | echo rs6000-ibm-aix3.2.5 | ||
3634 | 549 | fi | ||
3638 | 550 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then | 506 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then |
3639 | 551 | echo rs6000-ibm-aix3.2.4 | 507 | echo rs6000-ibm-aix3.2.4 |
3640 | 552 | else | 508 | else |
3641 | 553 | echo rs6000-ibm-aix3.2 | 509 | echo rs6000-ibm-aix3.2 |
3642 | 554 | fi | 510 | fi |
3645 | 555 | exit ;; | 511 | exit 0 ;; |
3646 | 556 | *:AIX:*:[4567]) | 512 | *:AIX:*:[45]) |
3647 | 557 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` | 513 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
3648 | 558 | if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then | 514 | if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then |
3649 | 559 | IBM_ARCH=rs6000 | 515 | IBM_ARCH=rs6000 |
3650 | @@ -566,28 +522,28 @@ | |||
3651 | 566 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | 522 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} |
3652 | 567 | fi | 523 | fi |
3653 | 568 | echo ${IBM_ARCH}-ibm-aix${IBM_REV} | 524 | echo ${IBM_ARCH}-ibm-aix${IBM_REV} |
3655 | 569 | exit ;; | 525 | exit 0 ;; |
3656 | 570 | *:AIX:*:*) | 526 | *:AIX:*:*) |
3657 | 571 | echo rs6000-ibm-aix | 527 | echo rs6000-ibm-aix |
3659 | 572 | exit ;; | 528 | exit 0 ;; |
3660 | 573 | ibmrt:4.4BSD:*|romp-ibm:BSD:*) | 529 | ibmrt:4.4BSD:*|romp-ibm:BSD:*) |
3661 | 574 | echo romp-ibm-bsd4.4 | 530 | echo romp-ibm-bsd4.4 |
3663 | 575 | exit ;; | 531 | exit 0 ;; |
3664 | 576 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and | 532 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and |
3665 | 577 | echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to | 533 | echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to |
3667 | 578 | exit ;; # report: romp-ibm BSD 4.3 | 534 | exit 0 ;; # report: romp-ibm BSD 4.3 |
3668 | 579 | *:BOSX:*:*) | 535 | *:BOSX:*:*) |
3669 | 580 | echo rs6000-bull-bosx | 536 | echo rs6000-bull-bosx |
3671 | 581 | exit ;; | 537 | exit 0 ;; |
3672 | 582 | DPX/2?00:B.O.S.:*:*) | 538 | DPX/2?00:B.O.S.:*:*) |
3673 | 583 | echo m68k-bull-sysv3 | 539 | echo m68k-bull-sysv3 |
3675 | 584 | exit ;; | 540 | exit 0 ;; |
3676 | 585 | 9000/[34]??:4.3bsd:1.*:*) | 541 | 9000/[34]??:4.3bsd:1.*:*) |
3677 | 586 | echo m68k-hp-bsd | 542 | echo m68k-hp-bsd |
3679 | 587 | exit ;; | 543 | exit 0 ;; |
3680 | 588 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) | 544 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
3681 | 589 | echo m68k-hp-bsd4.4 | 545 | echo m68k-hp-bsd4.4 |
3683 | 590 | exit ;; | 546 | exit 0 ;; |
3684 | 591 | 9000/[34678]??:HP-UX:*:*) | 547 | 9000/[34678]??:HP-UX:*:*) |
3685 | 592 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | 548 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` |
3686 | 593 | case "${UNAME_MACHINE}" in | 549 | case "${UNAME_MACHINE}" in |
3687 | @@ -596,84 +552,64 @@ | |||
3688 | 596 | 9000/[678][0-9][0-9]) | 552 | 9000/[678][0-9][0-9]) |
3689 | 597 | if [ -x /usr/bin/getconf ]; then | 553 | if [ -x /usr/bin/getconf ]; then |
3690 | 598 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` | 554 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
3699 | 599 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` | 555 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
3700 | 600 | case "${sc_cpu_version}" in | 556 | case "${sc_cpu_version}" in |
3701 | 601 | 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 | 557 | 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 |
3702 | 602 | 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 | 558 | 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 |
3703 | 603 | 532) # CPU_PA_RISC2_0 | 559 | 532) # CPU_PA_RISC2_0 |
3704 | 604 | case "${sc_kernel_bits}" in | 560 | case "${sc_kernel_bits}" in |
3705 | 605 | 32) HP_ARCH="hppa2.0n" ;; | 561 | 32) HP_ARCH="hppa2.0n" ;; |
3706 | 606 | 64) HP_ARCH="hppa2.0w" ;; | 562 | 64) HP_ARCH="hppa2.0w" ;; |
3707 | 607 | '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 | 563 | '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 |
3710 | 608 | esac ;; | 564 | esac ;; |
3711 | 609 | esac | 565 | esac |
3712 | 610 | fi | 566 | fi |
3713 | 611 | if [ "${HP_ARCH}" = "" ]; then | 567 | if [ "${HP_ARCH}" = "" ]; then |
3714 | 612 | eval $set_cc_for_build | 568 | eval $set_cc_for_build |
3747 | 613 | sed 's/^ //' << EOF >$dummy.c | 569 | sed 's/^ //' << EOF >$dummy.c |
3748 | 614 | 570 | ||
3749 | 615 | #define _HPUX_SOURCE | 571 | #define _HPUX_SOURCE |
3750 | 616 | #include <stdlib.h> | 572 | #include <stdlib.h> |
3751 | 617 | #include <unistd.h> | 573 | #include <unistd.h> |
3752 | 618 | 574 | ||
3753 | 619 | int main () | 575 | int main () |
3754 | 620 | { | 576 | { |
3755 | 621 | #if defined(_SC_KERNEL_BITS) | 577 | #if defined(_SC_KERNEL_BITS) |
3756 | 622 | long bits = sysconf(_SC_KERNEL_BITS); | 578 | long bits = sysconf(_SC_KERNEL_BITS); |
3757 | 623 | #endif | 579 | #endif |
3758 | 624 | long cpu = sysconf (_SC_CPU_VERSION); | 580 | long cpu = sysconf (_SC_CPU_VERSION); |
3759 | 625 | 581 | ||
3760 | 626 | switch (cpu) | 582 | switch (cpu) |
3761 | 627 | { | 583 | { |
3762 | 628 | case CPU_PA_RISC1_0: puts ("hppa1.0"); break; | 584 | case CPU_PA_RISC1_0: puts ("hppa1.0"); break; |
3763 | 629 | case CPU_PA_RISC1_1: puts ("hppa1.1"); break; | 585 | case CPU_PA_RISC1_1: puts ("hppa1.1"); break; |
3764 | 630 | case CPU_PA_RISC2_0: | 586 | case CPU_PA_RISC2_0: |
3765 | 631 | #if defined(_SC_KERNEL_BITS) | 587 | #if defined(_SC_KERNEL_BITS) |
3766 | 632 | switch (bits) | 588 | switch (bits) |
3767 | 633 | { | 589 | { |
3768 | 634 | case 64: puts ("hppa2.0w"); break; | 590 | case 64: puts ("hppa2.0w"); break; |
3769 | 635 | case 32: puts ("hppa2.0n"); break; | 591 | case 32: puts ("hppa2.0n"); break; |
3770 | 636 | default: puts ("hppa2.0"); break; | 592 | default: puts ("hppa2.0"); break; |
3771 | 637 | } break; | 593 | } break; |
3772 | 638 | #else /* !defined(_SC_KERNEL_BITS) */ | 594 | #else /* !defined(_SC_KERNEL_BITS) */ |
3773 | 639 | puts ("hppa2.0"); break; | 595 | puts ("hppa2.0"); break; |
3774 | 640 | #endif | 596 | #endif |
3775 | 641 | default: puts ("hppa1.0"); break; | 597 | default: puts ("hppa1.0"); break; |
3776 | 642 | } | 598 | } |
3777 | 643 | exit (0); | 599 | exit (0); |
3778 | 644 | } | 600 | } |
3779 | 645 | EOF | 601 | EOF |
3782 | 646 | (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` | 602 | (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` |
3783 | 647 | test -z "$HP_ARCH" && HP_ARCH=hppa | 603 | if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi |
3784 | 604 | rm -f $dummy.c $dummy | ||
3785 | 648 | fi ;; | 605 | fi ;; |
3786 | 649 | esac | 606 | esac |
3787 | 650 | if [ ${HP_ARCH} = "hppa2.0w" ] | ||
3788 | 651 | then | ||
3789 | 652 | eval $set_cc_for_build | ||
3790 | 653 | |||
3791 | 654 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating | ||
3792 | 655 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler | ||
3793 | 656 | # generating 64-bit code. GNU and HP use different nomenclature: | ||
3794 | 657 | # | ||
3795 | 658 | # $ CC_FOR_BUILD=cc ./config.guess | ||
3796 | 659 | # => hppa2.0w-hp-hpux11.23 | ||
3797 | 660 | # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess | ||
3798 | 661 | # => hppa64-hp-hpux11.23 | ||
3799 | 662 | |||
3800 | 663 | if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | | ||
3801 | 664 | grep -q __LP64__ | ||
3802 | 665 | then | ||
3803 | 666 | HP_ARCH="hppa2.0w" | ||
3804 | 667 | else | ||
3805 | 668 | HP_ARCH="hppa64" | ||
3806 | 669 | fi | ||
3807 | 670 | fi | ||
3808 | 671 | echo ${HP_ARCH}-hp-hpux${HPUX_REV} | 607 | echo ${HP_ARCH}-hp-hpux${HPUX_REV} |
3810 | 672 | exit ;; | 608 | exit 0 ;; |
3811 | 673 | ia64:HP-UX:*:*) | 609 | ia64:HP-UX:*:*) |
3812 | 674 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | 610 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` |
3813 | 675 | echo ia64-hp-hpux${HPUX_REV} | 611 | echo ia64-hp-hpux${HPUX_REV} |
3815 | 676 | exit ;; | 612 | exit 0 ;; |
3816 | 677 | 3050*:HI-UX:*:*) | 613 | 3050*:HI-UX:*:*) |
3817 | 678 | eval $set_cc_for_build | 614 | eval $set_cc_for_build |
3818 | 679 | sed 's/^ //' << EOF >$dummy.c | 615 | sed 's/^ //' << EOF >$dummy.c |
3819 | @@ -701,173 +637,160 @@ | |||
3820 | 701 | exit (0); | 637 | exit (0); |
3821 | 702 | } | 638 | } |
3822 | 703 | EOF | 639 | EOF |
3825 | 704 | $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && | 640 | $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 |
3826 | 705 | { echo "$SYSTEM_NAME"; exit; } | 641 | rm -f $dummy.c $dummy |
3827 | 706 | echo unknown-hitachi-hiuxwe2 | 642 | echo unknown-hitachi-hiuxwe2 |
3829 | 707 | exit ;; | 643 | exit 0 ;; |
3830 | 708 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) | 644 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) |
3831 | 709 | echo hppa1.1-hp-bsd | 645 | echo hppa1.1-hp-bsd |
3833 | 710 | exit ;; | 646 | exit 0 ;; |
3834 | 711 | 9000/8??:4.3bsd:*:*) | 647 | 9000/8??:4.3bsd:*:*) |
3835 | 712 | echo hppa1.0-hp-bsd | 648 | echo hppa1.0-hp-bsd |
3837 | 713 | exit ;; | 649 | exit 0 ;; |
3838 | 714 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) | 650 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
3839 | 715 | echo hppa1.0-hp-mpeix | 651 | echo hppa1.0-hp-mpeix |
3841 | 716 | exit ;; | 652 | exit 0 ;; |
3842 | 717 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) | 653 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) |
3843 | 718 | echo hppa1.1-hp-osf | 654 | echo hppa1.1-hp-osf |
3845 | 719 | exit ;; | 655 | exit 0 ;; |
3846 | 720 | hp8??:OSF1:*:*) | 656 | hp8??:OSF1:*:*) |
3847 | 721 | echo hppa1.0-hp-osf | 657 | echo hppa1.0-hp-osf |
3849 | 722 | exit ;; | 658 | exit 0 ;; |
3850 | 723 | i*86:OSF1:*:*) | 659 | i*86:OSF1:*:*) |
3851 | 724 | if [ -x /usr/sbin/sysversion ] ; then | 660 | if [ -x /usr/sbin/sysversion ] ; then |
3852 | 725 | echo ${UNAME_MACHINE}-unknown-osf1mk | 661 | echo ${UNAME_MACHINE}-unknown-osf1mk |
3853 | 726 | else | 662 | else |
3854 | 727 | echo ${UNAME_MACHINE}-unknown-osf1 | 663 | echo ${UNAME_MACHINE}-unknown-osf1 |
3855 | 728 | fi | 664 | fi |
3857 | 729 | exit ;; | 665 | exit 0 ;; |
3858 | 730 | parisc*:Lites*:*:*) | 666 | parisc*:Lites*:*:*) |
3859 | 731 | echo hppa1.1-hp-lites | 667 | echo hppa1.1-hp-lites |
3861 | 732 | exit ;; | 668 | exit 0 ;; |
3862 | 733 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) | 669 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
3863 | 734 | echo c1-convex-bsd | 670 | echo c1-convex-bsd |
3865 | 735 | exit ;; | 671 | exit 0 ;; |
3866 | 736 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) | 672 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
3867 | 737 | if getsysinfo -f scalar_acc | 673 | if getsysinfo -f scalar_acc |
3868 | 738 | then echo c32-convex-bsd | 674 | then echo c32-convex-bsd |
3869 | 739 | else echo c2-convex-bsd | 675 | else echo c2-convex-bsd |
3870 | 740 | fi | 676 | fi |
3872 | 741 | exit ;; | 677 | exit 0 ;; |
3873 | 742 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) | 678 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
3874 | 743 | echo c34-convex-bsd | 679 | echo c34-convex-bsd |
3876 | 744 | exit ;; | 680 | exit 0 ;; |
3877 | 745 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) | 681 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
3878 | 746 | echo c38-convex-bsd | 682 | echo c38-convex-bsd |
3880 | 747 | exit ;; | 683 | exit 0 ;; |
3881 | 748 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) | 684 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
3882 | 749 | echo c4-convex-bsd | 685 | echo c4-convex-bsd |
3884 | 750 | exit ;; | 686 | exit 0 ;; |
3885 | 751 | CRAY*Y-MP:*:*:*) | 687 | CRAY*Y-MP:*:*:*) |
3886 | 752 | echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | 688 | echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
3888 | 753 | exit ;; | 689 | exit 0 ;; |
3889 | 754 | CRAY*[A-Z]90:*:*:*) | 690 | CRAY*[A-Z]90:*:*:*) |
3890 | 755 | echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | 691 | echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ |
3891 | 756 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ | 692 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
3892 | 757 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ | 693 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ |
3893 | 758 | -e 's/\.[^.]*$/.X/' | 694 | -e 's/\.[^.]*$/.X/' |
3895 | 759 | exit ;; | 695 | exit 0 ;; |
3896 | 760 | CRAY*TS:*:*:*) | 696 | CRAY*TS:*:*:*) |
3897 | 761 | echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | 697 | echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
3899 | 762 | exit ;; | 698 | exit 0 ;; |
3900 | 699 | CRAY*T3D:*:*:*) | ||
3901 | 700 | echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | ||
3902 | 701 | exit 0 ;; | ||
3903 | 763 | CRAY*T3E:*:*:*) | 702 | CRAY*T3E:*:*:*) |
3904 | 764 | echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | 703 | echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
3906 | 765 | exit ;; | 704 | exit 0 ;; |
3907 | 766 | CRAY*SV1:*:*:*) | 705 | CRAY*SV1:*:*:*) |
3908 | 767 | echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | 706 | echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
3913 | 768 | exit ;; | 707 | exit 0 ;; |
3910 | 769 | *:UNICOS/mp:*:*) | ||
3911 | 770 | echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | ||
3912 | 771 | exit ;; | ||
3914 | 772 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) | 708 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
3915 | 773 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | 709 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
3925 | 774 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | 710 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
3926 | 775 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | 711 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` |
3927 | 776 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | 712 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
3928 | 777 | exit ;; | 713 | exit 0 ;; |
3920 | 778 | 5000:UNIX_System_V:4.*:*) | ||
3921 | 779 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | ||
3922 | 780 | FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` | ||
3923 | 781 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | ||
3924 | 782 | exit ;; | ||
3929 | 783 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) | 714 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
3930 | 784 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | 715 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} |
3932 | 785 | exit ;; | 716 | exit 0 ;; |
3933 | 786 | sparc*:BSD/OS:*:*) | 717 | sparc*:BSD/OS:*:*) |
3934 | 787 | echo sparc-unknown-bsdi${UNAME_RELEASE} | 718 | echo sparc-unknown-bsdi${UNAME_RELEASE} |
3936 | 788 | exit ;; | 719 | exit 0 ;; |
3937 | 789 | *:BSD/OS:*:*) | 720 | *:BSD/OS:*:*) |
3938 | 790 | echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} | 721 | echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} |
3940 | 791 | exit ;; | 722 | exit 0 ;; |
3941 | 792 | *:FreeBSD:*:*) | 723 | *:FreeBSD:*:*) |
3950 | 793 | UNAME_PROCESSOR=`/usr/bin/uname -p` | 724 | echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
3951 | 794 | case ${UNAME_PROCESSOR} in | 725 | exit 0 ;; |
3944 | 795 | amd64) | ||
3945 | 796 | echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | ||
3946 | 797 | *) | ||
3947 | 798 | echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | ||
3948 | 799 | esac | ||
3949 | 800 | exit ;; | ||
3952 | 801 | i*:CYGWIN*:*) | 726 | i*:CYGWIN*:*) |
3953 | 802 | echo ${UNAME_MACHINE}-pc-cygwin | 727 | echo ${UNAME_MACHINE}-pc-cygwin |
3956 | 803 | exit ;; | 728 | exit 0 ;; |
3957 | 804 | *:MINGW*:*) | 729 | i*:MINGW*:*) |
3958 | 805 | echo ${UNAME_MACHINE}-pc-mingw32 | 730 | echo ${UNAME_MACHINE}-pc-mingw32 |
3967 | 806 | exit ;; | 731 | exit 0 ;; |
3960 | 807 | i*:MSYS*:*) | ||
3961 | 808 | echo ${UNAME_MACHINE}-pc-msys | ||
3962 | 809 | exit ;; | ||
3963 | 810 | i*:windows32*:*) | ||
3964 | 811 | # uname -m includes "-pc" on this system. | ||
3965 | 812 | echo ${UNAME_MACHINE}-mingw32 | ||
3966 | 813 | exit ;; | ||
3968 | 814 | i*:PW*:*) | 732 | i*:PW*:*) |
3969 | 815 | echo ${UNAME_MACHINE}-pc-pw32 | 733 | echo ${UNAME_MACHINE}-pc-pw32 |
3989 | 816 | exit ;; | 734 | exit 0 ;; |
3990 | 817 | *:Interix*:*) | 735 | x86:Interix*:3*) |
3991 | 818 | case ${UNAME_MACHINE} in | 736 | echo i386-pc-interix3 |
3992 | 819 | x86) | 737 | exit 0 ;; |
3974 | 820 | echo i586-pc-interix${UNAME_RELEASE} | ||
3975 | 821 | exit ;; | ||
3976 | 822 | authenticamd | genuineintel | EM64T) | ||
3977 | 823 | echo x86_64-unknown-interix${UNAME_RELEASE} | ||
3978 | 824 | exit ;; | ||
3979 | 825 | IA64) | ||
3980 | 826 | echo ia64-unknown-interix${UNAME_RELEASE} | ||
3981 | 827 | exit ;; | ||
3982 | 828 | esac ;; | ||
3983 | 829 | [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) | ||
3984 | 830 | echo i${UNAME_MACHINE}-pc-mks | ||
3985 | 831 | exit ;; | ||
3986 | 832 | 8664:Windows_NT:*) | ||
3987 | 833 | echo x86_64-pc-mks | ||
3988 | 834 | exit ;; | ||
3993 | 835 | i*:Windows_NT*:* | Pentium*:Windows_NT*:*) | 738 | i*:Windows_NT*:* | Pentium*:Windows_NT*:*) |
3994 | 836 | # How do we know it's Interix rather than the generic POSIX subsystem? | 739 | # How do we know it's Interix rather than the generic POSIX subsystem? |
3995 | 837 | # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we | 740 | # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we |
3996 | 838 | # UNAME_MACHINE based on the output of uname instead of i386? | 741 | # UNAME_MACHINE based on the output of uname instead of i386? |
3999 | 839 | echo i586-pc-interix | 742 | echo i386-pc-interix |
4000 | 840 | exit ;; | 743 | exit 0 ;; |
4001 | 841 | i*:UWIN*:*) | 744 | i*:UWIN*:*) |
4002 | 842 | echo ${UNAME_MACHINE}-pc-uwin | 745 | echo ${UNAME_MACHINE}-pc-uwin |
4007 | 843 | exit ;; | 746 | exit 0 ;; |
4004 | 844 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) | ||
4005 | 845 | echo x86_64-unknown-cygwin | ||
4006 | 846 | exit ;; | ||
4008 | 847 | p*:CYGWIN*:*) | 747 | p*:CYGWIN*:*) |
4009 | 848 | echo powerpcle-unknown-cygwin | 748 | echo powerpcle-unknown-cygwin |
4011 | 849 | exit ;; | 749 | exit 0 ;; |
4012 | 850 | prep*:SunOS:5.*:*) | 750 | prep*:SunOS:5.*:*) |
4013 | 851 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | 751 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
4015 | 852 | exit ;; | 752 | exit 0 ;; |
4016 | 853 | *:GNU:*:*) | 753 | *:GNU:*:*) |
4017 | 854 | # the GNU system | ||
4018 | 855 | echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` | 754 | echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` |
4024 | 856 | exit ;; | 755 | exit 0 ;; |
4020 | 857 | *:GNU/*:*:*) | ||
4021 | 858 | # other systems with GNU libc and userland | ||
4022 | 859 | echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu | ||
4023 | 860 | exit ;; | ||
4025 | 861 | i*86:Minix:*:*) | 756 | i*86:Minix:*:*) |
4026 | 862 | echo ${UNAME_MACHINE}-pc-minix | 757 | echo ${UNAME_MACHINE}-pc-minix |
4035 | 863 | exit ;; | 758 | exit 0 ;; |
4036 | 864 | aarch64:Linux:*:*) | 759 | arm*:Linux:*:*) |
4037 | 865 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 760 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
4038 | 866 | exit ;; | 761 | exit 0 ;; |
4039 | 867 | aarch64_be:Linux:*:*) | 762 | ia64:Linux:*:*) |
4040 | 868 | UNAME_MACHINE=aarch64_be | 763 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
4041 | 869 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 764 | exit 0 ;; |
4042 | 870 | exit ;; | 765 | m68*:Linux:*:*) |
4043 | 766 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
4044 | 767 | exit 0 ;; | ||
4045 | 768 | mips:Linux:*:*) | ||
4046 | 769 | eval $set_cc_for_build | ||
4047 | 770 | sed 's/^ //' << EOF >$dummy.c | ||
4048 | 771 | #undef CPU | ||
4049 | 772 | #undef mips | ||
4050 | 773 | #undef mipsel | ||
4051 | 774 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | ||
4052 | 775 | CPU=mipsel | ||
4053 | 776 | #else | ||
4054 | 777 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | ||
4055 | 778 | CPU=mips | ||
4056 | 779 | #else | ||
4057 | 780 | CPU= | ||
4058 | 781 | #endif | ||
4059 | 782 | #endif | ||
4060 | 783 | EOF | ||
4061 | 784 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` | ||
4062 | 785 | rm -f $dummy.c | ||
4063 | 786 | test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 | ||
4064 | 787 | ;; | ||
4065 | 788 | ppc:Linux:*:*) | ||
4066 | 789 | echo powerpc-unknown-linux-gnu | ||
4067 | 790 | exit 0 ;; | ||
4068 | 791 | ppc64:Linux:*:*) | ||
4069 | 792 | echo powerpc64-unknown-linux-gnu | ||
4070 | 793 | exit 0 ;; | ||
4071 | 871 | alpha:Linux:*:*) | 794 | alpha:Linux:*:*) |
4072 | 872 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | 795 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in |
4073 | 873 | EV5) UNAME_MACHINE=alphaev5 ;; | 796 | EV5) UNAME_MACHINE=alphaev5 ;; |
4074 | @@ -877,90 +800,11 @@ | |||
4075 | 877 | EV6) UNAME_MACHINE=alphaev6 ;; | 800 | EV6) UNAME_MACHINE=alphaev6 ;; |
4076 | 878 | EV67) UNAME_MACHINE=alphaev67 ;; | 801 | EV67) UNAME_MACHINE=alphaev67 ;; |
4077 | 879 | EV68*) UNAME_MACHINE=alphaev68 ;; | 802 | EV68*) UNAME_MACHINE=alphaev68 ;; |
4080 | 880 | esac | 803 | esac |
4081 | 881 | objdump --private-headers /bin/sh | grep -q ld.so.1 | 804 | objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null |
4082 | 882 | if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi | 805 | if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi |
4083 | 883 | echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} | 806 | echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} |
4164 | 884 | exit ;; | 807 | exit 0 ;; |
4085 | 885 | arm*:Linux:*:*) | ||
4086 | 886 | eval $set_cc_for_build | ||
4087 | 887 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | ||
4088 | 888 | | grep -q __ARM_EABI__ | ||
4089 | 889 | then | ||
4090 | 890 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
4091 | 891 | else | ||
4092 | 892 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | ||
4093 | 893 | | grep -q __ARM_PCS_VFP | ||
4094 | 894 | then | ||
4095 | 895 | echo ${UNAME_MACHINE}-unknown-linux-gnueabi | ||
4096 | 896 | else | ||
4097 | 897 | echo ${UNAME_MACHINE}-unknown-linux-gnueabihf | ||
4098 | 898 | fi | ||
4099 | 899 | fi | ||
4100 | 900 | exit ;; | ||
4101 | 901 | avr32*:Linux:*:*) | ||
4102 | 902 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
4103 | 903 | exit ;; | ||
4104 | 904 | cris:Linux:*:*) | ||
4105 | 905 | echo ${UNAME_MACHINE}-axis-linux-gnu | ||
4106 | 906 | exit ;; | ||
4107 | 907 | crisv32:Linux:*:*) | ||
4108 | 908 | echo ${UNAME_MACHINE}-axis-linux-gnu | ||
4109 | 909 | exit ;; | ||
4110 | 910 | frv:Linux:*:*) | ||
4111 | 911 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
4112 | 912 | exit ;; | ||
4113 | 913 | hexagon:Linux:*:*) | ||
4114 | 914 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
4115 | 915 | exit ;; | ||
4116 | 916 | i*86:Linux:*:*) | ||
4117 | 917 | LIBC=gnu | ||
4118 | 918 | eval $set_cc_for_build | ||
4119 | 919 | sed 's/^ //' << EOF >$dummy.c | ||
4120 | 920 | #ifdef __dietlibc__ | ||
4121 | 921 | LIBC=dietlibc | ||
4122 | 922 | #endif | ||
4123 | 923 | EOF | ||
4124 | 924 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` | ||
4125 | 925 | echo "${UNAME_MACHINE}-pc-linux-${LIBC}" | ||
4126 | 926 | exit ;; | ||
4127 | 927 | ia64:Linux:*:*) | ||
4128 | 928 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
4129 | 929 | exit ;; | ||
4130 | 930 | m32r*:Linux:*:*) | ||
4131 | 931 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
4132 | 932 | exit ;; | ||
4133 | 933 | m68*:Linux:*:*) | ||
4134 | 934 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
4135 | 935 | exit ;; | ||
4136 | 936 | mips:Linux:*:* | mips64:Linux:*:*) | ||
4137 | 937 | eval $set_cc_for_build | ||
4138 | 938 | sed 's/^ //' << EOF >$dummy.c | ||
4139 | 939 | #undef CPU | ||
4140 | 940 | #undef ${UNAME_MACHINE} | ||
4141 | 941 | #undef ${UNAME_MACHINE}el | ||
4142 | 942 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | ||
4143 | 943 | CPU=${UNAME_MACHINE}el | ||
4144 | 944 | #else | ||
4145 | 945 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | ||
4146 | 946 | CPU=${UNAME_MACHINE} | ||
4147 | 947 | #else | ||
4148 | 948 | CPU= | ||
4149 | 949 | #endif | ||
4150 | 950 | #endif | ||
4151 | 951 | EOF | ||
4152 | 952 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` | ||
4153 | 953 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } | ||
4154 | 954 | ;; | ||
4155 | 955 | or32:Linux:*:*) | ||
4156 | 956 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
4157 | 957 | exit ;; | ||
4158 | 958 | padre:Linux:*:*) | ||
4159 | 959 | echo sparc-unknown-linux-gnu | ||
4160 | 960 | exit ;; | ||
4161 | 961 | parisc64:Linux:*:* | hppa64:Linux:*:*) | ||
4162 | 962 | echo hppa64-unknown-linux-gnu | ||
4163 | 963 | exit ;; | ||
4165 | 964 | parisc:Linux:*:* | hppa:Linux:*:*) | 808 | parisc:Linux:*:* | hppa:Linux:*:*) |
4166 | 965 | # Look for CPU level | 809 | # Look for CPU level |
4167 | 966 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in | 810 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
4168 | @@ -968,71 +812,90 @@ | |||
4169 | 968 | PA8*) echo hppa2.0-unknown-linux-gnu ;; | 812 | PA8*) echo hppa2.0-unknown-linux-gnu ;; |
4170 | 969 | *) echo hppa-unknown-linux-gnu ;; | 813 | *) echo hppa-unknown-linux-gnu ;; |
4171 | 970 | esac | 814 | esac |
4179 | 971 | exit ;; | 815 | exit 0 ;; |
4180 | 972 | ppc64:Linux:*:*) | 816 | parisc64:Linux:*:* | hppa64:Linux:*:*) |
4181 | 973 | echo powerpc64-unknown-linux-gnu | 817 | echo hppa64-unknown-linux-gnu |
4182 | 974 | exit ;; | 818 | exit 0 ;; |
4176 | 975 | ppc:Linux:*:*) | ||
4177 | 976 | echo powerpc-unknown-linux-gnu | ||
4178 | 977 | exit ;; | ||
4183 | 978 | s390:Linux:*:* | s390x:Linux:*:*) | 819 | s390:Linux:*:* | s390x:Linux:*:*) |
4184 | 979 | echo ${UNAME_MACHINE}-ibm-linux | 820 | echo ${UNAME_MACHINE}-ibm-linux |
4189 | 980 | exit ;; | 821 | exit 0 ;; |
4186 | 981 | sh64*:Linux:*:*) | ||
4187 | 982 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
4188 | 983 | exit ;; | ||
4190 | 984 | sh*:Linux:*:*) | 822 | sh*:Linux:*:*) |
4191 | 985 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 823 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
4193 | 986 | exit ;; | 824 | exit 0 ;; |
4194 | 987 | sparc:Linux:*:* | sparc64:Linux:*:*) | 825 | sparc:Linux:*:* | sparc64:Linux:*:*) |
4195 | 988 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 826 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
4203 | 989 | exit ;; | 827 | exit 0 ;; |
4197 | 990 | tile*:Linux:*:*) | ||
4198 | 991 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
4199 | 992 | exit ;; | ||
4200 | 993 | vax:Linux:*:*) | ||
4201 | 994 | echo ${UNAME_MACHINE}-dec-linux-gnu | ||
4202 | 995 | exit ;; | ||
4204 | 996 | x86_64:Linux:*:*) | 828 | x86_64:Linux:*:*) |
4210 | 997 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 829 | echo x86_64-unknown-linux-gnu |
4211 | 998 | exit ;; | 830 | exit 0 ;; |
4212 | 999 | xtensa*:Linux:*:*) | 831 | i*86:Linux:*:*) |
4213 | 1000 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 832 | # The BFD linker knows what the default object file format is, so |
4214 | 1001 | exit ;; | 833 | # first see if it will tell us. cd to the root directory to prevent |
4215 | 834 | # problems with other programs or directories called `ld' in the path. | ||
4216 | 835 | # Set LC_ALL=C to ensure ld outputs messages in English. | ||
4217 | 836 | ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | ||
4218 | 837 | | sed -ne '/supported targets:/!d | ||
4219 | 838 | s/[ ][ ]*/ /g | ||
4220 | 839 | s/.*supported targets: *// | ||
4221 | 840 | s/ .*// | ||
4222 | 841 | p'` | ||
4223 | 842 | case "$ld_supported_targets" in | ||
4224 | 843 | elf32-i386) | ||
4225 | 844 | TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" | ||
4226 | 845 | ;; | ||
4227 | 846 | a.out-i386-linux) | ||
4228 | 847 | echo "${UNAME_MACHINE}-pc-linux-gnuaout" | ||
4229 | 848 | exit 0 ;; | ||
4230 | 849 | coff-i386) | ||
4231 | 850 | echo "${UNAME_MACHINE}-pc-linux-gnucoff" | ||
4232 | 851 | exit 0 ;; | ||
4233 | 852 | "") | ||
4234 | 853 | # Either a pre-BFD a.out linker (linux-gnuoldld) or | ||
4235 | 854 | # one that does not give us useful --help. | ||
4236 | 855 | echo "${UNAME_MACHINE}-pc-linux-gnuoldld" | ||
4237 | 856 | exit 0 ;; | ||
4238 | 857 | esac | ||
4239 | 858 | # Determine whether the default compiler is a.out or elf | ||
4240 | 859 | eval $set_cc_for_build | ||
4241 | 860 | sed 's/^ //' << EOF >$dummy.c | ||
4242 | 861 | #include <features.h> | ||
4243 | 862 | #ifdef __ELF__ | ||
4244 | 863 | # ifdef __GLIBC__ | ||
4245 | 864 | # if __GLIBC__ >= 2 | ||
4246 | 865 | LIBC=gnu | ||
4247 | 866 | # else | ||
4248 | 867 | LIBC=gnulibc1 | ||
4249 | 868 | # endif | ||
4250 | 869 | # else | ||
4251 | 870 | LIBC=gnulibc1 | ||
4252 | 871 | # endif | ||
4253 | 872 | #else | ||
4254 | 873 | #ifdef __INTEL_COMPILER | ||
4255 | 874 | LIBC=gnu | ||
4256 | 875 | #else | ||
4257 | 876 | LIBC=gnuaout | ||
4258 | 877 | #endif | ||
4259 | 878 | #endif | ||
4260 | 879 | EOF | ||
4261 | 880 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` | ||
4262 | 881 | rm -f $dummy.c | ||
4263 | 882 | test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 | ||
4264 | 883 | test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 | ||
4265 | 884 | ;; | ||
4266 | 1002 | i*86:DYNIX/ptx:4*:*) | 885 | i*86:DYNIX/ptx:4*:*) |
4267 | 1003 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. | 886 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
4268 | 1004 | # earlier versions are messed up and put the nodename in both | 887 | # earlier versions are messed up and put the nodename in both |
4269 | 1005 | # sysname and nodename. | 888 | # sysname and nodename. |
4270 | 1006 | echo i386-sequent-sysv4 | 889 | echo i386-sequent-sysv4 |
4272 | 1007 | exit ;; | 890 | exit 0 ;; |
4273 | 1008 | i*86:UNIX_SV:4.2MP:2.*) | 891 | i*86:UNIX_SV:4.2MP:2.*) |
4277 | 1009 | # Unixware is an offshoot of SVR4, but it has its own version | 892 | # Unixware is an offshoot of SVR4, but it has its own version |
4278 | 1010 | # number series starting with 2... | 893 | # number series starting with 2... |
4279 | 1011 | # I am not positive that other SVR4 systems won't match this, | 894 | # I am not positive that other SVR4 systems won't match this, |
4280 | 1012 | # I just have to hope. -- rms. | 895 | # I just have to hope. -- rms. |
4282 | 1013 | # Use sysv4.2uw... so that sysv4* matches it. | 896 | # Use sysv4.2uw... so that sysv4* matches it. |
4283 | 1014 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} | 897 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} |
4305 | 1015 | exit ;; | 898 | exit 0 ;; |
4285 | 1016 | i*86:OS/2:*:*) | ||
4286 | 1017 | # If we were able to find `uname', then EMX Unix compatibility | ||
4287 | 1018 | # is probably installed. | ||
4288 | 1019 | echo ${UNAME_MACHINE}-pc-os2-emx | ||
4289 | 1020 | exit ;; | ||
4290 | 1021 | i*86:XTS-300:*:STOP) | ||
4291 | 1022 | echo ${UNAME_MACHINE}-unknown-stop | ||
4292 | 1023 | exit ;; | ||
4293 | 1024 | i*86:atheos:*:*) | ||
4294 | 1025 | echo ${UNAME_MACHINE}-unknown-atheos | ||
4295 | 1026 | exit ;; | ||
4296 | 1027 | i*86:syllable:*:*) | ||
4297 | 1028 | echo ${UNAME_MACHINE}-pc-syllable | ||
4298 | 1029 | exit ;; | ||
4299 | 1030 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) | ||
4300 | 1031 | echo i386-unknown-lynxos${UNAME_RELEASE} | ||
4301 | 1032 | exit ;; | ||
4302 | 1033 | i*86:*DOS:*:*) | ||
4303 | 1034 | echo ${UNAME_MACHINE}-pc-msdosdjgpp | ||
4304 | 1035 | exit ;; | ||
4306 | 1036 | i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) | 899 | i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) |
4307 | 1037 | UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` | 900 | UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` |
4308 | 1038 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then | 901 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
4309 | @@ -1040,113 +903,99 @@ | |||
4310 | 1040 | else | 903 | else |
4311 | 1041 | echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} | 904 | echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} |
4312 | 1042 | fi | 905 | fi |
4316 | 1043 | exit ;; | 906 | exit 0 ;; |
4317 | 1044 | i*86:*:5:[678]*) | 907 | i*86:*:5:[78]*) |
4315 | 1045 | # UnixWare 7.x, OpenUNIX and OpenServer 6. | ||
4318 | 1046 | case `/bin/uname -X | grep "^Machine"` in | 908 | case `/bin/uname -X | grep "^Machine"` in |
4319 | 1047 | *486*) UNAME_MACHINE=i486 ;; | 909 | *486*) UNAME_MACHINE=i486 ;; |
4320 | 1048 | *Pentium) UNAME_MACHINE=i586 ;; | 910 | *Pentium) UNAME_MACHINE=i586 ;; |
4321 | 1049 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; | 911 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
4322 | 1050 | esac | 912 | esac |
4323 | 1051 | echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} | 913 | echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} |
4325 | 1052 | exit ;; | 914 | exit 0 ;; |
4326 | 1053 | i*86:*:3.2:*) | 915 | i*86:*:3.2:*) |
4327 | 1054 | if test -f /usr/options/cb.name; then | 916 | if test -f /usr/options/cb.name; then |
4328 | 1055 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` | 917 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
4329 | 1056 | echo ${UNAME_MACHINE}-pc-isc$UNAME_REL | 918 | echo ${UNAME_MACHINE}-pc-isc$UNAME_REL |
4330 | 1057 | elif /bin/uname -X 2>/dev/null >/dev/null ; then | 919 | elif /bin/uname -X 2>/dev/null >/dev/null ; then |
4334 | 1058 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` | 920 | UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` |
4335 | 1059 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 | 921 | (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 |
4336 | 1060 | (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ | 922 | (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ |
4337 | 1061 | && UNAME_MACHINE=i586 | 923 | && UNAME_MACHINE=i586 |
4339 | 1062 | (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ | 924 | (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ |
4340 | 1063 | && UNAME_MACHINE=i686 | 925 | && UNAME_MACHINE=i686 |
4342 | 1064 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ | 926 | (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ |
4343 | 1065 | && UNAME_MACHINE=i686 | 927 | && UNAME_MACHINE=i686 |
4344 | 1066 | echo ${UNAME_MACHINE}-pc-sco$UNAME_REL | 928 | echo ${UNAME_MACHINE}-pc-sco$UNAME_REL |
4345 | 1067 | else | 929 | else |
4346 | 1068 | echo ${UNAME_MACHINE}-pc-sysv32 | 930 | echo ${UNAME_MACHINE}-pc-sysv32 |
4347 | 1069 | fi | 931 | fi |
4349 | 1070 | exit ;; | 932 | exit 0 ;; |
4350 | 933 | i*86:*DOS:*:*) | ||
4351 | 934 | echo ${UNAME_MACHINE}-pc-msdosdjgpp | ||
4352 | 935 | exit 0 ;; | ||
4353 | 1071 | pc:*:*:*) | 936 | pc:*:*:*) |
4354 | 1072 | # Left here for compatibility: | 937 | # Left here for compatibility: |
4362 | 1073 | # uname -m prints for DJGPP always 'pc', but it prints nothing about | 938 | # uname -m prints for DJGPP always 'pc', but it prints nothing about |
4363 | 1074 | # the processor, so we play safe by assuming i586. | 939 | # the processor, so we play safe by assuming i386. |
4364 | 1075 | # Note: whatever this is, it MUST be the same as what config.sub | 940 | echo i386-pc-msdosdjgpp |
4365 | 1076 | # prints for the "djgpp" host, or else GDB configury will decide that | 941 | exit 0 ;; |
4359 | 1077 | # this is a cross-build. | ||
4360 | 1078 | echo i586-pc-msdosdjgpp | ||
4361 | 1079 | exit ;; | ||
4366 | 1080 | Intel:Mach:3*:*) | 942 | Intel:Mach:3*:*) |
4367 | 1081 | echo i386-pc-mach3 | 943 | echo i386-pc-mach3 |
4369 | 1082 | exit ;; | 944 | exit 0 ;; |
4370 | 1083 | paragon:*:*:*) | 945 | paragon:*:*:*) |
4371 | 1084 | echo i860-intel-osf1 | 946 | echo i860-intel-osf1 |
4373 | 1085 | exit ;; | 947 | exit 0 ;; |
4374 | 1086 | i860:*:4.*:*) # i860-SVR4 | 948 | i860:*:4.*:*) # i860-SVR4 |
4375 | 1087 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then | 949 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then |
4376 | 1088 | echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 | 950 | echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 |
4377 | 1089 | else # Add other i860-SVR4 vendors below as they are discovered. | 951 | else # Add other i860-SVR4 vendors below as they are discovered. |
4378 | 1090 | echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 | 952 | echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 |
4379 | 1091 | fi | 953 | fi |
4381 | 1092 | exit ;; | 954 | exit 0 ;; |
4382 | 1093 | mini*:CTIX:SYS*5:*) | 955 | mini*:CTIX:SYS*5:*) |
4383 | 1094 | # "miniframe" | 956 | # "miniframe" |
4384 | 1095 | echo m68010-convergent-sysv | 957 | echo m68010-convergent-sysv |
4395 | 1096 | exit ;; | 958 | exit 0 ;; |
4396 | 1097 | mc68k:UNIX:SYSTEM5:3.51m) | 959 | M68*:*:R3V[567]*:*) |
4397 | 1098 | echo m68k-convergent-sysv | 960 | test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; |
4398 | 1099 | exit ;; | 961 | 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) |
4389 | 1100 | M680?0:D-NIX:5.3:*) | ||
4390 | 1101 | echo m68k-diab-dnix | ||
4391 | 1102 | exit ;; | ||
4392 | 1103 | M68*:*:R3V[5678]*:*) | ||
4393 | 1104 | test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; | ||
4394 | 1105 | 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) | ||
4399 | 1106 | OS_REL='' | 962 | OS_REL='' |
4400 | 1107 | test -r /etc/.relid \ | 963 | test -r /etc/.relid \ |
4401 | 1108 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | 964 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
4402 | 1109 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | 965 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
4404 | 1110 | && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | 966 | && echo i486-ncr-sysv4.3${OS_REL} && exit 0 |
4405 | 1111 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | 967 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
4407 | 1112 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | 968 | && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; |
4408 | 1113 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) | 969 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) |
4421 | 1114 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | 970 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
4422 | 1115 | && { echo i486-ncr-sysv4; exit; } ;; | 971 | && echo i486-ncr-sysv4 && exit 0 ;; |
4411 | 1116 | NCR*:*:4.2:* | MPRAS*:*:4.2:*) | ||
4412 | 1117 | OS_REL='.3' | ||
4413 | 1118 | test -r /etc/.relid \ | ||
4414 | 1119 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | ||
4415 | 1120 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | ||
4416 | 1121 | && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | ||
4417 | 1122 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | ||
4418 | 1123 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } | ||
4419 | 1124 | /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ | ||
4420 | 1125 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | ||
4423 | 1126 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) | 972 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
4424 | 1127 | echo m68k-unknown-lynxos${UNAME_RELEASE} | 973 | echo m68k-unknown-lynxos${UNAME_RELEASE} |
4426 | 1128 | exit ;; | 974 | exit 0 ;; |
4427 | 1129 | mc68030:UNIX_System_V:4.*:*) | 975 | mc68030:UNIX_System_V:4.*:*) |
4428 | 1130 | echo m68k-atari-sysv4 | 976 | echo m68k-atari-sysv4 |
4430 | 1131 | exit ;; | 977 | exit 0 ;; |
4431 | 978 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) | ||
4432 | 979 | echo i386-unknown-lynxos${UNAME_RELEASE} | ||
4433 | 980 | exit 0 ;; | ||
4434 | 1132 | TSUNAMI:LynxOS:2.*:*) | 981 | TSUNAMI:LynxOS:2.*:*) |
4435 | 1133 | echo sparc-unknown-lynxos${UNAME_RELEASE} | 982 | echo sparc-unknown-lynxos${UNAME_RELEASE} |
4437 | 1134 | exit ;; | 983 | exit 0 ;; |
4438 | 1135 | rs6000:LynxOS:2.*:*) | 984 | rs6000:LynxOS:2.*:*) |
4439 | 1136 | echo rs6000-unknown-lynxos${UNAME_RELEASE} | 985 | echo rs6000-unknown-lynxos${UNAME_RELEASE} |
4442 | 1137 | exit ;; | 986 | exit 0 ;; |
4443 | 1138 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) | 987 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) |
4444 | 1139 | echo powerpc-unknown-lynxos${UNAME_RELEASE} | 988 | echo powerpc-unknown-lynxos${UNAME_RELEASE} |
4446 | 1140 | exit ;; | 989 | exit 0 ;; |
4447 | 1141 | SM[BE]S:UNIX_SV:*:*) | 990 | SM[BE]S:UNIX_SV:*:*) |
4448 | 1142 | echo mips-dde-sysv${UNAME_RELEASE} | 991 | echo mips-dde-sysv${UNAME_RELEASE} |
4450 | 1143 | exit ;; | 992 | exit 0 ;; |
4451 | 1144 | RM*:ReliantUNIX-*:*:*) | 993 | RM*:ReliantUNIX-*:*:*) |
4452 | 1145 | echo mips-sni-sysv4 | 994 | echo mips-sni-sysv4 |
4454 | 1146 | exit ;; | 995 | exit 0 ;; |
4455 | 1147 | RM*:SINIX-*:*:*) | 996 | RM*:SINIX-*:*:*) |
4456 | 1148 | echo mips-sni-sysv4 | 997 | echo mips-sni-sysv4 |
4458 | 1149 | exit ;; | 998 | exit 0 ;; |
4459 | 1150 | *:SINIX-*:*:*) | 999 | *:SINIX-*:*:*) |
4460 | 1151 | if uname -p 2>/dev/null >/dev/null ; then | 1000 | if uname -p 2>/dev/null >/dev/null ; then |
4461 | 1152 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | 1001 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
4462 | @@ -1154,94 +1003,61 @@ | |||
4463 | 1154 | else | 1003 | else |
4464 | 1155 | echo ns32k-sni-sysv | 1004 | echo ns32k-sni-sysv |
4465 | 1156 | fi | 1005 | fi |
4471 | 1157 | exit ;; | 1006 | exit 0 ;; |
4472 | 1158 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | 1007 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
4473 | 1159 | # says <Richard.M.Bartel@ccMail.Census.GOV> | 1008 | # says <Richard.M.Bartel@ccMail.Census.GOV> |
4474 | 1160 | echo i586-unisys-sysv4 | 1009 | echo i586-unisys-sysv4 |
4475 | 1161 | exit ;; | 1010 | exit 0 ;; |
4476 | 1162 | *:UNIX_System_V:4*:FTX*) | 1011 | *:UNIX_System_V:4*:FTX*) |
4477 | 1163 | # From Gerald Hewes <hewes@openmarket.com>. | 1012 | # From Gerald Hewes <hewes@openmarket.com>. |
4478 | 1164 | # How about differentiating between stratus architectures? -djm | 1013 | # How about differentiating between stratus architectures? -djm |
4479 | 1165 | echo hppa1.1-stratus-sysv4 | 1014 | echo hppa1.1-stratus-sysv4 |
4481 | 1166 | exit ;; | 1015 | exit 0 ;; |
4482 | 1167 | *:*:*:FTX*) | 1016 | *:*:*:FTX*) |
4483 | 1168 | # From seanf@swdc.stratus.com. | 1017 | # From seanf@swdc.stratus.com. |
4484 | 1169 | echo i860-stratus-sysv4 | 1018 | echo i860-stratus-sysv4 |
4490 | 1170 | exit ;; | 1019 | exit 0 ;; |
4486 | 1171 | i*86:VOS:*:*) | ||
4487 | 1172 | # From Paul.Green@stratus.com. | ||
4488 | 1173 | echo ${UNAME_MACHINE}-stratus-vos | ||
4489 | 1174 | exit ;; | ||
4491 | 1175 | *:VOS:*:*) | 1020 | *:VOS:*:*) |
4492 | 1176 | # From Paul.Green@stratus.com. | 1021 | # From Paul.Green@stratus.com. |
4493 | 1177 | echo hppa1.1-stratus-vos | 1022 | echo hppa1.1-stratus-vos |
4495 | 1178 | exit ;; | 1023 | exit 0 ;; |
4496 | 1179 | mc68*:A/UX:*:*) | 1024 | mc68*:A/UX:*:*) |
4497 | 1180 | echo m68k-apple-aux${UNAME_RELEASE} | 1025 | echo m68k-apple-aux${UNAME_RELEASE} |
4499 | 1181 | exit ;; | 1026 | exit 0 ;; |
4500 | 1182 | news*:NEWS-OS:6*:*) | 1027 | news*:NEWS-OS:6*:*) |
4501 | 1183 | echo mips-sony-newsos6 | 1028 | echo mips-sony-newsos6 |
4503 | 1184 | exit ;; | 1029 | exit 0 ;; |
4504 | 1185 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) | 1030 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
4505 | 1186 | if [ -d /usr/nec ]; then | 1031 | if [ -d /usr/nec ]; then |
4507 | 1187 | echo mips-nec-sysv${UNAME_RELEASE} | 1032 | echo mips-nec-sysv${UNAME_RELEASE} |
4508 | 1188 | else | 1033 | else |
4510 | 1189 | echo mips-unknown-sysv${UNAME_RELEASE} | 1034 | echo mips-unknown-sysv${UNAME_RELEASE} |
4511 | 1190 | fi | 1035 | fi |
4513 | 1191 | exit ;; | 1036 | exit 0 ;; |
4514 | 1192 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. | 1037 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
4515 | 1193 | echo powerpc-be-beos | 1038 | echo powerpc-be-beos |
4517 | 1194 | exit ;; | 1039 | exit 0 ;; |
4518 | 1195 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. | 1040 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
4519 | 1196 | echo powerpc-apple-beos | 1041 | echo powerpc-apple-beos |
4521 | 1197 | exit ;; | 1042 | exit 0 ;; |
4522 | 1198 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. | 1043 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
4523 | 1199 | echo i586-pc-beos | 1044 | echo i586-pc-beos |
4528 | 1200 | exit ;; | 1045 | exit 0 ;; |
4525 | 1201 | BePC:Haiku:*:*) # Haiku running on Intel PC compatible. | ||
4526 | 1202 | echo i586-pc-haiku | ||
4527 | 1203 | exit ;; | ||
4529 | 1204 | SX-4:SUPER-UX:*:*) | 1046 | SX-4:SUPER-UX:*:*) |
4530 | 1205 | echo sx4-nec-superux${UNAME_RELEASE} | 1047 | echo sx4-nec-superux${UNAME_RELEASE} |
4532 | 1206 | exit ;; | 1048 | exit 0 ;; |
4533 | 1207 | SX-5:SUPER-UX:*:*) | 1049 | SX-5:SUPER-UX:*:*) |
4534 | 1208 | echo sx5-nec-superux${UNAME_RELEASE} | 1050 | echo sx5-nec-superux${UNAME_RELEASE} |
4548 | 1209 | exit ;; | 1051 | exit 0 ;; |
4536 | 1210 | SX-6:SUPER-UX:*:*) | ||
4537 | 1211 | echo sx6-nec-superux${UNAME_RELEASE} | ||
4538 | 1212 | exit ;; | ||
4539 | 1213 | SX-7:SUPER-UX:*:*) | ||
4540 | 1214 | echo sx7-nec-superux${UNAME_RELEASE} | ||
4541 | 1215 | exit ;; | ||
4542 | 1216 | SX-8:SUPER-UX:*:*) | ||
4543 | 1217 | echo sx8-nec-superux${UNAME_RELEASE} | ||
4544 | 1218 | exit ;; | ||
4545 | 1219 | SX-8R:SUPER-UX:*:*) | ||
4546 | 1220 | echo sx8r-nec-superux${UNAME_RELEASE} | ||
4547 | 1221 | exit ;; | ||
4549 | 1222 | Power*:Rhapsody:*:*) | 1052 | Power*:Rhapsody:*:*) |
4550 | 1223 | echo powerpc-apple-rhapsody${UNAME_RELEASE} | 1053 | echo powerpc-apple-rhapsody${UNAME_RELEASE} |
4552 | 1224 | exit ;; | 1054 | exit 0 ;; |
4553 | 1225 | *:Rhapsody:*:*) | 1055 | *:Rhapsody:*:*) |
4554 | 1226 | echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} | 1056 | echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} |
4556 | 1227 | exit ;; | 1057 | exit 0 ;; |
4557 | 1228 | *:Darwin:*:*) | 1058 | *:Darwin:*:*) |
4574 | 1229 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown | 1059 | echo `uname -p`-apple-darwin${UNAME_RELEASE} |
4575 | 1230 | case $UNAME_PROCESSOR in | 1060 | exit 0 ;; |
4560 | 1231 | i386) | ||
4561 | 1232 | eval $set_cc_for_build | ||
4562 | 1233 | if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | ||
4563 | 1234 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | ||
4564 | 1235 | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | ||
4565 | 1236 | grep IS_64BIT_ARCH >/dev/null | ||
4566 | 1237 | then | ||
4567 | 1238 | UNAME_PROCESSOR="x86_64" | ||
4568 | 1239 | fi | ||
4569 | 1240 | fi ;; | ||
4570 | 1241 | unknown) UNAME_PROCESSOR=powerpc ;; | ||
4571 | 1242 | esac | ||
4572 | 1243 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} | ||
4573 | 1244 | exit ;; | ||
4576 | 1245 | *:procnto*:*:* | *:QNX:[0123456789]*:*) | 1061 | *:procnto*:*:* | *:QNX:[0123456789]*:*) |
4577 | 1246 | UNAME_PROCESSOR=`uname -p` | 1062 | UNAME_PROCESSOR=`uname -p` |
4578 | 1247 | if test "$UNAME_PROCESSOR" = "x86"; then | 1063 | if test "$UNAME_PROCESSOR" = "x86"; then |
4579 | @@ -1249,28 +1065,22 @@ | |||
4580 | 1249 | UNAME_MACHINE=pc | 1065 | UNAME_MACHINE=pc |
4581 | 1250 | fi | 1066 | fi |
4582 | 1251 | echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} | 1067 | echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} |
4584 | 1252 | exit ;; | 1068 | exit 0 ;; |
4585 | 1253 | *:QNX:*:4*) | 1069 | *:QNX:*:4*) |
4586 | 1254 | echo i386-pc-qnx | 1070 | echo i386-pc-qnx |
4595 | 1255 | exit ;; | 1071 | exit 0 ;; |
4596 | 1256 | NEO-?:NONSTOP_KERNEL:*:*) | 1072 | NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) |
4589 | 1257 | echo neo-tandem-nsk${UNAME_RELEASE} | ||
4590 | 1258 | exit ;; | ||
4591 | 1259 | NSE-?:NONSTOP_KERNEL:*:*) | ||
4592 | 1260 | echo nse-tandem-nsk${UNAME_RELEASE} | ||
4593 | 1261 | exit ;; | ||
4594 | 1262 | NSR-?:NONSTOP_KERNEL:*:*) | ||
4597 | 1263 | echo nsr-tandem-nsk${UNAME_RELEASE} | 1073 | echo nsr-tandem-nsk${UNAME_RELEASE} |
4599 | 1264 | exit ;; | 1074 | exit 0 ;; |
4600 | 1265 | *:NonStop-UX:*:*) | 1075 | *:NonStop-UX:*:*) |
4601 | 1266 | echo mips-compaq-nonstopux | 1076 | echo mips-compaq-nonstopux |
4603 | 1267 | exit ;; | 1077 | exit 0 ;; |
4604 | 1268 | BS2000:POSIX*:*:*) | 1078 | BS2000:POSIX*:*:*) |
4605 | 1269 | echo bs2000-siemens-sysv | 1079 | echo bs2000-siemens-sysv |
4607 | 1270 | exit ;; | 1080 | exit 0 ;; |
4608 | 1271 | DS/*:UNIX_System_V:*:*) | 1081 | DS/*:UNIX_System_V:*:*) |
4609 | 1272 | echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} | 1082 | echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} |
4611 | 1273 | exit ;; | 1083 | exit 0 ;; |
4612 | 1274 | *:Plan9:*:*) | 1084 | *:Plan9:*:*) |
4613 | 1275 | # "uname -m" is not consistent, so use $cputype instead. 386 | 1085 | # "uname -m" is not consistent, so use $cputype instead. 386 |
4614 | 1276 | # is converted to i386 for consistency with other x86 | 1086 | # is converted to i386 for consistency with other x86 |
4615 | @@ -1281,53 +1091,36 @@ | |||
4616 | 1281 | UNAME_MACHINE="$cputype" | 1091 | UNAME_MACHINE="$cputype" |
4617 | 1282 | fi | 1092 | fi |
4618 | 1283 | echo ${UNAME_MACHINE}-unknown-plan9 | 1093 | echo ${UNAME_MACHINE}-unknown-plan9 |
4620 | 1284 | exit ;; | 1094 | exit 0 ;; |
4621 | 1095 | i*86:OS/2:*:*) | ||
4622 | 1096 | # If we were able to find `uname', then EMX Unix compatibility | ||
4623 | 1097 | # is probably installed. | ||
4624 | 1098 | echo ${UNAME_MACHINE}-pc-os2-emx | ||
4625 | 1099 | exit 0 ;; | ||
4626 | 1285 | *:TOPS-10:*:*) | 1100 | *:TOPS-10:*:*) |
4627 | 1286 | echo pdp10-unknown-tops10 | 1101 | echo pdp10-unknown-tops10 |
4629 | 1287 | exit ;; | 1102 | exit 0 ;; |
4630 | 1288 | *:TENEX:*:*) | 1103 | *:TENEX:*:*) |
4631 | 1289 | echo pdp10-unknown-tenex | 1104 | echo pdp10-unknown-tenex |
4633 | 1290 | exit ;; | 1105 | exit 0 ;; |
4634 | 1291 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) | 1106 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) |
4635 | 1292 | echo pdp10-dec-tops20 | 1107 | echo pdp10-dec-tops20 |
4637 | 1293 | exit ;; | 1108 | exit 0 ;; |
4638 | 1294 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) | 1109 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) |
4639 | 1295 | echo pdp10-xkl-tops20 | 1110 | echo pdp10-xkl-tops20 |
4641 | 1296 | exit ;; | 1111 | exit 0 ;; |
4642 | 1297 | *:TOPS-20:*:*) | 1112 | *:TOPS-20:*:*) |
4643 | 1298 | echo pdp10-unknown-tops20 | 1113 | echo pdp10-unknown-tops20 |
4645 | 1299 | exit ;; | 1114 | exit 0 ;; |
4646 | 1300 | *:ITS:*:*) | 1115 | *:ITS:*:*) |
4647 | 1301 | echo pdp10-unknown-its | 1116 | echo pdp10-unknown-its |
4677 | 1302 | exit ;; | 1117 | exit 0 ;; |
4678 | 1303 | SEI:*:*:SEIUX) | 1118 | i*86:XTS-300:*:STOP) |
4679 | 1304 | echo mips-sei-seiux${UNAME_RELEASE} | 1119 | echo ${UNAME_MACHINE}-unknown-stop |
4680 | 1305 | exit ;; | 1120 | exit 0 ;; |
4681 | 1306 | *:DragonFly:*:*) | 1121 | i*86:atheos:*:*) |
4682 | 1307 | echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | 1122 | echo ${UNAME_MACHINE}-unknown-atheos |
4683 | 1308 | exit ;; | 1123 | exit 0 ;; |
4655 | 1309 | *:*VMS:*:*) | ||
4656 | 1310 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | ||
4657 | 1311 | case "${UNAME_MACHINE}" in | ||
4658 | 1312 | A*) echo alpha-dec-vms ; exit ;; | ||
4659 | 1313 | I*) echo ia64-dec-vms ; exit ;; | ||
4660 | 1314 | V*) echo vax-dec-vms ; exit ;; | ||
4661 | 1315 | esac ;; | ||
4662 | 1316 | *:XENIX:*:SysV) | ||
4663 | 1317 | echo i386-pc-xenix | ||
4664 | 1318 | exit ;; | ||
4665 | 1319 | i*86:skyos:*:*) | ||
4666 | 1320 | echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' | ||
4667 | 1321 | exit ;; | ||
4668 | 1322 | i*86:rdos:*:*) | ||
4669 | 1323 | echo ${UNAME_MACHINE}-pc-rdos | ||
4670 | 1324 | exit ;; | ||
4671 | 1325 | i*86:AROS:*:*) | ||
4672 | 1326 | echo ${UNAME_MACHINE}-pc-aros | ||
4673 | 1327 | exit ;; | ||
4674 | 1328 | x86_64:VMkernel:*:*) | ||
4675 | 1329 | echo ${UNAME_MACHINE}-unknown-esx | ||
4676 | 1330 | exit ;; | ||
4684 | 1331 | esac | 1124 | esac |
4685 | 1332 | 1125 | ||
4686 | 1333 | #echo '(No uname command or uname output not recognized.)' 1>&2 | 1126 | #echo '(No uname command or uname output not recognized.)' 1>&2 |
4687 | @@ -1350,16 +1143,16 @@ | |||
4688 | 1350 | #include <sys/param.h> | 1143 | #include <sys/param.h> |
4689 | 1351 | printf ("m68k-sony-newsos%s\n", | 1144 | printf ("m68k-sony-newsos%s\n", |
4690 | 1352 | #ifdef NEWSOS4 | 1145 | #ifdef NEWSOS4 |
4692 | 1353 | "4" | 1146 | "4" |
4693 | 1354 | #else | 1147 | #else |
4695 | 1355 | "" | 1148 | "" |
4696 | 1356 | #endif | 1149 | #endif |
4698 | 1357 | ); exit (0); | 1150 | ); exit (0); |
4699 | 1358 | #endif | 1151 | #endif |
4700 | 1359 | #endif | 1152 | #endif |
4701 | 1360 | 1153 | ||
4702 | 1361 | #if defined (__arm) && defined (__acorn) && defined (__unix) | 1154 | #if defined (__arm) && defined (__acorn) && defined (__unix) |
4704 | 1362 | printf ("arm-acorn-riscix\n"); exit (0); | 1155 | printf ("arm-acorn-riscix"); exit (0); |
4705 | 1363 | #endif | 1156 | #endif |
4706 | 1364 | 1157 | ||
4707 | 1365 | #if defined (hp300) && !defined (hpux) | 1158 | #if defined (hp300) && !defined (hpux) |
4708 | @@ -1448,12 +1241,12 @@ | |||
4709 | 1448 | } | 1241 | } |
4710 | 1449 | EOF | 1242 | EOF |
4711 | 1450 | 1243 | ||
4714 | 1451 | $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && | 1244 | $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 |
4715 | 1452 | { echo "$SYSTEM_NAME"; exit; } | 1245 | rm -f $dummy.c $dummy |
4716 | 1453 | 1246 | ||
4717 | 1454 | # Apollos put the system type in the environment. | 1247 | # Apollos put the system type in the environment. |
4718 | 1455 | 1248 | ||
4720 | 1456 | test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } | 1249 | test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } |
4721 | 1457 | 1250 | ||
4722 | 1458 | # Convex versions that predate uname can use getsysinfo(1) | 1251 | # Convex versions that predate uname can use getsysinfo(1) |
4723 | 1459 | 1252 | ||
4724 | @@ -1462,22 +1255,22 @@ | |||
4725 | 1462 | case `getsysinfo -f cpu_type` in | 1255 | case `getsysinfo -f cpu_type` in |
4726 | 1463 | c1*) | 1256 | c1*) |
4727 | 1464 | echo c1-convex-bsd | 1257 | echo c1-convex-bsd |
4729 | 1465 | exit ;; | 1258 | exit 0 ;; |
4730 | 1466 | c2*) | 1259 | c2*) |
4731 | 1467 | if getsysinfo -f scalar_acc | 1260 | if getsysinfo -f scalar_acc |
4732 | 1468 | then echo c32-convex-bsd | 1261 | then echo c32-convex-bsd |
4733 | 1469 | else echo c2-convex-bsd | 1262 | else echo c2-convex-bsd |
4734 | 1470 | fi | 1263 | fi |
4736 | 1471 | exit ;; | 1264 | exit 0 ;; |
4737 | 1472 | c34*) | 1265 | c34*) |
4738 | 1473 | echo c34-convex-bsd | 1266 | echo c34-convex-bsd |
4740 | 1474 | exit ;; | 1267 | exit 0 ;; |
4741 | 1475 | c38*) | 1268 | c38*) |
4742 | 1476 | echo c38-convex-bsd | 1269 | echo c38-convex-bsd |
4744 | 1477 | exit ;; | 1270 | exit 0 ;; |
4745 | 1478 | c4*) | 1271 | c4*) |
4746 | 1479 | echo c4-convex-bsd | 1272 | echo c4-convex-bsd |
4748 | 1480 | exit ;; | 1273 | exit 0 ;; |
4749 | 1481 | esac | 1274 | esac |
4750 | 1482 | fi | 1275 | fi |
4751 | 1483 | 1276 | ||
4752 | @@ -1488,9 +1281,7 @@ | |||
4753 | 1488 | the operating system you are using. It is advised that you | 1281 | the operating system you are using. It is advised that you |
4754 | 1489 | download the most up to date version of the config scripts from | 1282 | download the most up to date version of the config scripts from |
4755 | 1490 | 1283 | ||
4759 | 1491 | http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD | 1284 | ftp://ftp.gnu.org/pub/gnu/config/ |
4757 | 1492 | and | ||
4758 | 1493 | http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD | ||
4760 | 1494 | 1285 | ||
4761 | 1495 | If the version you run ($0) is already up to date, please | 1286 | If the version you run ($0) is already up to date, please |
4762 | 1496 | send the following data and any information you think might be | 1287 | send the following data and any information you think might be |
4763 | 1497 | 1288 | ||
4764 | === modified file 'config.h.in' | |||
4765 | --- config.h.in 2006-01-19 15:34:04 +0000 | |||
4766 | +++ config.h.in 2013-08-14 10:06:03 +0000 | |||
4767 | @@ -112,6 +112,7 @@ | |||
4768 | 112 | /* Options */ | 112 | /* Options */ |
4769 | 113 | #undef HAVE_LIBWRAP | 113 | #undef HAVE_LIBWRAP |
4770 | 114 | #undef LIBWRAP | 114 | #undef LIBWRAP |
4771 | 115 | #undef LABELED_NET | ||
4772 | 115 | 116 | ||
4773 | 116 | #undef HAVE_LOADAVG | 117 | #undef HAVE_LOADAVG |
4774 | 117 | 118 | ||
4775 | @@ -124,7 +125,7 @@ | |||
4776 | 124 | #undef rlim_t | 125 | #undef rlim_t |
4777 | 125 | 126 | ||
4778 | 126 | /* Versioning Information */ | 127 | /* Versioning Information */ |
4780 | 127 | #define XINETD_VERSION "xinetd Version 2.3.14" | 128 | #define XINETD_VERSION "xinetd Version 2.3.15" |
4781 | 128 | #define MISC_VERSION "MISC Version 1.2.2" | 129 | #define MISC_VERSION "MISC Version 1.2.2" |
4782 | 129 | #define PSET_VERSION "PSET Version 1.2.0" | 130 | #define PSET_VERSION "PSET Version 1.2.0" |
4783 | 130 | #define SIO_VERSION "SIO Version 1.6.2" | 131 | #define SIO_VERSION "SIO Version 1.6.2" |
4784 | 131 | 132 | ||
4785 | === modified file 'config.sub' | |||
4786 | --- config.sub 2012-05-27 19:26:42 +0000 | |||
4787 | +++ config.sub 2013-08-14 10:06:03 +0000 | |||
4788 | @@ -1,10 +1,9 @@ | |||
4789 | 1 | #! /bin/sh | 1 | #! /bin/sh |
4790 | 2 | # Configuration validation subroutine script. | 2 | # Configuration validation subroutine script. |
4791 | 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
4794 | 4 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, | 4 | # 2000, 2001, 2002 Free Software Foundation, Inc. |
4793 | 5 | # 2011, 2012 Free Software Foundation, Inc. | ||
4795 | 6 | 5 | ||
4797 | 7 | timestamp='2012-02-10' | 6 | timestamp='2002-03-07' |
4798 | 8 | 7 | ||
4799 | 9 | # This file is (in principle) common to ALL GNU software. | 8 | # This file is (in principle) common to ALL GNU software. |
4800 | 10 | # The presence of a machine in this file suggests that SOME GNU software | 9 | # The presence of a machine in this file suggests that SOME GNU software |
4801 | @@ -21,25 +20,23 @@ | |||
4802 | 21 | # GNU General Public License for more details. | 20 | # GNU General Public License for more details. |
4803 | 22 | # | 21 | # |
4804 | 23 | # You should have received a copy of the GNU General Public License | 22 | # You should have received a copy of the GNU General Public License |
4807 | 24 | # along with this program; if not, see <http://www.gnu.org/licenses/>. | 23 | # along with this program; if not, write to the Free Software |
4808 | 25 | # | 24 | # Foundation, Inc., 59 Temple Place - Suite 330, |
4809 | 25 | # Boston, MA 02111-1307, USA. | ||
4810 | 26 | |||
4811 | 26 | # As a special exception to the GNU General Public License, if you | 27 | # As a special exception to the GNU General Public License, if you |
4812 | 27 | # distribute this file as part of a program that contains a | 28 | # distribute this file as part of a program that contains a |
4813 | 28 | # configuration script generated by Autoconf, you may include it under | 29 | # configuration script generated by Autoconf, you may include it under |
4814 | 29 | # the same distribution terms that you use for the rest of that program. | 30 | # the same distribution terms that you use for the rest of that program. |
4815 | 30 | 31 | ||
4816 | 31 | |||
4817 | 32 | # Please send patches to <config-patches@gnu.org>. Submit a context | 32 | # Please send patches to <config-patches@gnu.org>. Submit a context |
4819 | 33 | # diff and a properly formatted GNU ChangeLog entry. | 33 | # diff and a properly formatted ChangeLog entry. |
4820 | 34 | # | 34 | # |
4821 | 35 | # Configuration subroutine to validate and canonicalize a configuration type. | 35 | # Configuration subroutine to validate and canonicalize a configuration type. |
4822 | 36 | # Supply the specified configuration type as an argument. | 36 | # Supply the specified configuration type as an argument. |
4823 | 37 | # If it is invalid, we print an error message on stderr and exit with code 1. | 37 | # If it is invalid, we print an error message on stderr and exit with code 1. |
4824 | 38 | # Otherwise, we print the canonical config type on stdout and succeed. | 38 | # Otherwise, we print the canonical config type on stdout and succeed. |
4825 | 39 | 39 | ||
4826 | 40 | # You can get the latest version of this script from: | ||
4827 | 41 | # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD | ||
4828 | 42 | |||
4829 | 43 | # This file is supposed to be the same for all GNU packages | 40 | # This file is supposed to be the same for all GNU packages |
4830 | 44 | # and recognize all the CPU types, system types and aliases | 41 | # and recognize all the CPU types, system types and aliases |
4831 | 45 | # that are meaningful with *any* GNU software. | 42 | # that are meaningful with *any* GNU software. |
4832 | @@ -73,8 +70,7 @@ | |||
4833 | 73 | version="\ | 70 | version="\ |
4834 | 74 | GNU config.sub ($timestamp) | 71 | GNU config.sub ($timestamp) |
4835 | 75 | 72 | ||
4838 | 76 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, | 73 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 |
4837 | 77 | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 | ||
4839 | 78 | Free Software Foundation, Inc. | 74 | Free Software Foundation, Inc. |
4840 | 79 | 75 | ||
4841 | 80 | This is free software; see the source for copying conditions. There is NO | 76 | This is free software; see the source for copying conditions. There is NO |
4842 | @@ -87,11 +83,11 @@ | |||
4843 | 87 | while test $# -gt 0 ; do | 83 | while test $# -gt 0 ; do |
4844 | 88 | case $1 in | 84 | case $1 in |
4845 | 89 | --time-stamp | --time* | -t ) | 85 | --time-stamp | --time* | -t ) |
4847 | 90 | echo "$timestamp" ; exit ;; | 86 | echo "$timestamp" ; exit 0 ;; |
4848 | 91 | --version | -v ) | 87 | --version | -v ) |
4850 | 92 | echo "$version" ; exit ;; | 88 | echo "$version" ; exit 0 ;; |
4851 | 93 | --help | --h* | -h ) | 89 | --help | --h* | -h ) |
4853 | 94 | echo "$usage"; exit ;; | 90 | echo "$usage"; exit 0 ;; |
4854 | 95 | -- ) # Stop option processing | 91 | -- ) # Stop option processing |
4855 | 96 | shift; break ;; | 92 | shift; break ;; |
4856 | 97 | - ) # Use stdin as input. | 93 | - ) # Use stdin as input. |
4857 | @@ -103,7 +99,7 @@ | |||
4858 | 103 | *local*) | 99 | *local*) |
4859 | 104 | # First pass through any local machine types. | 100 | # First pass through any local machine types. |
4860 | 105 | echo $1 | 101 | echo $1 |
4862 | 106 | exit ;; | 102 | exit 0;; |
4863 | 107 | 103 | ||
4864 | 108 | * ) | 104 | * ) |
4865 | 109 | break ;; | 105 | break ;; |
4866 | @@ -122,18 +118,10 @@ | |||
4867 | 122 | # Here we must recognize all the valid KERNEL-OS combinations. | 118 | # Here we must recognize all the valid KERNEL-OS combinations. |
4868 | 123 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | 119 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` |
4869 | 124 | case $maybe_os in | 120 | case $maybe_os in |
4875 | 125 | nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ | 121 | nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) |
4871 | 126 | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ | ||
4872 | 127 | knetbsd*-gnu* | netbsd*-gnu* | \ | ||
4873 | 128 | kopensolaris*-gnu* | \ | ||
4874 | 129 | storm-chaos* | os2-emx* | rtmk-nova*) | ||
4876 | 130 | os=-$maybe_os | 122 | os=-$maybe_os |
4877 | 131 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | 123 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` |
4878 | 132 | ;; | 124 | ;; |
4879 | 133 | android-linux) | ||
4880 | 134 | os=-linux-android | ||
4881 | 135 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown | ||
4882 | 136 | ;; | ||
4883 | 137 | *) | 125 | *) |
4884 | 138 | basic_machine=`echo $1 | sed 's/-[^-]*$//'` | 126 | basic_machine=`echo $1 | sed 's/-[^-]*$//'` |
4885 | 139 | if [ $basic_machine != $1 ] | 127 | if [ $basic_machine != $1 ] |
4886 | @@ -156,13 +144,10 @@ | |||
4887 | 156 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ | 144 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ |
4888 | 157 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | 145 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ |
4889 | 158 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ | 146 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ |
4891 | 159 | -apple | -axis | -knuth | -cray | -microblaze) | 147 | -apple | -axis) |
4892 | 160 | os= | 148 | os= |
4893 | 161 | basic_machine=$1 | 149 | basic_machine=$1 |
4894 | 162 | ;; | 150 | ;; |
4895 | 163 | -bluegene*) | ||
4896 | 164 | os=-cnk | ||
4897 | 165 | ;; | ||
4898 | 166 | -sim | -cisco | -oki | -wec | -winbond) | 151 | -sim | -cisco | -oki | -wec | -winbond) |
4899 | 167 | os= | 152 | os= |
4900 | 168 | basic_machine=$1 | 153 | basic_machine=$1 |
4901 | @@ -177,17 +162,13 @@ | |||
4902 | 177 | os=-chorusos | 162 | os=-chorusos |
4903 | 178 | basic_machine=$1 | 163 | basic_machine=$1 |
4904 | 179 | ;; | 164 | ;; |
4907 | 180 | -chorusrdb) | 165 | -chorusrdb) |
4908 | 181 | os=-chorusrdb | 166 | os=-chorusrdb |
4909 | 182 | basic_machine=$1 | 167 | basic_machine=$1 |
4911 | 183 | ;; | 168 | ;; |
4912 | 184 | -hiux*) | 169 | -hiux*) |
4913 | 185 | os=-hiuxwe2 | 170 | os=-hiuxwe2 |
4914 | 186 | ;; | 171 | ;; |
4915 | 187 | -sco6) | ||
4916 | 188 | os=-sco5v6 | ||
4917 | 189 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
4918 | 190 | ;; | ||
4919 | 191 | -sco5) | 172 | -sco5) |
4920 | 192 | os=-sco3.2v5 | 173 | os=-sco3.2v5 |
4921 | 193 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | 174 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
4922 | @@ -204,10 +185,6 @@ | |||
4923 | 204 | # Don't forget version if it is 3.2v4 or newer. | 185 | # Don't forget version if it is 3.2v4 or newer. |
4924 | 205 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | 186 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
4925 | 206 | ;; | 187 | ;; |
4926 | 207 | -sco5v6*) | ||
4927 | 208 | # Don't forget version if it is 3.2v4 or newer. | ||
4928 | 209 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
4929 | 210 | ;; | ||
4930 | 211 | -sco*) | 188 | -sco*) |
4931 | 212 | os=-sco3.2v2 | 189 | os=-sco3.2v2 |
4932 | 213 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | 190 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
4933 | @@ -249,103 +226,43 @@ | |||
4934 | 249 | # Some are omitted here because they have special meanings below. | 226 | # Some are omitted here because they have special meanings below. |
4935 | 250 | 1750a | 580 \ | 227 | 1750a | 580 \ |
4936 | 251 | | a29k \ | 228 | | a29k \ |
4937 | 252 | | aarch64 | aarch64_be \ | ||
4938 | 253 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | 229 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ |
4939 | 254 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | 230 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ |
4944 | 255 | | am33_2.0 \ | 231 | | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ |
4941 | 256 | | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | ||
4942 | 257 | | be32 | be64 \ | ||
4943 | 258 | | bfin \ | ||
4945 | 259 | | c4x | clipper \ | 232 | | c4x | clipper \ |
4949 | 260 | | d10v | d30v | dlx | dsp16xx \ | 233 | | d10v | d30v | dsp16xx \ |
4950 | 261 | | epiphany \ | 234 | | fr30 \ |
4948 | 262 | | fido | fr30 | frv \ | ||
4951 | 263 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | 235 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ |
4952 | 264 | | hexagon \ | ||
4953 | 265 | | i370 | i860 | i960 | ia64 \ | 236 | | i370 | i860 | i960 | ia64 \ |
4977 | 266 | | ip2k | iq2000 \ | 237 | | m32r | m68000 | m68k | m88k | mcore \ |
4978 | 267 | | le32 | le64 \ | 238 | | mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ |
4979 | 268 | | lm32 \ | 239 | | mips64vr4100 | mips64vr4100el | mips64vr4300 \ |
4980 | 269 | | m32c | m32r | m32rle | m68000 | m68k | m88k \ | 240 | | mips64vr4300el | mips64vr5000 | mips64vr5000el \ |
4981 | 270 | | maxq | mb | microblaze | mcore | mep | metag \ | 241 | | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ |
4982 | 271 | | mips | mipsbe | mipseb | mipsel | mipsle \ | 242 | | mipsisa32 | mipsisa64 \ |
4960 | 272 | | mips16 \ | ||
4961 | 273 | | mips64 | mips64el \ | ||
4962 | 274 | | mips64octeon | mips64octeonel \ | ||
4963 | 275 | | mips64orion | mips64orionel \ | ||
4964 | 276 | | mips64r5900 | mips64r5900el \ | ||
4965 | 277 | | mips64vr | mips64vrel \ | ||
4966 | 278 | | mips64vr4100 | mips64vr4100el \ | ||
4967 | 279 | | mips64vr4300 | mips64vr4300el \ | ||
4968 | 280 | | mips64vr5000 | mips64vr5000el \ | ||
4969 | 281 | | mips64vr5900 | mips64vr5900el \ | ||
4970 | 282 | | mipsisa32 | mipsisa32el \ | ||
4971 | 283 | | mipsisa32r2 | mipsisa32r2el \ | ||
4972 | 284 | | mipsisa64 | mipsisa64el \ | ||
4973 | 285 | | mipsisa64r2 | mipsisa64r2el \ | ||
4974 | 286 | | mipsisa64sb1 | mipsisa64sb1el \ | ||
4975 | 287 | | mipsisa64sr71k | mipsisa64sr71kel \ | ||
4976 | 288 | | mipstx39 | mipstx39el \ | ||
4983 | 289 | | mn10200 | mn10300 \ | 243 | | mn10200 | mn10300 \ |
4984 | 290 | | moxie \ | ||
4985 | 291 | | mt \ | ||
4986 | 292 | | msp430 \ | ||
4987 | 293 | | nds32 | nds32le | nds32be \ | ||
4988 | 294 | | nios | nios2 \ | ||
4989 | 295 | | ns16k | ns32k \ | 244 | | ns16k | ns32k \ |
4992 | 296 | | open8 \ | 245 | | openrisc | or32 \ |
4991 | 297 | | or32 \ | ||
4993 | 298 | | pdp10 | pdp11 | pj | pjl \ | 246 | | pdp10 | pdp11 | pj | pjl \ |
4995 | 299 | | powerpc | powerpc64 | powerpc64le | powerpcle \ | 247 | | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ |
4996 | 300 | | pyramid \ | 248 | | pyramid \ |
4997 | 301 | | rl78 | rx \ | ||
4998 | 302 | | score \ | ||
4999 | 303 | | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | ||
5000 | 304 | | sh64 | sh64le \ |
The diff has been truncated for viewing.
I removed the patch noise and dropped the extra lsb-base dependency; this is priority required and the last LTS has a new enough version. Uploaded, thanks!