Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Re: Compiling troubles on linux

Subject: Re: Compiling troubles on linux
Date: Wed, 16 Feb 2005 17:03:10 -0500 (EST)
On Tue, 15 Feb 2005 je_ossh@kronos.honk.org wrote:

Hello,

Trying to compile openssh-3.9p1 on Linux with OpenSSL 0.9.7f-dev, built
with shared libs.

Aha.  Apparently, the configure script is somewhat broken in that it can't
seem to use openssl libs if they're not already known to ld.  I got
configure to run by adding a LD_LIBRARY_PATH=/path/to/openssl/lib
./configure ... .  Then, I had troubles installing since the ssh tools
didn't have the paths to the openssl libs saved, leading to 'can't find
this lib and that lib" type errors.

So...

I fudged around with LD_RUN_PATH=/path/to/openssl/lib make, which worked,
but I needed a simpler cross-platform option capable of fixing this in the
configure step.

My solution?

# Configure OpenSSH
conf_openssh()
{
    echo "Configure OpenSSH"
    cd ${BUILD}/${SD_OPENSSH}
    ${MAKE} distclean > /dev/null 2>&1

    options="--prefix=${PFX_OPENSSH} \
             --with-ssl-dir=${PFX_OPENSSL} \
             --without-pam \
             --without-zlib-version-check \
             --without-privsep-user \
             --without-privsep-path"

    # HP-UX automagically includes the runtime link path into shared libs.
    if [ "$1" != "hpux64" -a "$1" != "hpux" ]; then
       options="$options --with-ldflags=\"-Wl,-rpath ${PFX_OPENSSL}/lib\""
    fi

    # For some reason, this configure won't expand the $options var if it
    # has --with-ldflags appended, but it does with 'eval'B.
    eval ./configure $options > ${LOG}/config_openssh.log 2>&1
}

I also kill the privsep stuff in servconf.c and touch the sshd_config file
to reflect that.  Result.. a simple ssh implementation, that is able to
utilize openssl shared libs in non-standard locations, without the need
for LD_LIBRARY_PATH or /etc/ld.so.conf entries.

Cheers!
Jon

-- 
Jon Earle
Software Developer / Network Manager
Specialising in Open Source Software Solutions
http://kronos.honk.org/~earlej/

<Prev in Thread] Current Thread [Next in Thread>