From dan@ducky.nz.freebsd.org  Fri Sep 29 17:49:06 2000
Return-Path: <dan@ducky.nz.freebsd.org>
Received: from ducky.nz.freebsd.org (ns1.unixathome.org [203.79.82.27])
	by hub.freebsd.org (Postfix) with ESMTP id 5405837B66C
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 29 Sep 2000 17:49:05 -0700 (PDT)
Received: (from dan@localhost)
	by ducky.nz.freebsd.org (8.9.3/8.9.3) id MAA53992;
	Sat, 30 Sep 2000 12:49:03 +1200 (NZST)
Message-Id: <200009300049.MAA53992@ducky.nz.freebsd.org>
Date: Sat, 30 Sep 2000 12:49:03 +1200 (NZST)
From: Dan Langille <dan@ducky.nz.freebsd.org>
Reply-To: dan@freebsddiary.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: inetd doesn't take notice of new auth within inetd.conf after a hup
X-Send-Pr-Version: 3.2

>Number:         21650
>Category:       bin
>Synopsis:       inetd doesn't take notice of new auth within inetd.conf after a hup
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dwmalone
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 29 17:50:00 PDT 2000
>Closed-Date:    Mon Oct 30 03:25:42 PST 2000
>Last-Modified:  Mon Oct 30 03:26:26 PST 2000
>Originator:     Dan Langille
>Release:        FreeBSD 4.1-STABLE i386
>Organization:
The FreeBSD Diary
>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 modify /etc/inetd.conf, and change the auth mechanism, then hup
inetd, inetd continues to use the old auth, not the new auth.

>How-To-Repeat:

modify /etc/inet.conf to contain this auth line:

auth    stream  tcp     nowait  nobody /usr/local/etc/ident.sh     auth

then create this script in /usr/local/etc/ident.sh

#!/bin/sh
ident=`/bin/date +%s`
xxx=`/usr/bin/head -c 11`
echo $xxx : USERID:UNIX:$ident

then killall -hup inetd

then try a telnet to port 113 from another box:

[dan@set:/usr/local/etc/freshports] $ telnet 192.168.0.20 113
Trying 192.168.0.20...
Connected to ducky.nz.freebsd.org.
Escape character is '^]'.
lkjadfa
0 , 0 : ERROR : X-INVALID-REQUEST
Connection closed by foreign host.

As you can see, there's no way said script can create that error.
inetd is still using the other auth.

>Fix:

This path from Ben Smithurst <ben@scientia.demon.co.uk> and tested
by submitter.


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--


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dwmalone 
Responsible-Changed-By: johan 
Responsible-Changed-When: Sat Sep 30 12:20:13 PDT 2000 
Responsible-Changed-Why:  
David has expressed interest in inetd. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21650 
State-Changed-From-To: open->closed 
State-Changed-By: dwmalone 
State-Changed-When: Mon Oct 30 03:25:42 PST 2000 
State-Changed-Why:  
Fix should now be in -current and -stable. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21650 
>Unformatted:
