NetBSD Problem Report #60793

From he@smistad.uninett.no  Fri Sep 25 20:40:17 2026
Return-Path: <he@smistad.uninett.no>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.netbsd.org", Issuer "YR1" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 7B88E1A923B
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 25 Sep 2026 20:40:17 +0000 (UTC)
Message-Id: <20260925204013.15B6343FB6E@smistad.uninett.no>
Date: Fri, 25 Sep 2026 22:40:13 +0200 (CEST)
From: he@NetBSD.org
Reply-To: he@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: libwrap documentation may need updating
X-Send-Pr-Version: 3.95
X-From4GNATS: "he@NetBSD.org via gnats" <gnats-admin@NetBSD.org>

>Number:         60793
>Category:       lib
>Synopsis:       libwrap documentation may need updating
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 25 20:45:00 +0000 2026
>Last-Modified:  Tue Sep 29 23:05:00 +0000 2026
>Originator:     Havard Eidnes
>Release:        NetBSD 10.1_STABLE
>Organization:
I try...
>Environment:
System: NetBSD st.urc.uninett.no 11.99.4 NetBSD 11.99.4 (GENERIC) #0: Sat Dec  6 13:05:05 UTC 2025  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	Several issues:
	1) the hosts_access(3) man page does not mention which library
	   should be used (-lwrap)
	2) The hosts_access(3) man page refers to "tcpd.h".  Should that
	   not be <tcpd.h>?
	3) Among all the symbols referred to in <tcpd.h> as globbal
	   variables, "allow_severity" and "deny_severity" do not appear
	   to have a definition in libwrap.a:

st: {1} nm -op /usr/lib/libwrap.a | egrep allow_severity
/usr/lib/libwrap.a:options.o:                 U allow_severity
st: {2} nm -op /usr/lib/libwrap.a | egrep deny_severity
/usr/lib/libwrap.a:refuse.o:                 U deny_severity
/usr/lib/libwrap.a:options.o:                 U deny_severity
st: {3} nm -op /usr/lib/libwrap.a | egrep hosts_allow_table
/usr/lib/libwrap.a:hosts_access.o:0000000000000008 D hosts_allow_table
st: {4} nm -op /usr/lib/libwrap.a | egrep hosts_deny_table
/usr/lib/libwrap.a:hosts_access.o:0000000000000000 D hosts_deny_table
st: {5} nm -op /usr/lib/libwrap.a | egrep hosts_access_verbose
/usr/lib/libwrap.a:options.o:                 U hosts_access_verbose
/usr/lib/libwrap.a:hosts_access.o:0000000000000000 B hosts_access_verbose
st: {6} nm -op /usr/lib/libwrap.a | egrep rfc931_timeout
/usr/lib/libwrap.a:options.o:                 U rfc931_timeout
/usr/lib/libwrap.a:rfc931.o:0000000000000000 D rfc931_timeout
st: {7} nm -op /usr/lib/libwrap.a | egrep resident
/usr/lib/libwrap.a:options.o:                 U resident
/usr/lib/libwrap.a:hosts_access.o:0000000000000000 D resident
st: {8} 

	   but the man page still says

	   extern int allow_severity;
	   extern int deny_severity;

	   and since we now no longer allow onlyl-extern-defined
	   variables to become BSS variables, this results in:

configure:17038: gcc -o conftest -O2 -fPIC -D_FORTIFY_SOURCE=2 -I/usr/include -pthread -I/usr/include -Wl,-zrelro -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib conftest.c -lwrap  -lcrypt  >&5
ld: /usr/lib/libwrap.so: undefined reference to `deny_severity'
ld: /usr/lib/libwrap.so: undefined reference to `allow_severity'


>How-To-Repeat:
	Try to update pkgsrc/net/tacacs to 4.0.4.32, watch the configure
	test fail as above.

>Fix:
	While I made a fix for net/tacacs, I still think the docs
	need updating.

>Audit-Trail:
From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: lib/60793: libwrap documentation may need updating
Date: Wed, 30 Sep 2026 01:58:49 +0300

 The man page is part of the package (it's written in old classic man,
 not mandoc), so it is better handled upstream.

 On Fri, Sep 25, 2026 at 20:45:01 +0000, he@NetBSD.org via gnats wrote:

 > 	1) the hosts_access(3) man page does not mention which library
 > 	   should be used (-lwrap)

 It's literally the first sentence :)

   | DESCRIPTION
   |   The routines described in this document are part of the libwrap.a


 Since the man page comes from upstream and is no in mdoc, it doesn't
 follow our convention of using LIBRARY section.


 > 	2) The hosts_access(3) man page refers to "tcpd.h".  Should that
 > 	   not be <tcpd.h>?

 Probably, but that doesn't matter too much.


 > 	3) Among all the symbols referred to in <tcpd.h> as globbal
 > 	   variables, "allow_severity" and "deny_severity" do not appear
 > 	   to have a definition in libwrap.a:

 This should be supplied by the program.  The man page says:

   | The allow_severity and deny_severity variables determine how
   | accepted and rejected requests may be logged.  They must be
   | provided by the caller and may be modified by rules in the access
   | control tables.


 So I'd really say all these are not bugs.

 -uwe

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.