Bug 21537

Summary: killall -HUP inetd ignores changes to /etc/auth.conf
Product: Base System Reporter: Dan Langille <dan>
Component: binAssignee: dwmalone
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 1.0-RELEASE   
Hardware: Any   
OS: Any   

Description Dan Langille 2000-09-25 12:20:01 UTC
 Submitter-Id:   
 Originator:     Dan Langille
 Organization:   The FreeBSD Diary
 Confidential:   no
 Synopsis:       inetd doesn't notice change in auth method after a HUP
 Severity:       non-critical
 Priority:	low
 Category:	bin
 Release:        FreeBSD 4.1-STABLE i386
 Class:          sw-bug
 Environment: 
 
 FreeBSD ducky.nz.freebsd.org 4.1-STABLE FreeBSD 4.1-STABLE #0: 
 Mon Aug 21 18:17:33 NZST 2000     
 root@ducky.nz.freebsd.org:/usr/obj/usr/src/sys/DUCKY  i386
 
 Description:
 
 If you change the auth method in /etc/inetd.conf, killall -hup inetd, 
 inetd doesn't start using the new auth method.  it continues to use 
 the old.
 
 How-To-Repeat: 
 
 Set auth method to be:
 
 auth stream  tcp  nowait  root internal  auth -r -f -n -o UNKNOWN -t 30
 
 ensure auth is working properly.
 
 Then change the auth method to be:
 
 auth    stream  tcp     nowait  nobody /usr/local/etc/ident.sh     auth
 
 where /usr/local/etc/ident.sh is:
 
 #!/bin/sh
 ident=`/bin/date +%s`
 xxx=`/usr/bin/head -c 11`
 echo $xxx : USERID:UNIX:$ident
 
 then killall -hup inetd
 
  $ telnet 192.168.0.20 113
 Trying 192.168.0.20...
 Connected to ducky.nz.freebsd.org.
 Escape character is '^]'.
 3413
 0 , 0 : ERROR : UNKNOWN-ERROR
 Connection closed by foreign host.
 
 
 That's the old auth.  There's no way the shell script can produce that.
 
 Problem confirmed and bug fix supplied by 
 Ben Smithurst <ben@scientia.demon.co.uk>.  Thanks Ben
 
 Patch tested and confirmed to work 
 under above named environment by 
 Dan Langille <dan@langille.org>
 
 Fix:
 
 Index: inetd.c
 ===================================================================
 RCS file: /usr/cvs/src/usr.sbin/inetd/inetd.c,v
 retrieving revision 1.83
 diff -u -r1.83 inetd.c
 --- inetd.c	2000/08/03 15:45:38	1.83
 +++ inetd.c	2000/09/21 15:21:13
 @@ -919,6 +919,7 @@
  			sep->se_maxchild = new->se_maxchild;
  			sep->se_numchild = new->se_numchild;
  			sep->se_maxcpm = new->se_maxcpm;
 +			sep->se_bi = new->se_bi;
  			/* might need to turn on or off service now */
  			if (sep->se_fd >= 0) {
  			      if (sep->se_maxchild > 0
 
 --r5Pyd7+fXNt84Ff3--
Comment 1 Peter Wemm freebsd_committer freebsd_triage 2000-09-25 20:25:29 UTC
Responsible Changed
From-To: gnats-admin->freebsd-bugs

Orphaned PR
Comment 2 Johan Karlsson freebsd_committer freebsd_triage 2000-10-16 07:27:25 UTC
Responsible Changed
From-To: freebsd-bugs->dwmalone

David said he wants to look into inetd PRs. 
This one has a patch.
Comment 3 Johan Karlsson freebsd_committer freebsd_triage 2000-10-16 10:00:57 UTC
State Changed
From-To: open->closed

Duplicated by PR 21650.