diff --git a/lib/libpam/libpam/Makefile b/lib/libpam/libpam/Makefile index 5bfc749d7baf..70cde475ce77 100644 --- a/lib/libpam/libpam/Makefile +++ b/lib/libpam/libpam/Makefile @@ -60,7 +60,7 @@ MLINKS+= pam.8 pam.conf.5 pam.8 pam.d.5 HDRS0= pam_client.h # Files from ${PAMDIR}/libpam_misc: -SRCS+= help_env.c misc_conv.c xstrdup.c +SRCS+= help_env.c misc_conv.c HDRS2= pam_misc.h # Files from ${.CURDIR}: @@ -86,7 +86,9 @@ STATIC_MODULES+= ${MODOBJDIR}/pam_radius/libpam_radius.a STATIC_MODULES+= ${MODOBJDIR}/pam_rootok/libpam_rootok.a STATIC_MODULES+= ${MODOBJDIR}/pam_securetty/libpam_securetty.a STATIC_MODULES+= ${MODOBJDIR}/pam_self/libpam_self.a +.if !defined(NOCRYPT) && !defined(NO_OPENSSL) && !defined(NO_OPENSSH) STATIC_MODULES+= ${MODOBJDIR}/pam_ssh/libpam_ssh.a +.endif STATIC_MODULES+= ${MODOBJDIR}/pam_tacplus/libpam_tacplus.a STATIC_MODULES+= ${MODOBJDIR}/pam_unix/libpam_unix.a STATIC_MODULES+= ${MODOBJDIR}/pam_wheel/libpam_wheel.a diff --git a/lib/libpam/modules/pam_ssh/Makefile b/lib/libpam/modules/pam_ssh/Makefile index 84dfac93e05e..9d862703f8eb 100644 --- a/lib/libpam/modules/pam_ssh/Makefile +++ b/lib/libpam/modules/pam_ssh/Makefile @@ -7,9 +7,8 @@ LIB= pam_ssh SHLIB_NAME= pam_ssh.so SRCS= pam_ssh.c CFLAGS+= -I${SSHSRC} -DPADD= ${LIBCRYPTO} ${LIBCRYPT} ${LIBUTIL} ${LIBZ} -LDADD= -L${.OBJDIR}/../../../../secure/lib/libssh -lssh -lcrypto \ - -lcrypt -lutil -lz +DPADD= ${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT} ${LIBUTIL} ${LIBZ} +LDADD= -lssh -lcrypto -lcrypt -lutil -lz MAN= pam_ssh.8 .include diff --git a/secure/Makefile.inc b/secure/Makefile.inc index 9770b35b07b0..0f19a7bb99ec 100644 --- a/secure/Makefile.inc +++ b/secure/Makefile.inc @@ -21,9 +21,4 @@ CFLAGS+= -DNO_IDEA .if !defined(NO_OPENSSH) SSHDIR= ${.CURDIR}/../../../crypto/openssh -.if exists(${.OBJDIR}/../../lib/libssh) -LIBSSH= ${.OBJDIR}/../../lib/libssh/libssh.a -.else -LIBSSH= ${.CURDIR}/../../lib/libssh/libssh.a -.endif .endif diff --git a/secure/lib/libssh/Makefile b/secure/lib/libssh/Makefile index f3d32aa993a5..61ae9d19def7 100644 --- a/secure/lib/libssh/Makefile +++ b/secure/lib/libssh/Makefile @@ -10,8 +10,6 @@ SRCS= authfd.c authfile.c bufaux.c buffer.c canohost.c channels.c \ cli.c rijndael.c ssh-dss.c ssh-rsa.c dh.c kexdh.c kexgex.c \ version.c -INSTALL_PIC_ARCHIVE= yes - .if defined(COMPAT_GETADDRINFO) SRCS+= getaddrinfo.c getnameinfo.c name6.c rcmd.c bindresvport.c .endif diff --git a/secure/libexec/sftp-server/Makefile b/secure/libexec/sftp-server/Makefile index f1cc1b11cca3..d2c6c8501930 100644 --- a/secure/libexec/sftp-server/Makefile +++ b/secure/libexec/sftp-server/Makefile @@ -5,8 +5,8 @@ PROG= sftp-server SRCS= sftp-server.c sftp-common.c MAN= sftp-server.8 -LDADD+= ${LIBSSH} -lcrypto -DPADD+= ${LIBSSH} ${LIBCRYPTO} +LDADD+= -lssh -lcrypto -lz +DPADD+= ${LIBSSH} ${LIBCRYPTO} ${LIBZ} .include diff --git a/secure/usr.bin/scp/Makefile b/secure/usr.bin/scp/Makefile index 7a27bf4eceba..d26a2a22510c 100644 --- a/secure/usr.bin/scp/Makefile +++ b/secure/usr.bin/scp/Makefile @@ -4,7 +4,7 @@ PROG= scp SRCS= scp.c scp-common.c -LDADD+= ${LIBSSH} -lcrypto -lutil -lz +LDADD+= -lssh -lcrypto -lutil -lz DPADD+= ${LIBSSH} ${LIBCRYPTO} ${LIBUTIL} ${LIBZ} .include diff --git a/secure/usr.bin/sftp/Makefile b/secure/usr.bin/sftp/Makefile index db988ab06746..f21e5a2a62e1 100644 --- a/secure/usr.bin/sftp/Makefile +++ b/secure/usr.bin/sftp/Makefile @@ -4,8 +4,8 @@ PROG= sftp SRCS= sftp.c sftp-client.c sftp-int.c sftp-common.c sftp-glob.c scp-common.c -LDADD+= ${LIBSSH} -lcrypto -DPADD+= ${LIBSSH} ${LIBCRYPTO} +LDADD+= -lssh -lcrypto -lz +DPADD+= ${LIBSSH} ${LIBCRYPTO} ${LIBZ} .include diff --git a/secure/usr.bin/ssh-add/Makefile b/secure/usr.bin/ssh-add/Makefile index 10627d8e811e..16bb7871626d 100644 --- a/secure/usr.bin/ssh-add/Makefile +++ b/secure/usr.bin/ssh-add/Makefile @@ -4,8 +4,8 @@ PROG= ssh-add SRCS= ssh-add.c -LDADD+= ${LIBSSH} -lcrypto -DPADD+= ${LIBSSH} ${LIBCRYPTO} +LDADD+= -lssh -lcrypto -lz +DPADD+= ${LIBSSH} ${LIBCRYPTO} ${LIBZ} .include diff --git a/secure/usr.bin/ssh-agent/Makefile b/secure/usr.bin/ssh-agent/Makefile index f00acd0560f0..6187604cdde1 100644 --- a/secure/usr.bin/ssh-agent/Makefile +++ b/secure/usr.bin/ssh-agent/Makefile @@ -4,8 +4,8 @@ PROG= ssh-agent SRCS= ssh-agent.c -LDADD+= ${LIBSSH} -lcrypto -DPADD+= ${LIBSSH} ${LIBCRYPTO} +LDADD+= -lssh -lcrypto -lz +DPADD+= ${LIBSSH} ${LIBCRYPTO} ${LIBZ} .include diff --git a/secure/usr.bin/ssh-keygen/Makefile b/secure/usr.bin/ssh-keygen/Makefile index bd193ddf950c..3145c3fd3cfe 100644 --- a/secure/usr.bin/ssh-keygen/Makefile +++ b/secure/usr.bin/ssh-keygen/Makefile @@ -4,8 +4,8 @@ PROG= ssh-keygen SRCS= ssh-keygen.c -LDADD+= ${LIBSSH} -lcrypto -DPADD+= ${LIBSSH} ${LIBCRYPTO} +LDADD+= -lssh -lcrypto -lz +DPADD+= ${LIBSSH} ${LIBCRYPTO} ${LIBZ} .include diff --git a/secure/usr.bin/ssh-keyscan/Makefile b/secure/usr.bin/ssh-keyscan/Makefile index 7a8c67547dd9..ad9a2766da86 100644 --- a/secure/usr.bin/ssh-keyscan/Makefile +++ b/secure/usr.bin/ssh-keyscan/Makefile @@ -4,8 +4,8 @@ PROG= ssh-keyscan SRCS= ssh-keyscan.c -LDADD+= ${LIBSSH} -lcrypto -DPADD+= ${LIBSSH} ${LIBCRYPTO} +LDADD+= -lssh -lcrypto -lz +DPADD+= ${LIBSSH} ${LIBCRYPTO} ${LIBZ} .include diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile index 66494a90e6db..b66d824cd9a6 100644 --- a/secure/usr.bin/ssh/Makefile +++ b/secure/usr.bin/ssh/Makefile @@ -31,7 +31,7 @@ DPADD+= ${LIBKRB5} ${LIBCOM_ERR} ${LIBASN1} ${LIBMD} ${LIBCRYPT} CFLAGS+= -DXAUTH_PATH=\"${X11BASE}/bin/xauth\" .endif -LDADD+= ${LIBSSH} -lcrypto -lutil -lz +LDADD+= -lssh -lcrypto -lutil -lz DPADD+= ${LIBSSH} ${LIBCRYPTO} ${LIBUTIL} ${LIBZ} .include diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile index 95cf1780d582..7d161b11ff78 100644 --- a/secure/usr.sbin/sshd/Makefile +++ b/secure/usr.sbin/sshd/Makefile @@ -38,7 +38,7 @@ DPADD+= ${LIBOPIE} ${LIBMD} CFLAGS+= -DXAUTH_PATH=\"${X11BASE}/bin/xauth\" .endif -LDADD+= ${LIBSSH} -lcrypt -lcrypto -lutil -lz -lwrap ${MINUSLPAM} +LDADD+= -lssh -lcrypt -lcrypto -lutil -lz -lwrap ${MINUSLPAM} DPADD+= ${LIBSSH} ${LIBCRYPT} ${LIBCRYPTO} ${LIBUTIL} ${LIBZ} ${LIBWRAP} ${LIBPAM} .include diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk index 71a46ccd89b2..052c6b69ab70 100644 --- a/share/mk/bsd.libnames.mk +++ b/share/mk/bsd.libnames.mk @@ -73,12 +73,14 @@ MINUSLPAM+= -lkrb5 -lasn1 -lroken LIBPAM+= ${LIBCOM_ERR} MINUSLPAM+= -lcom_err .endif -LIBPAM+= -LIBPAM+= ${LIBRADIUS} ${LIBRPCSVC} ${LIBTACPLUS} \ - ${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT} \ - ${LIBUTIL} ${LIBOPIE} ${LIBMD} ${LIBZ} -MINUSLPAM+= -lradius -lrpcsvc -ltacplus -lssh -lcrypto -lcrypt \ - -lutil -lopie -lmd -lz +LIBPAM+= ${LIBRADIUS} ${LIBRPCSVC} ${LIBTACPLUS} ${LIBCRYPT} \ + ${LIBUTIL} ${LIBOPIE} ${LIBMD} +MINUSLPAM+= -lradius -lrpcsvc -ltacplus -lcrypt \ + -lutil -lopie -lmd +.if !defined(NOCRYPT) && !defined(NO_OPENSSL) && !defined(NO_OPENSSH) +LIBPAM+= ${LIBSSH} ${LIBCRYPTO} +MINUSLPAM+= -lssh -lcrypto +.endif .endif LIBPANEL?= ${DESTDIR}${LIBDIR}/libpanel.a @@ -93,6 +95,7 @@ LIBROKEN?= ${DESTDIR}${LIBDIR}/libroken.a # XXX in secure dist, not base LIBRPCSVC?= ${DESTDIR}${LIBDIR}/librpcsvc.a LIBSBUF?= ${DESTDIR}${LIBDIR}/libsbuf.a LIBSMB?= ${DESTDIR}${LIBDIR}/libsmb.a +LIBSSH?= ${DESTDIR}${LIBDIR}/libssh.a # XXX in secure dist, not base LIBSSL?= ${DESTDIR}${LIBDIR}/libssl.a # XXX in secure dist, not base LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a LIBTACPLUS?= ${DESTDIR}${LIBDIR}/libtacplus.a