Bug 21650 - inetd doesn't take notice of new auth within inetd.conf after a hup
Summary: inetd doesn't take notice of new auth within inetd.conf after a hup
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.1-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: dwmalone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-09-30 01:50 UTC by Dan Langille
Modified: 2000-10-30 11:26 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Langille 2000-09-30 01:50:00 UTC
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.

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




--r5Pyd7+fXNt84Ff3----WASQIy3AMjErHd8OehFf8ciXMB69X9CF9c5E7KiB6VdTkjGY
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

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
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.
Comment 1 Johan Karlsson freebsd_committer freebsd_triage 2000-09-30 20:20:13 UTC
Responsible Changed
From-To: freebsd-bugs->dwmalone

David has expressed interest in inetd.
Comment 2 dwmalone freebsd_committer freebsd_triage 2000-10-30 11:25:42 UTC
State Changed
From-To: open->closed

Fix should now be in -current and -stable.