Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /vsftpd-2.3.4# make
- gcc -o vsftpd main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o tunables.o ftpdataio.o secbuf.o ls.o postprivparent.o logging.o str.o netstr.o sysstr.o strlist.o banner.o filestr.o parseconf.o secutil.o ascii.o oneprocess.o twoprocess.o privops.o standalone.o hash.o tcpwrap.o ipaddrparse.o access.o features.o readwrite.o opts.o ssl.o sslslave.o ptracesandbox.o ftppolicy.o sysutil.o sysdeputil.o -Wl,-s `./vsf_findlibs.sh`
- sysdeputil.o: In function `vsf_sysdep_has_capabilities':
- sysdeputil.c:(.text+0x1d9): undefined reference to `cap_get_proc'
- sysdeputil.c:(.text+0x1e4): undefined reference to `cap_free'
- sysdeputil.o: In function `vsf_sysdep_adopt_capabilities':
- sysdeputil.c:(.text+0x219): undefined reference to `cap_init'
- sysdeputil.c:(.text+0x22f): undefined reference to `cap_set_proc'
- sysdeputil.c:(.text+0x245): undefined reference to `cap_free'
- sysdeputil.c:(.text+0x26e): undefined reference to `cap_set_flag'
- sysdeputil.c:(.text+0x28b): undefined reference to `cap_set_flag'
- sysdeputil.c:(.text+0x2b6): undefined reference to `cap_set_flag'
- sysdeputil.c:(.text+0x2d3): undefined reference to `cap_set_flag'
- sysdeputil.o: In function `vsf_sysdep_check_auth':
- sysdeputil.c:(.text+0xc23): undefined reference to `pam_start'
- sysdeputil.c:(.text+0xc58): undefined reference to `pam_set_item'
- sysdeputil.c:(.text+0xc76): undefined reference to `pam_set_item'
- sysdeputil.c:(.text+0xc9a): undefined reference to `pam_set_item'
- sysdeputil.c:(.text+0xcb0): undefined reference to `pam_authenticate'
- sysdeputil.c:(.text+0xcce): undefined reference to `pam_get_item'
- sysdeputil.c:(.text+0xced): undefined reference to `pam_acct_mgmt'
- sysdeputil.c:(.text+0xd02): undefined reference to `pam_setcred'
- sysdeputil.c:(.text+0xd29): undefined reference to `pam_open_session'
- sysdeputil.c:(.text+0xd5a): undefined reference to `pam_end'
- sysdeputil.c:(.text+0xd82): undefined reference to `pam_end'
- sysdeputil.c:(.text+0xd95): undefined reference to `pam_end'
- sysdeputil.c:(.text+0xdc0): undefined reference to `pam_setcred'
- sysdeputil.c:(.text+0xdce): undefined reference to `pam_end'
- sysdeputil.o: In function `vsf_auth_shutdown':
- sysdeputil.c:(.text+0xe03): undefined reference to `pam_close_session'
- sysdeputil.c:(.text+0xe14): undefined reference to `pam_setcred'
- sysdeputil.c:(.text+0xe22): undefined reference to `pam_end'
- collect2: ld returned 1 exit status
- make: *** [vsftpd] Error 1
- ============================================================
- contents of: vsf_findlibs.sh
- ============================================================
- #!/bin/sh
- # Cheesy hacky location of additional link libraries.
- locate_library() { [ ! "$1*" = "`echo $1*`" ]; }
- find_func() { egrep $1 $2 >/dev/null; }
- if find_func hosts_access tcpwrap.o; then
- echo "-lwrap";
- locate_library /lib/libnsl.so && echo "-lnsl";
- locate_library /lib64/libnsl.so && echo "-lnsl";
- fi
- # Look for PAM (done weirdly due to distribution bugs (e.g. Debian) or the
- # crypt library.
- if find_func pam_start sysdeputil.o; then
- locate_library /lib/libpam.so.0 && echo "/lib/libpam.so.0";
- locate_library /usr/lib/libpam.so && echo "-lpam";
- locate_library /usr/lib64/libpam.so && echo "-lpam";
- # HP-UX ends shared libraries with .sl
- locate_library /usr/lib/libpam.sl && echo "-lpam";
- # AIX ends shared libraries with .a
- locate_library /usr/lib/libpam.a && echo "-lpam";
- else
- locate_library /lib/libcrypt.so && echo "-lcrypt";
- locate_library /usr/lib/libcrypt.so && echo "-lcrypt";
- locate_library /usr/lib64/libcrypt.so && echo "-lcrypt";
- fi
- # Look for the dynamic linker library. Needed by older RedHat when
- # you link in PAM
- locate_library /lib/libdl.so && echo "-ldl";
- # Look for libsocket. Solaris needs this.
- locate_library /lib/libsocket.so && echo "-lsocket";
- # Look for libnsl. Solaris needs this.
- locate_library /lib/libnsl.so && echo "-lnsl";
- # Look for libresolv. Solaris needs this.
- locate_library /lib/libresolv.so && echo "-lresolv";
- # Look for libutil. Older FreeBSD need this for setproctitle().
- locate_library /usr/lib/libutil.so && echo "-lutil";
- # For older HP-UX...
- locate_library /usr/lib/libsec.sl && echo "-lsec";
- # Look for libcap (capabilities)
- if locate_library /lib/libcap.so.1; then
- echo "/lib/libcap.so.1";
- elif locate_library /lib/libcap.so.2; then
- echo "/lib/libcap.so.2";
- else
- locate_library /usr/lib/libcap.so && echo "-lcap";
- locate_library /lib/libcap.so && echo "-lcap";
- locate_library /lib64/libcap.so && echo "-lcap";
- fi
- # Solaris needs this for nanosleep()..
- locate_library /lib/libposix4.so && echo "-lposix4";
- locate_library /usr/lib/libposix4.so && echo "-lposix4";
- # Tru64 (nanosleep)
- locate_library /usr/shlib/librt.so && echo "-lrt";
- # Solaris sendfile
- locate_library /usr/lib/libsendfile.so && echo "-lsendfile";
- # OpenSSL
- if find_func SSL_library_init ssl.o; then
- echo "-lssl -lcrypto";
- fi
- exit 0;
- ============================================================
- workaround/problem remedied by:
- ============================================================
- apt-get build-dep vsftpd
- make LIBS='-lwrap -lpam -lssl -lcrypto -lcap'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement