Subject: bin/7941: inetd stores a pid in a short
To: None <gnats-bugs@gnats.netbsd.org>
From: None <ghudson@MIT.EDU>
List: netbsd-bugs
Date: 07/08/1999 13:18:42
>Number: 7941
>Category: bin
>Synopsis: se_wait is a short
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 8 07:50:00 1999
>Last-Modified:
>Originator: Greg Hudson
>Organization:
MIT
>Release: 1.3.2 (and all others to date, as far as I know)
>Environment:
System: NetBSD rcn-sucks.fsck.com 1.3.2 NetBSD 1.3.2 (ATHENA) #0: Mon Jun 22 17:32:46 EDT 1998 nathanw@antisnork.mit.edu:/u1/var/build/sys-1.3.2/arch/i386/compile/ATHENA i386
>Description:
The servtab se_wait field is a short. It stores a pid. If the pid is
2^15 or more, inetd will be unable to find the pid when it reaps child
processes and will not restore the service fd into allsock.
>How-To-Repeat:
Run a non-built-in dgram/wait service and notice that it stops working
after a while.
>Fix:
Change se_wait to a pid_t.
(Also consider explicitly including <sys/types.h> since we already use
pid_t elsewhere, but that's not important; it gets included implicitly
by something or another.)
*** inetd.c.old Thu Jul 8 10:38:42 1999
--- inetd.c Thu Jul 8 10:38:55 1999
***************
*** 298,304 ****
int se_rpcversl; /* rpc program lowest version */
int se_rpcversh; /* rpc program highest version */
#define isrpcservice(sep) ((sep)->se_rpcversl != 0)
! short se_wait; /* single threaded server */
short se_checked; /* looked at during merge */
char *se_user; /* user name to run as */
char *se_group; /* group name to run as */
--- 298,304 ----
int se_rpcversl; /* rpc program lowest version */
int se_rpcversh; /* rpc program highest version */
#define isrpcservice(sep) ((sep)->se_rpcversl != 0)
! pid_t se_wait; /* single threaded server */
short se_checked; /* looked at during merge */
char *se_user; /* user name to run as */
char *se_group; /* group name to run as */
>Audit-Trail:
>Unformatted: