From nobody@FreeBSD.ORG Wed May 19 23:44:10 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 6EE2014E7D; Wed, 19 May 1999 23:44:10 -0700 (PDT)
Message-Id: <19990520064410.6EE2014E7D@hub.freebsd.org>
Date: Wed, 19 May 1999 23:44:10 -0700 (PDT)
From: alex@wnm.net
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: Bad lines in 3.2-RELEASE inetd.conf
X-Send-Pr-Version: www-1.0

>Number:         11796
>Category:       misc
>Synopsis:       Bad lines in 3.2-RELEASE inetd.conf
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 19 23:50:04 PDT 1999
>Closed-Date:    Wed Jun 2 19:24:29 PDT 1999
>Last-Modified:  Thu Jul  1 03:40:00 PDT 1999
>Originator:     Alex Charalabidis
>Release:        3.2-RELEASE
>Organization:
WebNet Memphis
>Environment:
FreeBSD bofh.wnm.net 3.2-RELEASE FreeBSD 3.2-RELEASE #0: Tue May 18 04:05:08 GMT 1999     jkh@cathair:/usr/src/sys/compile/GENERIC  i386
>Description:
The default /etc/inetd.conf contains commented out lines for enabling
identd. Both relevant lines refer to the 'ident' service, which is,
according to /etc/services, really 'auth', as it should be.
>How-To-Repeat:
Try running identd without having noticed the glitch. :)
>Fix:
Edit /etc/inetd.conf

>Release-Note:
>Audit-Trail:

From: Dag-Erling Smorgrav <des@flood.ping.uio.no>
To: alex@wnm.net
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf
Date: 01 Jun 1999 16:26:46 +0200

 alex@wnm.net writes:
 > The default /etc/inetd.conf contains commented out lines for enabling
 > identd. Both relevant lines refer to the 'ident' service, which is,
 > according to /etc/services, really 'auth', as it should be.
 
 Oh?
 
 root@des ~# grep -w 113 /etc/services  
 auth            113/tcp    ident tap    #Authentication Service
 auth            113/udp    ident tap    #Authentication Service
 
 > >How-To-Repeat:
 > Try running identd without having noticed the glitch. :)
 
 Works just fine, thank you very much :)
 
 DES
 -- 
 Dag-Erling Smorgrav - des@flood.ping.uio.no
 
State-Changed-From-To: open->closed 
State-Changed-By: billf 
State-Changed-When: Wed Jun 2 19:24:29 PDT 1999 
State-Changed-Why:  
As des pointed out, this is not a bug. 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Doug <Studded@gorean.org>
Cc: freebsd-hackers@FreeBSD.ORG,
	Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-gnat-submit@FreeBSD.org, alex@wnm.net
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf] 
Date: Mon, 21 Jun 1999 17:24:45 +0200

 On Mon, 21 Jun 1999 08:02:14 MST, Doug wrote:
 
 >  The service-name entry is the name of a valid service in the file
 > /etc/services. For ``internal'' services (discussed below), the
 > service name must be the official name of the service (that is, the first
 > entry in /etc/services). 
 
 Read the services(5) manpage. There's nothing wrong with using a
 service's alias.
 
 Ciao,
 Sheldon.
 

From: Doug <Doug@gorean.org>
To: Sheldon Hearn <sheldonh@uunet.co.za>
Cc: Doug <Studded@gorean.org>, freebsd-hackers@FreeBSD.ORG,
	Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-gnats-submit@FreeBSD.ORG, alex@wnm.net
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf] 
Date: Mon, 21 Jun 1999 11:12:26 -0700 (PDT)

 On Mon, 21 Jun 1999, Sheldon Hearn wrote:
 
 > 
 > 
 > On Mon, 21 Jun 1999 08:02:14 MST, Doug wrote:
 > 
 > >  The service-name entry is the name of a valid service in the file
 > > /etc/services. For ``internal'' services (discussed below), the
 > > service name must be the official name of the service (that is, the first
 > > entry in /etc/services). 
 > 
 > Read the services(5) manpage. There's nothing wrong with using a
 > service's alias.
 
 	Can you point out exactly what part of the man page that you are
 referring to that contradicts what the inetd man page says? Have you
 checked the actual code for inetd to verify that it will work with
 services aliases? 
 
 	In my experience, and in the experience of the PR poster it *is*
 necessary to use the canonical name of the service, however if you can
 check the code, test it thoroughly and determine that inetd works
 perfectly well with aliases, then feel free to change the man page for
 inetd. 
 
 Thanks,
 
 Doug
 --  
 On account of being a democracy and run by the people, we are the only
 nation in the world that has to keep a government four years, no matter
 what it does.
                 -- Will Rogers
 
 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Doug <Doug@gorean.org>
Cc: Doug <Studded@gorean.org>, freebsd-hackers@FreeBSD.ORG,
	Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-gnats-submit@FreeBSD.ORG, alex@wnm.net
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf] 
Date: Mon, 21 Jun 1999 20:19:48 +0200

 On Mon, 21 Jun 1999 11:12:26 MST, Doug wrote:
 
 > 	Can you point out exactly what part of the man page that you are
 > referring to that contradicts what the inetd man page says? Have you
 > checked the actual code for inetd to verify that it will work with
 > services aliases? 
 
 Certainly. From services(5):
 
      The services file contains information regarding the known services
      available in the DARPA Internet.  For each service a single line should
      be present with the following information:
 
            official service name
            port number
            protocol name
            aliases
 
 We wouldn't be straying too far from reality if we interpretated the
 word "alias" as "another name for".
 
 We now look at /etc/services and see:
 
 auth            113/tcp    ident tap    #Authentication Service
 auth            113/udp    ident tap    #Authentication Service
 
 We read from this that each of "ident" and "tap" is "another name for"
 "auth".
 
 We now look et /etc/inetd.conf, where we find:
 
 #ident  stream  tcp     wait    kmem:kmem       /usr/local/sbin/identd identd -w -t120
 
 I uncommented this line a few years ago and haven't had a problem with
 my ident service that I could think of.
 
 > 	In my experience, and in the experience of the PR poster it *is*
 > necessary to use the canonical name of the service, however if you can
 > check the code, test it thoroughly and determine that inetd works
 > perfectly well with aliases, then feel free to change the man page for
 > inetd. 
 
 Since the manpage supports my experience thus far, I really can't see
 how you'd put the burden of proof on me. :-)
 
 Let's see a "How-To-Repeat" of somewhat more substance than "Try running
 identd without having noticed the glitch".
 
 Ciao,
 Sheldon.
 

From: Dag-Erling Smorgrav <des@flood.ping.uio.no>
To: Doug <Doug@gorean.org>
Cc: Sheldon Hearn <sheldonh@uunet.co.za>, Doug <Studded@gorean.org>,
	freebsd-hackers@FreeBSD.ORG,
	Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-gnats-submit@FreeBSD.ORG, alex@wnm.net
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf]
Date: 21 Jun 1999 20:32:08 +0200

 Doug <Doug@gorean.org> writes:
 > 	In my experience, and in the experience of the PR poster it *is*
 > necessary to use the canonical name of the service, however if you can
 > check the code, test it thoroughly and determine that inetd works
 > perfectly well with aliases, then feel free to change the man page for
 > inetd. 
 
 Empirical evidence as well as the source code say you're both wrong.
 The builtin ident service is listed as "ident" in inetd's table over
 internal services.
 
 des@des ~% telnet localhost auth
 Trying 127.0.0.1...
 Connected to localhost.
 Escape character is '^]'.
 des
 des:ERROR:HIDDEN-USER
 Connection closed by foreign host.
 des@des ~% grep ident /etc/inetd.conf 
 # Return error for all "ident" requests
 ident   stream  tcp     nowait  root    internal
 # example entry for the optional ident server
 #ident  stream  tcp     wait    kmem:kmem       /usr/local/sbin/identd  identd -w -t120
 des@des ~% grep ident /usr/src/usr.sbin/inetd/inetd.c
 void            ident_stream __P((int, struct servtab *));
         { "ident",      SOCK_STREAM,    1, -1,  ident_stream },
 ident_stream(s, sep)            /* Ident service */
 
 DES
 -- 
 Dag-Erling Smorgrav - des@flood.ping.uio.no
 

From: Doug <Doug@gorean.org>
To: Sheldon Hearn <sheldonh@uunet.co.za>
Cc: freebsd-hackers@FreeBSD.ORG,
	Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-gnats-submit@FreeBSD.ORG, alex@wnm.net
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf] 
Date: Mon, 21 Jun 1999 11:42:46 -0700 (PDT)

 On Mon, 21 Jun 1999, Sheldon Hearn wrote:
 
 > On Mon, 21 Jun 1999 11:12:26 MST, Doug wrote:
 > 
 > > 	Can you point out exactly what part of the man page that you are
 > > referring to that contradicts what the inetd man page says? Have you
 > > checked the actual code for inetd to verify that it will work with
 > > services aliases? 
 > 
 > Certainly. From services(5):
 
 ...
 
 	Quoting the part of the man page that says there are such a thing
 as aliases does not refute the part of the inetd man page that says even
 though there are such a thing as aliases, you can't use them for internal
 services. 
 
 > > 	In my experience, and in the experience of the PR poster it *is*
 > > necessary to use the canonical name of the service, however if you can
 > > check the code, test it thoroughly and determine that inetd works
 > > perfectly well with aliases, then feel free to change the man page for
 > > inetd. 
 > 
 > Since the manpage supports my experience thus far, I really can't see
 > how you'd put the burden of proof on me. :-)
 
 	You are really really missing my point here, so I will state it
 again. If you have carefully examined the code for *every* case of *every*
 internal service, and you have tested it thoroughly, and you are 100% sure
 that the man page is in error, change the man page. 
 
 	If all of the above is not true, you should change the example for
 ident in the sample conf file because even IF it works, even if it works
 *100%* of the time for YOU, there is an outstanding PR that shows it
 doesn't work for everybody, and there is absolutely no justification for
 leaving an example in the conf file that conflicts with the man page. (No
 justification other than the ubiquitous, "We've always done it that way.")
 
 	I sincerely hope that I've made myself sufficiently clear on this.
 If you are still confused, please feel free to respond.
 
 Thanks,
 
 Doug
 
 

From: Dag-Erling Smorgrav <des@flood.ping.uio.no>
To: Doug <Doug@gorean.org>
Cc: Sheldon Hearn <sheldonh@uunet.co.za>,
	freebsd-hackers@FreeBSD.ORG,
	Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-gnats-submit@FreeBSD.ORG, alex@wnm.net
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf]
Date: 21 Jun 1999 20:50:03 +0200

 Doug <Doug@gorean.org> writes:
 > 	You are really really missing my point here, so I will state it
 > again. If you have carefully examined the code for *every* case of *every*
 > internal service, and you have tested it thoroughly, and you are 100% sure
 > that the man page is in error, change the man page. 
 
 The confusion arises from the fact that inetd and /etc/services
 disagree on what the canonical name for the ident service is. Inetd
 has these canonical names hardcoded in an array of structs, so
 changing the canonical name in /etc/services does not affect inetd's
 belief of what the canonical name is.
 
 DES
 -- 
 Dag-Erling Smorgrav - des@flood.ping.uio.no
 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Doug <Doug@gorean.org>
Cc: freebsd-hackers@FreeBSD.ORG,
	Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-gnats-submit@FreeBSD.ORG, alex@wnm.net
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf] 
Date: Mon, 21 Jun 1999 20:54:02 +0200

 On Mon, 21 Jun 1999 11:42:46 MST, Doug wrote:
 
 > [...] there is an outstanding PR that shows it
 > doesn't work for everybody, and there is absolutely no justification for
 > leaving an example in the conf file that conflicts with the man page.
 
 Doug, I'm annoyed that you ignored the most important part of my
 previous mail. What I quote you on having said above is not true There
 is no outstanding PR that shows anything at all on this issue. The PR
 you're talking about is 100% content-free.
 
 I'm particularly keen in seeing inetd as bug-free as possible, so I urge
 you _again_ to produce a meaningful "How-To-Repeat".
 
 > (No justification other than the ubiquitous, "We've always done it
 > that way.")
 
 This is an aside, but it's worth noting. A comment like that makes it
 sound like you underestimate the time a sysadmin saves by knowing "the
 way things have always been".
 
 In this particular case, note that both OpenBSD and NetBSD ship with an
 inetd.conf that uses the service name "ident" instead of "auth".
 
 Ciao,
 Sheldon.
 

From: Doug <Doug@gorean.org>
To: Dag-Erling Smorgrav <des@flood.ping.uio.no>
Cc: Sheldon Hearn <sheldonh@uunet.co.za>,
	freebsd-hackers@FreeBSD.ORG, freebsd-gnats-submit@FreeBSD.ORG,
	alex@wnm.net
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf]
Date: Mon, 21 Jun 1999 12:10:47 -0700 (PDT)

 On 21 Jun 1999, Dag-Erling Smorgrav wrote:
 
 > Doug <Doug@gorean.org> writes:
 > > 	You are really really missing my point here, so I will state it
 > > again. If you have carefully examined the code for *every* case of *every*
 > > internal service, and you have tested it thoroughly, and you are 100% sure
 > > that the man page is in error, change the man page. 
 > 
 > The confusion arises from the fact that inetd and /etc/services
 > disagree on what the canonical name for the ident service is. Inetd
 > has these canonical names hardcoded in an array of structs, so
 > changing the canonical name in /etc/services does not affect inetd's
 > belief of what the canonical name is.
 
 	Ok, so what we're looking at is actually an entirely different
 error. :) In fact, the man page is correct, however the inetd code
 currently has an outdated version of the canonical name. Thus, at minimum
 the man page should be udpated to reflect this reality. A better solution
 would be to remove the hard coded values in the code, and fix the config
 file. 
 
 	It adds unneeded steepness to the learning curve to have the man
 page and the example configuration file out of synch. The average new user
 would have no reason to check the code to get an answer to this. 
 
 Thanks,
 
 Doug
 -- 
 On account of being a democracy and run by the people, we are the only
 nation in the world that has to keep a government four years, no matter
 what it does.
                 -- Will Rogers
 
 

From: "Brian F. Feldman" <green@unixhelp.org>
To: Sheldon Hearn <sheldonh@uunet.co.za>
Cc: Doug <Doug@gorean.org>, Doug <Studded@gorean.org>,
	freebsd-hackers@FreeBSD.ORG,
	Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-gnats-submit@FreeBSD.ORG, alex@wnm.net
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf] 
Date: Mon, 21 Jun 1999 15:21:10 -0400 (EDT)

 By the way, I'd recommend all -CURRENT users, after making world, make a
 new copy of pidentd. The code to grovel through the kernel to find socket
 info is MUCH less sickening now, so identd is less of a performance hit
 and less likely to fail due to race conditions.
 
  Brian Fundakowski Feldman      _ __ ___ ____  ___ ___ ___  
  green@FreeBSD.org                   _ __ ___ | _ ) __|   \ 
      FreeBSD: The Power to Serve!        _ __ | _ \._ \ |) |
        http://www.FreeBSD.org/              _ |___/___/___/ 
 
 

From: Doug <Doug@gorean.org>
To: Sheldon Hearn <sheldonh@uunet.co.za>
Cc: freebsd-hackers@FreeBSD.ORG,
	Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-gnats-submit@FreeBSD.ORG, alex@wnm.net
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf] 
Date: Mon, 21 Jun 1999 12:21:34 -0700 (PDT)

 On Mon, 21 Jun 1999, Sheldon Hearn wrote:
 
 > 
 > 
 > On Mon, 21 Jun 1999 11:42:46 MST, Doug wrote:
 > 
 > > [...] there is an outstanding PR that shows it
 > > doesn't work for everybody, and there is absolutely no justification for
 > > leaving an example in the conf file that conflicts with the man page.
 > 
 > Doug, I'm annoyed that you ignored the most important part of my
 > previous mail. What I quote you on having said above is not true There
 > is no outstanding PR that shows anything at all on this issue. The PR
 > you're talking about is 100% content-free.
 
 	"It doesn't work with the conf file that came with the system, but
 it does work if I change the conf file to match the documentation" is
 pretty good content in my book. Obviously he doesn't include information
 on how to repeat the problem in a verifiable way, but that doesn't (in my
 book anyway) invalidate the PR. 
 
 > I'm particularly keen in seeing inetd as bug-free as possible, so I urge
 > you _again_ to produce a meaningful "How-To-Repeat".
 
 	I urge you, again, to try and understand my point. There is no
 reason to have the man page and the example conf file out of synch. Also,
 as Dag-Erling pointed out, the real problem is much deeper than either,
 however bringing the documentation up to date *should* be a priority
 regardless of how many of the other problems you choose to fix. 
  
 > > (No justification other than the ubiquitous, "We've always done it
 > > that way.")
 > 
 > This is an aside, but it's worth noting. A comment like that makes it
 > sound like you underestimate the time a sysadmin saves by knowing "the
 > way things have always been".
 
 	Don't be ridiculous, the two things have nothing to do with one
 another. You're trying to justify perpetuating an error as a time saver to
 people who already know better, and I'm trying to point out that new users
 shouldn't be hampered by this kind of nonsense. Fix the man page, the
 config file AND the code and no one will be inconvenienced because it will
 all work the way it ought to. 
 
 > In this particular case, note that both OpenBSD and NetBSD ship with an
 > inetd.conf that uses the service name "ident" instead of "auth".
 
 	Even if they were doing everything right, you're still tossing in
 red herrings. My point is not about whether it works, my point is that the
 documentation should be consistent with reality. Whether we're talking
 about an ideal reality or not is a whole other story.
 
 Doug
 
 

From: "Brian F. Feldman" <green@unixhelp.org>
To: Sheldon Hearn <sheldonh@uunet.co.za>
Cc: Doug <Doug@gorean.org>, Doug <Studded@gorean.org>,
	freebsd-hackers@FreeBSD.ORG,
	Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-gnats-submit@FreeBSD.ORG, alex@wnm.net
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf] 
Date: Mon, 21 Jun 1999 15:21:10 -0400 (EDT)

 By the way, I'd recommend all -CURRENT users, after making world, make a
 new copy of pidentd. The code to grovel through the kernel to find socket
 info is MUCH less sickening now, so identd is less of a performance hit
 and less likely to fail due to race conditions.
 
  Brian Fundakowski Feldman      _ __ ___ ____  ___ ___ ___  
  green@FreeBSD.org                   _ __ ___ | _ ) __|   \ 
      FreeBSD: The Power to Serve!        _ __ | _ \._ \ |) |
        http://www.FreeBSD.org/              _ |___/___/___/ 
 
 
 
 To Unsubscribe: send mail to majordomo@FreeBSD.org
 with "unsubscribe freebsd-hackers" in the body of the message
 
 

From: Doug <Doug@gorean.org>
To: Sheldon Hearn <sheldonh@uunet.co.za>
Cc: freebsd-hackers@FreeBSD.ORG,
	Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-gnats-submit@FreeBSD.ORG, alex@wnm.net
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf] 
Date: Mon, 21 Jun 1999 12:21:34 -0700 (PDT)

 On Mon, 21 Jun 1999, Sheldon Hearn wrote:
 
 > 
 > 
 > On Mon, 21 Jun 1999 11:42:46 MST, Doug wrote:
 > 
 > > [...] there is an outstanding PR that shows it
 > > doesn't work for everybody, and there is absolutely no justification for
 > > leaving an example in the conf file that conflicts with the man page.
 > 
 > Doug, I'm annoyed that you ignored the most important part of my
 > previous mail. What I quote you on having said above is not true There
 > is no outstanding PR that shows anything at all on this issue. The PR
 > you're talking about is 100% content-free.
 
 	"It doesn't work with the conf file that came with the system, but
 it does work if I change the conf file to match the documentation" is
 pretty good content in my book. Obviously he doesn't include information
 on how to repeat the problem in a verifiable way, but that doesn't (in my
 book anyway) invalidate the PR. 
 
 > I'm particularly keen in seeing inetd as bug-free as possible, so I urge
 > you _again_ to produce a meaningful "How-To-Repeat".
 
 	I urge you, again, to try and understand my point. There is no
 reason to have the man page and the example conf file out of synch. Also,
 as Dag-Erling pointed out, the real problem is much deeper than either,
 however bringing the documentation up to date *should* be a priority
 regardless of how many of the other problems you choose to fix. 
  
 > > (No justification other than the ubiquitous, "We've always done it
 > > that way.")
 > 
 > This is an aside, but it's worth noting. A comment like that makes it
 > sound like you underestimate the time a sysadmin saves by knowing "the
 > way things have always been".
 
 	Don't be ridiculous, the two things have nothing to do with one
 another. You're trying to justify perpetuating an error as a time saver to
 people who already know better, and I'm trying to point out that new users
 shouldn't be hampered by this kind of nonsense. Fix the man page, the
 config file AND the code and no one will be inconvenienced because it will
 all work the way it ought to. 
 
 > In this particular case, note that both OpenBSD and NetBSD ship with an
 > inetd.conf that uses the service name "ident" instead of "auth".
 
 	Even if they were doing everything right, you're still tossing in
 red herrings. My point is not about whether it works, my point is that the
 documentation should be consistent with reality. Whether we're talking
 about an ideal reality or not is a whole other story.
 
 Doug
 
 
 
 To Unsubscribe: send mail to majordomo@FreeBSD.org
 with "unsubscribe freebsd-hackers" in the body of the message
 
 

From: Dag-Erling Smorgrav <des@flood.ping.uio.no>
To: Doug <Doug@gorean.org>
Cc: Sheldon Hearn <sheldonh@uunet.co.za>,
	freebsd-hackers@FreeBSD.ORG,
	Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-gnats-submit@FreeBSD.ORG, alex@wnm.net
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf]
Date: 21 Jun 1999 21:45:28 +0200

 Doug <Doug@gorean.org> writes:
 > 	"It doesn't work with the conf file that came with the system, but
 > it does work if I change the conf file to match the documentation" is
 > pretty good content in my book. Obviously he doesn't include information
 > on how to repeat the problem in a verifiable way, but that doesn't (in my
 > book anyway) invalidate the PR. 
 
 The PR is wrong. Sheldon is right. It *does* work the way it ships. If
 he experienced problems, I bet the real bug was that he edited
 inetd.conf, HUPed inetd, and hit the "HUP clobbers the service table"
 bug.
 
 > 	I urge you, again, to try and understand my point. There is no
 > reason to have the man page and the example conf file out of synch. Also,
 > as Dag-Erling pointed out, the real problem is much deeper than either,
 > however bringing the documentation up to date *should* be a priority
 > regardless of how many of the other problems you choose to fix. 
 
 The right way to fix the documentation is simply to mention what inetd
 thinks the canonical names are.
 
 The alternative solution is to extend the format of inetd.conf to
 allow specifying the service name after the 'internal' keyword, so you
 could change /etc/services to read:
 
 fooglorb	113/tcp
 
 and inetd.conf to read:
 
 fooglorb	stream	tcp	nowait	root	internal ident
 
 and inetd would know what service to provide on port 113, even if
 /etc/services doesn't call it 'ident'.
 
 DES
 -- 
 Dag-Erling Smorgrav - des@flood.ping.uio.no
 

From: Alex Charalabidis <alex@wnm.net>
To: Dag-Erling Smorgrav <des@flood.ping.uio.no>
Cc: Doug <Doug@gorean.org>, Sheldon Hearn <sheldonh@uunet.co.za>,
	freebsd-hackers@FreeBSD.ORG, freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf]
Date: Mon, 21 Jun 1999 16:57:35 -0500 (CDT)

 On 21 Jun 1999, Dag-Erling Smorgrav wrote:
 
 > Doug <Doug@gorean.org> writes:
 > > 	"It doesn't work with the conf file that came with the system, but
 > > it does work if I change the conf file to match the documentation" is
 > > pretty good content in my book. Obviously he doesn't include information
 > > on how to repeat the problem in a verifiable way, but that doesn't (in my
 > > book anyway) invalidate the PR. 
 > 
 Whether the PR is valid or not (sure, I admit I've submitted better
 ones...), the discrepancy between /etc/services and inetd.conf is obvious
 to even the less trained eye. Doug's point about not expecting new
 users to RTFS applies to everyone else too when there should be no need
 to do so in the first place, especially with something as old hat as
 inetd.
 
 > The PR is wrong. Sheldon is right. It *does* work the way it ships. If
 > he experienced problems, I bet the real bug was that he edited
 > inetd.conf, HUPed inetd, and hit the "HUP clobbers the service table"
 > bug.
 > 
 I'll accept this as an explanation, since it sounds much more reasonable
 than telling me I have no clue what I'm talking about. I edit inetd.conf
 and HUP, like pretty much everyone else in the world and will keep HUPing
 for many years to come. If it "clobbers the service table" on the odd
 occasion and keeps it clobbered until you change the service's name, well
 duh, please document it, I'm not psychic. :) If it also breaks on the
 first machine I install 3.2-R on and coincides with my discovery of
 aforementioned discrepancy, my guilt is limited to accepting an open
 invitation to jump to conclusions and I will redeem myself through a
 weekend penance of listening to the Spice Girls and watching Celine Dion.
 
 > The right way to fix the documentation is simply to mention what inetd
 > thinks the canonical names are.
 > 
 > The alternative solution is to extend the format of inetd.conf to
 > allow specifying the service name after the 'internal' keyword, so you
 > could change /etc/services to read:
 > 
 Dare I suggest something as straightforward as bringing inetd, inetd.conf,
 /etc/services and the respective manpages into sync with each other and/or
 reality?
 
 There's the remaining $.01 I owe, you now have my two cents. 
 
 
 Regards
 
 -ac
 Alex Charalabidis
 WebNet Memphis
 
 
 
 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Doug <Doug@gorean.org>
Cc: Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-hackers@FreeBSD.ORG, freebsd-gnats-submit@FreeBSD.ORG,
	alex@wnm.net
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf] 
Date: Tue, 22 Jun 1999 10:17:25 +0200

 On Mon, 21 Jun 1999 12:10:47 MST, Doug wrote:
 
 > In fact, the man page is correct, however the inetd code currently
 > has an outdated version of the canonical name. Thus, at minimum the
 > man page should be udpated to reflect this reality. A better solution
 > would be to remove the hard coded values in the code, and fix the
 > config file.
 
 It took me a bit of playing to find the problem, since the PR doesn't
 say
 
 "
 if I use service name ``auth'' instead of ``inetd'', I get the following
 error message from inetd:
 
 	internal service auth unknown
 "
 
 That's the kind of thing I was looking for when I asked you (twice) to
 send a useful "How-To-Repeat". It doesn't help that people who've run
 into the problem understand the vague description provided, because I
 haven't run into it.
 
 Now that I understand the problem, I'd like to put forward this
 proposal:
 
 The manual pages for services(5), inetd(8) and inetd.conf(5) are
 adequate if inetd accepts both canonical service names _and_ aliases.
 Therefore a healthy, backward-compatible change that is unlikely to
 accept existing users is to teach inetd to understand service name
 aliases.
 
 I'm not yet saying that this is possible, but I am saying that I'll
 look into it if it'd make you happy. Whatever your preference is, I'd
 suggest dropping freebsd-hackers from further discussion. Now that we
 all understand each other, it's probably more appropriate that the
 conversation continue on PR feedback only.
 
 Ciao,
 Sheldon.
 

From: Dag-Erling Smorgrav <des@flood.ping.uio.no>
To: Alex Charalabidis <alex@wnm.net>
Cc: Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	Doug <Doug@gorean.org>, Sheldon Hearn <sheldonh@uunet.co.za>,
	freebsd-hackers@FreeBSD.ORG, freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: [Fwd: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf]
Date: 22 Jun 1999 11:02:55 +0200

 Alex Charalabidis <alex@wnm.net> writes:
 > On 21 Jun 1999, Dag-Erling Smorgrav wrote:
 > > The PR is wrong. Sheldon is right. It *does* work the way it ships. If
 > > he experienced problems, I bet the real bug was that he edited
 > > inetd.conf, HUPed inetd, and hit the "HUP clobbers the service table"
 > > bug.
 > I'll accept this as an explanation, since it sounds much more reasonable
 > than telling me I have no clue what I'm talking about. I edit inetd.conf
 > and HUP, like pretty much everyone else in the world and will keep HUPing
 > for many years to come. If it "clobbers the service table" on the odd
 > occasion and keeps it clobbered until you change the service's name, well
 > duh, please document it, I'm not psychic. :)
 
 We have no intention of documenting it, since the bug has been fixed.
 
 >                                              If it also breaks on the
 > first machine I install 3.2-R on and coincides with my discovery of
 > aforementioned discrepancy, my guilt is limited to accepting an open
 > invitation to jump to conclusions and I will redeem myself through a
 > weekend penance of listening to the Spice Girls and watching Celine Dion.
 
 We're not *that* mad at you. Just ten 'power to the world' and five
 'Mmmm-bop' will do.
 
 > > The alternative solution is to extend the format of inetd.conf to
 > > allow specifying the service name after the 'internal' keyword, so you
 > > could change /etc/services to read:
 > Dare I suggest something as straightforward as bringing inetd, inetd.conf,
 > /etc/services and the respective manpages into sync with each other and/or
 > reality?
 
 It's not the right solution. They'll only get out of sync again. The
 correct solution is to stop pretending /etc/services means anything to
 inetd except as a way to map service names to port numbers. It
 doesn't, and never did.
 
 DES
 -- 
 Dag-Erling Smorgrav - des@flood.ping.uio.no
 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Alex Charalabidis <alex@wnm.net>
Cc: Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-gnats-submit@freebsd.org
Subject: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf
Date: Wed, 30 Jun 1999 23:22:40 +0200

 Below is a patch that teaches inetd to match correctly an internal
 service name against any one of the service's canonical name and
 aliases.
 
 It works for me, although it's worth noting that it does _not_ magically
 allow you to start using any old service name in /etc/hosts.allow . The
 name for a service in /etc/hosts.allow must still match the name used to
 configure it in /etc/inetd.conf .
 
 It's for application against CURRENT source.
 
 DES? Wotcha think?
 
 Ciao,
 Sheldon.
 
 PS: The expensive matchservent() isn't called in any long-running loops
     and shold be short-circuited by the || oeprator most of the time.
 
 Index: inetd.c
 ===================================================================
 RCS file: /home/ncvs/src/usr.sbin/inetd/inetd.c,v
 retrieving revision 1.54
 diff -u -d -r1.54 inetd.c
 --- inetd.c	1999/06/28 11:27:14	1.54
 +++ inetd.c	1999/06/30 21:14:01
 @@ -253,6 +253,7 @@
  void		ident_stream __P((int, struct servtab *));
  void		machtime_dg __P((int, struct servtab *));
  void		machtime_stream __P((int, struct servtab *));
 +int		matchservent __P((char *, char *, char *));
  char	       *newstr __P((char *));
  char	       *nextline __P((FILE *));
  void		print_service __P((char *, struct servtab *));
 @@ -1395,8 +1396,10 @@
  		struct biltin *bi;
  
  		for (bi = biltins; bi->bi_service; bi++)
 -			if (bi->bi_socktype == sep->se_socktype &&
 -			    strcmp(bi->bi_service, sep->se_service) == 0)
 +			if ((bi->bi_socktype == sep->se_socktype &&
 +			    strcmp(bi->bi_service, sep->se_service) == 0) ||
 +			    matchservent(bi->bi_service, sep->se_service,
 +			    sep->se_proto))
  				break;
  		if (bi->bi_service == 0) {
  			syslog(LOG_ERR, "internal service %s unknown",
 @@ -1544,6 +1547,22 @@
  		return (cp);
  	syslog(LOG_ERR, "strdup: %m");
  	exit(EX_OSERR);
 +}
 +
 +int matchservent(name1, name2, proto)
 +	char *name1, *name2, *proto;
 +{
 +	char **alias;
 +	struct servent *se;
 +
 +	if ((se = getservbyname(name1, proto)) != NULL) {
 +		if (strcmp(name2, se->s_name) == 0)
 +			return(1);
 +		for (alias = se->s_aliases; *alias; alias++)
 +			if (strcmp(name2, *alias) == 0)
 +				return(1);
 +	}
 +	return(0);
  }
  
  #ifdef OLD_SETPROCTITLE
 

From: Dag-Erling Smorgrav <des@flood.ping.uio.no>
To: Sheldon Hearn <sheldonh@uunet.co.za>
Cc: Alex Charalabidis <alex@wnm.net>,
	Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	freebsd-gnats-submit@freebsd.org
Subject: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf
Date: 01 Jul 1999 10:11:24 +0200

 Sheldon Hearn <sheldonh@uunet.co.za> writes:
 > Below is a patch that teaches inetd to match correctly an internal
 > service name against any one of the service's canonical name and
 > aliases.
 > [...]
 > DES? Wotcha think?
 
 Haven't tested it, but the principle is good and the code looks nice.
 I have a suggestion for improvement, though: if no match is found,
 look for a service name after the 'internal' keyword, and look it up
 in the table of builtin services (*not* /etc/services). e.g.:
 
 fooglorb	stream tcp	nowait	root	internal ident
 
 would result in binding the builtin ident server to whatever port
 'fooglorb' resolves to, even if it's not an alias for 'ident'.
 
 DES
 -- 
 Dag-Erling Smorgrav - des@flood.ping.uio.no
 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Dag-Erling Smorgrav <des@flood.ping.uio.no>
Cc: Alex Charalabidis <alex@wnm.net>,
	freebsd-gnats-submit@freebsd.org
Subject: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf 
Date: Thu, 01 Jul 1999 12:02:01 +0200

 On 01 Jul 1999 10:11:24 +0200, Dag-Erling Smorgrav wrote:
 
 > Haven't tested it, but the principle is good and the code looks nice.
 > I have a suggestion for improvement, though: if no match is found,
 > look for a service name after the 'internal' keyword, and look it up
 > in the table of builtin services (*not* /etc/services). e.g.:
 
 Um. I could do that. But since the inetd.conf format described in
 inetd(8) doesn't suggest that there should be anything after the word
 internal (other than, possibly, another word ``internal''), I can't see
 how this helps us any.
 
 ?
 
 Ciao,
 Sheldon.
 

From: Dag-Erling Smorgrav <des@flood.ping.uio.no>
To: Sheldon Hearn <sheldonh@uunet.co.za>
Cc: Dag-Erling Smorgrav <des@flood.ping.uio.no>,
	Alex Charalabidis <alex@wnm.net>, freebsd-gnats-submit@freebsd.org
Subject: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf
Date: 01 Jul 1999 12:26:08 +0200

 Sheldon Hearn <sheldonh@uunet.co.za> writes:
 > On 01 Jul 1999 10:11:24 +0200, Dag-Erling Smorgrav wrote:
 > > Haven't tested it, but the principle is good and the code looks nice.
 > > I have a suggestion for improvement, though: if no match is found,
 > > look for a service name after the 'internal' keyword, and look it up
 > > in the table of builtin services (*not* /etc/services). e.g.:
 > Um. I could do that. But since the inetd.conf format described in
 > inetd(8) doesn't suggest that there should be anything after the word
 > internal (other than, possibly, another word ``internal''), I can't see
 > how this helps us any.
 
 Exactly. It's an *extension*. And if you can patch the code, you can
 also patch the man page :)
 
 It does help us, in that it allows binding internal services to
 non-default ports without having to fiddle with /etc/services.
 
 DES
 -- 
 Dag-Erling Smorgrav - des@flood.ping.uio.no
 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Dag-Erling Smorgrav <des@flood.ping.uio.no>
Cc: Alex Charalabidis <alex@wnm.net>,
	freebsd-gnats-submit@freebsd.org
Subject: Re: misc/11796: Bad lines in 3.2-RELEASE inetd.conf 
Date: Thu, 01 Jul 1999 12:39:00 +0200

 On 01 Jul 1999 12:26:08 +0200, Dag-Erling Smorgrav wrote:
 
 > It does help us, in that it allows binding internal services to
 > non-default ports without having to fiddle with /etc/services.
 
 Ahah! That's neat. Cool, thanks.
 
 Ciao,
 Sheldon.
 
>Unformatted:
