Skip site navigation (1)Skip section navigation (2)
Date:      10 Jun 2000 06:00:00 -0000
From:      vladimir-bsd-stable@math.uic.edu
To:        stable@freebsd.org, vladimir-bsd-stable@math.uic.edu
Subject:   Re: inetd problems
Message-ID:  <20000610060000.26723.qmail@math.uic.edu>

next in thread | raw e-mail | index | archive | help
I have traced the error to _hpcopy() in src/lib/libc/net/name6.c
The problem was showing up when the remote hostname contained 
a bad character  (for example, '_') and a host resolved.    
I've submitted a bug report and patches.

BTW, should the '_' character be considered a valid character for a hostname?
I think rfc1034 only gives recommendations, but doesn't insist on them.
It would make sense for gethostbyname() to return results for such hosts.
In our case, we inetd was receiving connections to the smtp port, and 
and we were losing mail from this particular host (mail_dxb.zu.ac.ae).

	Vladimir Egorin
	vladimir@math.uic.edu
	Department of Mathematics, University of Illinois.

	>From owner-freebsd-stable@FreeBSD.ORG Thu Jun 08 19:52:02 2000
	>Delivered-To: vladimir-bsd-stable@math.uic.edu
	>Delivered-To: freebsd-stable@freebsd.org
	>Date: 8 Jun 2000 19:51:06 -0000
	>From: vladimir-bsd-stable@math.uic.edu
	>To: stable@freebsd.org
	>Subject: Re: inetd problems
	>X-Loop: FreeBSD.ORG
	>
	>Dear -STABLE users, 
	>sorry if you eventually get a duplicate message -- the original message
	>didn't show up in the list for some reason.    Reporting further on the
	>inetd core dumping problem:
	>
	>The system is 4.0-STABLE built on Jun 7, 2000.
	>
	>I've recompiled libwrap, libc and inetd with '-g' flag
	>(and -O).     Here is the debugger output (hopefully someone
	>more familiar with the source than I am could have a look).
	>Please let me know what else I could do.
	>
	>	Vladimir
	>
	><galileo:vladimir># gdb /usr/sbin/inetd
	>GNU gdb 4.18
	>Copyright 1998 Free Software Foundation, Inc.
	>GDB is free software, covered by the GNU General Public License, and you are
	>welcome to change it and/or distribute copies of it under certain conditions.
	>Type "show copying" to see the conditions.
	>There is absolutely no warranty for GDB.  Type "show warranty" for details.
	>This GDB was configured as "i386-unknown-freebsd"...
	>(gdb) core /inetd.core
	>Core was generated by `inetd'.
	>Program terminated with signal 11, Segmentation fault.
	>Reading symbols from /usr/lib/libutil.so.3...done.
	>Reading symbols from /usr/lib/libwrap.so.3...done.
	>Reading symbols from /usr/lib/libipsec.so.0...done.
	>Reading symbols from /usr/lib/libc.so.4...done.
	>Reading symbols from /usr/libexec/ld-elf.so.1...done.
	>#0  0x280c4a7e in _hpcopy (hp=0xbfbfec54, errp=0xbfbfed84) at /usr/src/lib/libc/../libc/net/name6.c:559
	>559                             if (**pp != '\0') {
	>(gdb) bt
	>#0  0x280c4a7e in _hpcopy (hp=0xbfbfec54, errp=0xbfbfed84) at /usr/src/lib/libc/../libc/net/name6.c:559
	>#1  0x280c6188 in _res_search_multi (name=0xbfbffa88 "mail_dxb.zu.ac.ae", rtl=0xbfbfeca0, errp=0xbfbfed84)
	>    at /usr/src/lib/libc/../libc/net/name6.c:1352
	>#2  0x280c6540 in _dns_ghbyname (name=0xbfbffa88 "mail_dxb.zu.ac.ae", af=2, errp=0xbfbfed84)
	>    at /usr/src/lib/libc/../libc/net/name6.c:1507
	>#3  0x280c4640 in _ghbyname (name=0xbfbffa88 "mail_dxb.zu.ac.ae", af=2, flags=3328, errp=0xbfbfed84)
	>    at /usr/src/lib/libc/../libc/net/name6.c:346
	>#4  0x280c4782 in _getipnodebyname_multi (name=0xbfbffa88 "mail_dxb.zu.ac.ae", af=2, flags=3328, errp=0xbfbfed84)
	>    at /usr/src/lib/libc/../libc/net/name6.c:399
	>#5  0x280c4869 in getipnodebyname (name=0xbfbffa88 "mail_dxb.zu.ac.ae", af=2, flags=3328, errp=0xbfbfed84)
	>    at /usr/src/lib/libc/../libc/net/name6.c:432
	>#6  0x28077dd6 in sock_hostname (host=0xbfbffa88) at /usr/src/lib/libwrap/../../contrib/tcp_wrappers/socket.c:259
	>#7  0x2807a355 in eval_hostname (host=0xbfbffa88) at /usr/src/lib/libwrap/../../contrib/tcp_wrappers/eval.c:77
	>#8  0x28079e2f in host_match (tok=0xbfbfef29 "localhost", host=0xbfbffa88)
	>    at /usr/src/lib/libwrap/../../contrib/tcp_wrappers/hosts_access.c:313
	>#9  0x28079b4e in client_match (tok=0xbfbfef29 "localhost", request=0xbfbff978)
	>    at /usr/src/lib/libwrap/../../contrib/tcp_wrappers/hosts_access.c:248
	>#10 0x280799f4 in list_match (list=0xbfbfef28 " localhost", request=0xbfbff978, match_fn=0x28079b0c <client_match>)
	>    at /usr/src/lib/libwrap/../../contrib/tcp_wrappers/hosts_access.c:214
	>#11 0x280798bc in table_match (table=0x2807ada0 "/etc/hosts.allow", request=0xbfbff978)
	>    at /usr/src/lib/libwrap/../../contrib/tcp_wrappers/hosts_access.c:171
	>#12 0x28079740 in hosts_access (request=0xbfbff978) at /usr/src/lib/libwrap/../../contrib/tcp_wrappers/hosts_access.c:129
	>#13 0x804ab00 in main (argc=0, argv=0xbfbffddc, envp=0xbfbffde0) at inetd.c:659
	>#14 0x8049a91 in _start ()
	>
	>
	>
	>
	>To Unsubscribe: send mail to majordomo@FreeBSD.org
	>with "unsubscribe freebsd-stable" in the body of the message
	>


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?20000610060000.26723.qmail>