Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Jan 2001 12:21:46 -0800
From:      Darryl Okahata <darrylo@soco.agilent.com>
To:        freebsd-stable@FreeBSD.ORG
Subject:   tcp wrappers, inetd, & setproctitle() ???
Message-ID:  <200101022021.MAA16583@mina.soco.agilent.com>

next in thread | raw e-mail | index | archive | help
--Multipart_Tue_Jan__2_12:21:45_2001-1
Content-Type: text/plain; charset=US-ASCII

Hi,

     Are there any known problems with tcp wrappers in FreeBSD
4.2-RELEASE?  (Yes, I've looked through the archives and dejanews and
can't find anything.)

     If tcp wrappers are enabled, I'm having a problem where I can't
connect to a 4.2-RELEASE system via telnet (or any other inetd-managed
service, from the local or a remote system (I have verified that
/etc/hosts.{allow,deny} are correct).  Strangely enough, syslog doesn't
show any errors or connection attempts (failed or successful), even with
maximum logging.

     Being desperate, I tried ktrace'ing inetd, and it appears that,
with tcp wrapping enabled, inetd is failing to spawn child processes
(e.g., telnetd) because setproctitle() can't be found by ld-elf.so.1
(see attached inetd.ktrace file).

	$ nm -D /usr/sbin/inetd | grep setproc
		U setproctitle
	$ ldd /usr/sbin/inetd
	/usr/sbin/inetd:
		libutil.so.3 => /usr/lib/libutil.so.3 (0x2806b000)
		libwrap.so.3 => /usr/lib/libwrap.so.3 (0x28074000)
		libipsec.so.1 => /usr/lib/libipsec.so.1 (0x2807c000)
		libc.so.4 => /usr/lib/libc.so.4 (0x28082000)
	$ nm -D /usr/lib/libutil.so.3 | grep setproc
	$ nm -D /usr/lib/libwrap.so.3 | grep setproc
	$ nm -D /usr/lib/libipsec.so.1  | grep setproc
	$ nm -D /usr/lib/libc.so.4 | grep setproc

I haven't done a buildworld (I upgraded via the 4.2-RELEASE CDROM), but
it seems that setproctitle() should be in libc, but it isn't.

     Any comments?

-- 
	Darryl Okahata
	darrylo@soco.agilent.com

DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion, or policy of Agilent Technologies, or
of the little green men that have been following him all day.



--Multipart_Tue_Jan__2_12:21:45_2001-1
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: attachment; filename="inetd.ktrace"
Content-Transfer-Encoding: quoted-printable

 11746 inetd    RET   select 1
 11746 inetd    CALL  ioctl(0x7,FIONBIO,0xbfbff5c4)
 11746 inetd    RET   ioctl 0
 11746 inetd    CALL  accept(0x7,0,0)
 11746 inetd    RET   accept 13/0xd
 11746 inetd    CALL  ioctl(0x7,FIONBIO,0xbfbff5c4)
 11746 inetd    RET   ioctl 0
 11746 inetd    CALL  ioctl(0xd,FIONBIO,0xbfbff5c4)
 11746 inetd    RET   ioctl 0
 11746 inetd    CALL  sigprocmask(0x1,0xbfbff570,0xbfbff560)
 11746 inetd    RET   sigprocmask 0
 11746 inetd    CALL  gettimeofday(0x805c3c8,0)
 11746 inetd    RET   gettimeofday 0
 11746 inetd    CALL  fork
 11746 inetd    RET   fork 11753/0x2de9
 11746 inetd    CALL  sigprocmask(0x3,0xbfbff570,0xbfbff560)
 11746 inetd    RET   sigprocmask 0
 11746 inetd    CALL  close(0xd)
 11746 inetd    RET   close 0
 11746 inetd    CALL  select(0xd,0xbfbff604,0,0,0)
 11753 inetd    RET   fork 0
 11753 inetd    CALL  sigprocmask(0x3,0xbfbff570,0xbfbff560)
 11753 inetd    RET   sigprocmask 0
 11753 inetd    CALL  close(0xc)
 11753 inetd    RET   close 0
 11753 inetd    CALL  close(0xb)
 11753 inetd    RET   close 0
 11753 inetd    CALL  close(0xa)
 11753 inetd    RET   close 0
 11753 inetd    CALL  close(0x9)
 11753 inetd    RET   close 0
 11753 inetd    CALL  close(0x8)
 11753 inetd    RET   close 0
 11753 inetd    CALL  close(0x7)
 11753 inetd    RET   close 0
 11753 inetd    CALL  close(0x6)
 11753 inetd    RET   close 0
 11753 inetd    CALL  close(0x5)
 11753 inetd    RET   close 0
 11753 inetd    CALL  close(0x4)
 11753 inetd    RET   close 0
 11753 inetd    CALL  close(0x3)
 11753 inetd    RET   close 0
 11753 inetd    CALL  sigaction(0xe,0xbfbffb40,0)
 11753 inetd    RET   sigaction 0
 11753 inetd    CALL  sigaction(0x14,0xbfbffb28,0)
 11753 inetd    RET   sigaction 0
 11753 inetd    CALL  sigaction(0x1,0xbfbffb10,0)
 11753 inetd    RET   sigaction 0
 11753 inetd    CALL  getpeername(0xd,0xbfbff500,0xbfbff47c)
 11753 inetd    RET   getpeername 0
 11753 inetd    CALL  write(0x2,0xbfbfec84,0x1a)
 11753 inetd    GIO   fd 2 wrote 26 bytes
       "/usr/libexec/ld-elf.so.1: "
 11753 inetd    RET   write 26/0x1a
 11753 inetd    CALL  write(0x2,0xbfbfecb4,0x26)
 11753 inetd    GIO   fd 2 wrote 38 bytes
       "inetd: Undefined symbol "setproctitle""
 11753 inetd    RET   write 38/0x26
 11753 inetd    CALL  write(0x2,0xbfbfec84,0x1)
 11753 inetd    GIO   fd 2 wrote 1 byte
       "
       "
 11753 inetd    RET   write 1
 11753 inetd    CALL  exit(0x1)
 11746 inetd    PSIG  SIGCHLD caught handler=3D0x804abbc mask=3D0x0 code=3D=
0x0
 11746 inetd    RET   select -1 errno 4 Interrupted system call
 11746 inetd    CALL  write(0xc,0xbfbff3b3,0x1)
 11746 inetd    GIO   fd 12 wrote 1 byte
       "C"
 11746 inetd    RET   write 1
 11746 inetd    CALL  sigreturn(0xbfbff3f0)
 11746 inetd    RET   sigreturn JUSTRETURN
 11746 inetd    CALL  select(0xd,0xbfbff604,0,0,0)
 11746 inetd    RET   select 1
 11746 inetd    CALL  ioctl(0x3,FIONREAD,0xbfbff5cc)
 11746 inetd    RET   ioctl 0
 11746 inetd    CALL  read(0x3,0xbfbff5cb,0x1)
 11746 inetd    GIO   fd 3 read 1 byte
       "C"
 11746 inetd    RET   read 1
 11746 inetd    CALL  wait4(0xffffffff,0xbfbff58c,0x1,0)
 11746 inetd    RET   wait4 11753/0x2de9
 11746 inetd    CALL  wait4(0xffffffff,0xbfbff58c,0x1,0)
 11746 inetd    RET   wait4 -1 errno 10 No child processes
 11746 inetd    CALL  select(0xd,0xbfbff604,0,0,0)

--Multipart_Tue_Jan__2_12:21:45_2001-1--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101022021.MAA16583>