Merge lp:~noskcaj/ubuntu/saucy/xinetd/2.3.15 into lp:ubuntu/saucy/xinetd

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
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+180082@code.launchpad.net

Description of the change

Merged from debian unstable

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

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!

review: Approve

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

Subscribers

People subscribed via source and target branches

to all changes: