Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Dec 2001 15:52:57 +0200
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Dag-Erling Smorgrav <des@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Peter Wemm <peter@FreeBSD.org>, Mark Murray <markm@FreeBSD.org>, Bruce Evans <bde@FreeBSD.org>
Subject:   PAM, libssh, and all that (was: Re: cvs commit: src/lib/libpam/modules/pam_ssh pam_ssh.c)
Message-ID:  <20011207155257.A65808@sunbay.com>
In-Reply-To: <200112071151.fB7BplS52145@freefall.freebsd.org>
References:  <200112071151.fB7BplS52145@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 07, 2001 at 03:51:47AM -0800, Dag-Erling Smorgrav wrote:
> des         2001/12/07 03:51:47 PST
> 
>   Modified files:
>     lib/libpam/modules/pam_ssh pam_ssh.c 
>   Log:
>   Get pam_mod_misc.h from .CURDIR rather than .OBJDIR or /usr/include.
>   
>   Sponsored by:   DARPA, NAI Labs
>   
>   Revision  Changes    Path
>   1.20      +2 -1      src/lib/libpam/modules/pam_ssh/pam_ssh.c
> 
Um, why?!

During `make world', headers are installed into ${WORLDTMP}/usr/include
well before the `depend' stage is run, and the correct, up-to-date
headers are used later during `make depend' and `make all'.

: # grep -w pam_mod_misc.h /usr/obj/usr/src/lib/libpam/modules/pam_ssh/.depend
:  /usr/obj/usr/src/i386/usr/include/security/pam_mod_misc.h \

Please back this change out.

Instead, please fix the Makefile to add the necessary DPADD on libssh.a.
See the ``make checkdpadd'' output, and see how it's done in secure/
makefiles that depend on libssh.a.  Alternatively, consider committing
this patch.

Index: Makefile
===================================================================
RCS file: /home/ncvs/src/lib/libpam/modules/pam_ssh/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile	2001/12/05 16:02:50	1.7
+++ Makefile	2001/12/07 13:46:31
@@ -7,9 +7,14 @@ 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=		${LIBSSH} -lcrypto -lcrypt -lutil -lz
 MAN=		pam_ssh.8
+
+.if exists(${.OBJDIR}/../../../../secure/lib/libssh)
+LIBSSH=		${.OBJDIR}/../../../../secure/lib/libssh/libssh.a
+.else
+LIBSSH=		${.CURDIR}/../../../../secure/lib/libssh/libssh.a
+.endif
 
 .include <bsd.lib.mk>


More to the point, in -CURRENT, libssh.a is no longer an internal
static library (as of secure/lib/libssh/Makefile,v 1.11 by markm).

: revision 1.11
: date: 2001/10/30 19:45:00;  author: markm;  state: Exp;  lines: +2 -5
: Install libssh and libssh_pic. These are needed when building
: statically, and when building things (like login(8)) standalone.
: libssh_pic is needed for libpam and modules.
: 
: Requested by:   peter

I'd like Peter of Mark shed some light as to why this change was
needed, and if it's really needed, we should put the standard LIBSSH
definition into bsd.lib.mk, and use that instead.  I.e., one would
type:

DPADD=	... ${LIBSSH} ...
LDADD=	... -lssh ...


On a side note, with recent pam.d changes, something is seriously
screwed.  I don't have USE_PAM_D setting in my make.conf(5), and
on a freshly build 5.0-CURRENT I hereby have an empty /etc/pam.d.
Every attempt to use su(1) results in:

Dec  7 15:28:43 perl login: PAM _pam_init_handlers: no default config /etc/pam.d/other
Dec  7 15:28:43 perl login: PAM error reading PAM configuration file
Dec  7 15:28:43 perl login: PAM pam_start: failed to initialize handlers
Dec  7 15:28:43 perl login: pam_start: Critical error - immediate abort

Please fix!


Cheers,
-- 
Ruslan Ermilov		Oracle Developer/DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011207155257.A65808>