<div dir="ltr"><div>Thanks for the details.</div><div><br></div><div>I guess your `ld` is more pedantic than most :)</div><div><br></div><div>Looking at it cursorily, indeed `server/Makefile.am` optionally adds libwrap details to default `AM_CFLAGS` and `LDADD` so `sockdebug` also gets it in the command line. Probably a cleaner fix would be to patch this into `upsd` build parameters specifically.<br></div><div><br></div><div>My understanding is that linkers then look for objects (in libs) according to what is actually used - so if `sockdebug` does not make use of codepaths that invoke libwrap, it is essentially ignored (a SO dependency may get written, and lack of the binary would block the program from starting, but that's about it). If so, this can explain why no other system complained about the lack of exported ints from `sockdebug.o`...</div><div><br></div><div>Jim<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 9, 2023 at 4:30 PM Greg Troxel <<a href="mailto:gdt@lexort.com">gdt@lexort.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Jim Klimov <<a href="mailto:jimklimov%2Bnut@gmail.com" target="_blank">jimklimov+nut@gmail.com</a>> writes:<br>
<br>
> By the way, on the NUT CI farm the libwrap is present on some (though not<br>
> all) systems - covering linux, freebsd, openindiana... and neither<br>
> complained about `sockdebug` :\<br>
><br>
> What version do you have? Maybe it is some alternate implementation?<br>
<br>
Looks like 7.4, as amended in NetBSD over the years.   Looks like the<br>
original.  tcpd.h has<br>
<br>
 /*<br>
  * @(#) tcpd.h 1.5 96/03/19 16:22:24<br>
  * <br>
  * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.<br>
  */<br>
<br>
<br>
$ nm -g /usr/lib/libwrap.so|egrep _severity<br>
                 U allow_severity<br>
                 U deny_severity<br>
<br>
The man page says<br>
<br>
       The allow_severity and deny_severity variables determine how accepted<br>
       and rejected requests may be logged.  They must be provided by the<br>
       caller and may be modified by rules in the access control tables.<br>
<br>
and indeed see lines 68/89 of server/upsd.c which does exactly that.<br>
<br>
<br>
</blockquote></div>