Thanks for the details.

I guess your `ld` is more pedantic than most :)

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.

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`...

Jim


On Thu, Nov 9, 2023 at 4:30 PM Greg Troxel <[email protected]> wrote:

> Jim Klimov <[email protected]> writes:
>
> > By the way, on the NUT CI farm the libwrap is present on some (though not
> > all) systems - covering linux, freebsd, openindiana... and neither
> > complained about `sockdebug` :\
> >
> > What version do you have? Maybe it is some alternate implementation?
>
> Looks like 7.4, as amended in NetBSD over the years.   Looks like the
> original.  tcpd.h has
>
>  /*
>   * @(#) tcpd.h 1.5 96/03/19 16:22:24
>   *
>   * Author: Wietse Venema, Eindhoven University of Technology, The
> Netherlands.
>   */
>
>
> $ nm -g /usr/lib/libwrap.so|egrep _severity
>                  U allow_severity
>                  U deny_severity
>
> 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.
>
> and indeed see lines 68/89 of server/upsd.c which does exactly that.
>
>
>
_______________________________________________
Nut-upsdev mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev

Reply via email to