/etc/inetd is sensitive to ordering of lines in /etc/inetd.conf

Tim Roper munnari!labtam.oz.au!timr at uunet.uu.net
Wed Apr 26 11:58:46 AEST 1989


I think the attached diff of the 4.3bsd and 4.3bsd-tahoe inetd.c may be of
interest.  The se_bi flag in the data structure that holds /etc/inetd.conf
was not being reset when a non-internal entry was encountered after an
internal entry.  Hence the problem described in
<8903061946.AA20555 at emoryu1.cc.emory.edu>

I have no idea how SunOS versions relates to these.  We encountered the
problem with a System V implementation derived from bsd (for which a fix
was issued by the TCP supplier well before tahoe was announced).

-Tim.

***************
*** 593,622 ****
  	if (strcmp(sep->se_server, "internal") == 0) {
  		register 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)
  				break;
  		if (bi->bi_service == 0) {
  			syslog(LOG_ERR, "internal service %s unknown\n",
  				sep->se_service);
  			goto more;
  		}
  		sep->se_bi = bi;
  		sep->se_wait = bi->bi_wait;
! 	} else
! 		sep->se_bi = NULL;
  	argc = 0;
  	for (arg = skip(&cp); cp; arg = skip(&cp))
  		if (argc < MAXARGV)
  			sep->se_argv[argc++] = strdup(arg);
  	while (argc <= MAXARGV)
  		sep->se_argv[argc++] = NULL;
  	return (sep);
  }

  freeconfig(cp)
  	register struct servtab *cp;
  {
  	int i;



More information about the Comp.sys.sun mailing list