Subject: Re: Is TCP Wrappers available for the Mac port?
To: None <port-mac68k@netbsd.org>
From: Hiroshi Hakoyama <hhako@seagreen.ocn.ne.jp>
List: port-mac68k
Date: 03/11/2001 17:56:27
Dear all,

>sshd daemon (openssh 2.5.1p1) installed by the default package system seems
>to have no option of tcp wrappers . In my LCIII, I could wrap daemons
>started from inetd (e.g. telnet), but could not wrap sshd started from
>rc.local (usr/pkg/etc/rc.d). I hope to rebuild openssh with tcp-wrappers
>option using package system, but I am not sure how to add the option
>(./configure
>--with-tcp-wrappers). Should I modify /usr/pkgsrc/security/openssh/Makefile?

After some trials and errors, I found a way to build openssh with
TCP-wrappers option. After "make configure" at
"/usr/pkgsrc/security/openssh", I modified 3 files.

./work/openssh-2.5.1p2/Makefile
./work/openssh-2.5.1p2/config.h
./work/openssh-2.5.1p2/openbsd-compat/Makefile

# diff ./work/openssh-2.5.1p2/Makefile ./work/openssh-2.5.1p2/Makefile_ORG 
32d31
< WRAPLIBS=-lwrap -lz  -lutil  -lcrypto
100c99
<       $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(WRAPLIBS)
---
>       $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
118c117
<       $(LD) -o $@ sftp-server.o sftp-common.o log-server.o $(LDFLAGS)
-lssh -lopenbsd-compat $(WRAPLIBS) 
---
>       $(LD) -o $@ sftp-server.o sftp-common.o log-server.o $(LDFLAGS) -lssh
>-lopenbsd-compat $(LIBS) 

#diff ./work/openssh-2.5.1p2/config.h ./work/openssh-2.5.1p2/config.h_ORG
195c195
< #define LIBWRAP 1 
---
> /* #undef LIBWRAP */

#diff ./work/openssh-2.5.1p2/openbsd-compat/Makefile
./work/openssh-2.5.1p2/openbsd-compat/Makefile_ORG 
14d13
< WRAPLIBS=-lwrap -lz  -lutil  -lcrypto

Please see also:

Subject: Re: lib/3522: undefined symbols in libwrap 
To: None <netbsd-bugs@NetBSD.ORG>
From: Jim Bernard <jbernard@tater.mines.edu>
List: netbsd-bugs
Date: 04/22/1997 06:43:12.

I am a beginner, so I do not know whether this is a right way. 
The other excellent solution?

Thanks in advance,

Hiroshi Hakoyama