Bug 1725 - inetd internal time (tcp/udp port 37) service broken
Summary: inetd internal time (tcp/udp port 37) service broken
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: netkit-base
Version: 5.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
: 891 1834 1857 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-03-24 01:00 UTC by Stefan Hudson
Modified: 2008-05-01 15:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-03-26 22:46:17 UTC
Embargoed:


Attachments (Terms of Use)

Description Stefan Hudson 1999-03-24 01:00:36 UTC
inetd has a number of built-in small services, including
machine-readable time (RFC1129).  This service does not
work correctly with the version of inetd that ships with
Redhat 5.2.  UDP mode prints:
inetd[254]: internal: exit status 0x1
to syslog for every packet received.  TCP mode simply closes
the connection without outputting anything.

This service should probably be added to the default
inetd.conf; in.timed is not necessary, and does not support
UDP mode (the internal inetd version DOES support UDP mode,
even though the man page indicates otherwise).  UDP time
service is required for time setting service on some
embedded TCP devices, including some routers.

The internal time service works correctly with the inetd
that ships with Slackware 3.6 (netkit-base-0.10).

Comment 1 Jeff Johnson 1999-03-24 14:20:59 UTC
*** Bug 891 has been marked as a duplicate of this bug. ***

/etc/inetd.conf contains the following two lines:

time   stream  tcp     nowait  nobody  /usr/sbin/tcpd
in.timed
time   dgram   udp     wait    nobody  /usr/sbin/tcpd
in.timed

This is incorrect for at least the following two reasons.

1.  in.timed should be running continuously if it is running
    at all.  It is not a on demand service, like telnet, but
    rather an active service like xntpd.
2.  The time protocol is built into inetd, just like daytime
    and chargen.

/etc/inetd.conf should have the two lines shown above taken
out and these two lines should be added:

time    stream  tcp     nowait  root    internal
time    dgram   udp     wait    root    internal

This mistake is in all versions that I have checked between
RedHat 4.2 and 5.2.

Tom Schenk
Systems Administrator
Deja News, Inc.

------- Additional Comments From tschenk  01/20/99 16:38 -------
Reason 3 for the current entry being incorrect.

3.  in.timed doesn't talk time protocol.  It talks timed protocol.

------- Additional Comments From seva.uic.edu  01/21/99 12:44 -------
while we are at it, why is gopher still there?

------- Additional Comments From jbj  02/02/99 09:35 -------


*** Bug 1023 has been marked as a duplicate of this bug. ***

UDP time requests to RH Linux systems (including 4.2, 5.0
and 5.1) fail. The symptoms are that no time is returned and
inetd reports "time/udp server failing (looping), service
terminated".

This turns out to be due to an error in inetd.conf.  The
time daemon in.timed is not suitable for handling udp
requests; however inetd provides an internal handler.
Therefore replacing the line:
time   dgram   udp     wait    nobody  /usr/sbin/tcpd
in.timed
with:
time    dgram   udp     wait    root    internal

gives the correct behaviour.

Peter

------- Additional Comments From ayn2  02/02/99 01:49 -------
This is a duplicate of the report #891

------- Additional Comments From jbj  02/11/99 13:35 -------
This problem has been fixed in Raw Hide.

Comment 2 Jeff Johnson 1999-03-26 22:38:59 UTC
Fixed yet again.

BTW, the problem fixing this bug is the huge response caused
by a change to everybody's /etc/inetd.conf. I've added an
option %config(noreplace) to minimize this problem. So, if
you find yourself reading this bug and wondering why your
upgrade didn't fix the problem, check to see if there isn't
an /etc/inetd.conf.rpmnew file with the fix on your machine.

Comment 3 Jeff Johnson 1999-03-26 22:46:59 UTC
*** Bug 1834 has been marked as a duplicate of this bug. ***

The standard inetd includes the "time" functionality.  The
intimed package is not needed for this.

Also, the intimed program doesn't work correctly.  It
handles TCP connections but not UDP connections.Another BTW: We don't turn on the internal services by default
because of the chance that those services might be used to
cause a denial-of-service attack.

Comment 4 Stefan Hudson 1999-03-26 23:28:59 UTC
Please note that the original problem is MORE than just an
inetd.conf problem.  The inetd daemon that ships with 5.2
does not handle time requests correctly, even if the
inetd.conf has been corrected to use the internal time
server.  The inetd that ships with Slackware 3.6 _does_ work
correctly under RH5.2 (with a fixed inetd.conf), so there is
a problem with the binary somewhere.


------- Email Received From  Chris Adams <cadams> 03/26/99 20:37 -------

Comment 5 Stefan Hudson 1999-03-27 01:59:59 UTC
Please note that the original problem is MORE than just an
inetd.conf problem.  The inetd daemon that ships with 5.2
does not handle time requests correctly, even if the
inetd.conf has been corrected to use the internal time
server.  The inetd that ships with Slackware 3.6 _does_ work
correctly under RH5.2 (with a fixed inetd.conf), so there is
a problem with the binary somewhere.

Comment 6 Jeff Johnson 1999-03-27 23:25:59 UTC
*** Bug 1857 has been marked as a duplicate of this bug. ***


# Time service is used for clock syncronization.
#
#time    stream  tcp     nowait  nobody  /usr/sbin/tcpd
in.timed
#time    dgram   udp     wait    nobody  /usr/sbin/tcpd
in.timed


Note You need to log in before you can comment on or make changes to this bug.