tcp wrappers
Charles Wilson
cwilson@ece.gatech.edu
Wed Mar 20 19:39:00 GMT 2002
Prentis Brooks wrote:
> Hrmmm.... I will look into it, I am sure there is some efficiency gained
> from making it a DLL. Would packages that are built against libwrap
> automatically use the DLL if it is available, or would they need to be
> tweaked as well (ie sshd is compiled such that if libwrap.a is available
> it will use it to make use of host.allow files).
If an import lib is found during the link step (say when building
sshd.exe), then the linker will use that in preference to a static lib.
Import libs are usually named
/usr/lib/libfoo.dll.a
While static libs are typically
/usr/lib/libfoo.a
And of course, the DLL is usually
/usr/bin/cygfoo-N.dll
where 'N' is the interface number (see libtool docs for more info; on
cygwin, N = c - a (interface - age)
libtool knows about these rules (on cygwin) when building the library
(say libtcpwrap) so a properly libtoolized/autoconfiscated tcpwrappers
package will automagically generate
/usr/lib/libtcpwrap.dll.a
/usr/lib/libtcpwrap.a
/usr/bin/cygtcpwrap-N.dll
When linking a client (say sshd.exe) the linker will use
libtcpwrap.dll.a, and your sshd.exe will have a runtime dependency on
cygtcpwrap-N.dll. (In the past, you had to #define special stuff when
compiled sshd's .c files; this is no longer necessary thanks to
auto-import). It just works (tm).
However, if tcpwrapper is not yet libtoolized (nor autoconfiscated),
then autoconfiscating and libtoolizing it yourself from "scratch" is a
pretty big undertaking...
--Chuck
More information about the Cygwin-apps
mailing list