Add pam_ssh support to the static PAM library, libpam.a:

- Spam /usr/lib some more by making libssh a standard library.
- Tweak ${LIBPAM} and ${MINUSLPAM}.
- Garbage collect unused libssh_pic.a.
- Add fake -lz dependency to secure/ makefiles needed for
  dynamic linkage with -lssh.

Reviewed by:	des, markm
Approved by:	markm
This commit is contained in:
ru 2002-01-23 15:54:17 +00:00
parent e64688fcfb
commit c9d8bf8608
14 changed files with 29 additions and 32 deletions

View File

@ -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

View File

@ -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 <bsd.lib.mk>

View File

@ -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

View File

@ -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

View File

@ -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 <bsd.prog.mk>

View File

@ -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 <bsd.prog.mk>

View File

@ -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 <bsd.prog.mk>

View File

@ -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 <bsd.prog.mk>

View File

@ -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 <bsd.prog.mk>

View File

@ -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 <bsd.prog.mk>

View File

@ -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 <bsd.prog.mk>

View File

@ -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 <bsd.prog.mk>

View File

@ -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 <bsd.prog.mk>

View File

@ -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