diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2008-07-22 14:23:54 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2008-07-22 14:23:54 +0000 |
commit | 0caf93780c68be483f9d195e76dd849128524860 (patch) | |
tree | 50505d4c3088d84d489993d680ccb35a56dbfa02 /sys-apps | |
parent | Revision bump. Add USE-flag for scrobbler plugin, closes bug #214588. Patch f... (diff) | |
download | gentoo-2-0caf93780c68be483f9d195e76dd849128524860.tar.gz gentoo-2-0caf93780c68be483f9d195e76dd849128524860.tar.bz2 gentoo-2-0caf93780c68be483f9d195e76dd849128524860.zip |
Add patch to build against OpenPAM, thanks to Seraphim Mellos in bug #232586.
(Portage version: 2.2_rc1/cvs/Linux 2.6.26-gentoo x86_64)
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/shadow/ChangeLog | 7 | ||||
-rw-r--r-- | sys-apps/shadow/files/shadow-4.1.2.1+openpam.patch | 121 | ||||
-rw-r--r-- | sys-apps/shadow/shadow-4.1.2.1.ebuild | 12 |
3 files changed, 134 insertions, 6 deletions
diff --git a/sys-apps/shadow/ChangeLog b/sys-apps/shadow/ChangeLog index c1164a558eb7..73af31641890 100644 --- a/sys-apps/shadow/ChangeLog +++ b/sys-apps/shadow/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-apps/shadow # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/ChangeLog,v 1.205 2008/06/28 23:27:38 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/ChangeLog,v 1.206 2008/07/22 14:23:53 flameeyes Exp $ + + 22 Jul 2008; Diego Pettenò <flameeyes@gentoo.org> + +files/shadow-4.1.2.1+openpam.patch, shadow-4.1.2.1.ebuild: + Add patch to build against OpenPAM, thanks to Seraphim Mellos in bug + #232586. *shadow-4.1.2.1 (28 Jun 2008) diff --git a/sys-apps/shadow/files/shadow-4.1.2.1+openpam.patch b/sys-apps/shadow/files/shadow-4.1.2.1+openpam.patch new file mode 100644 index 000000000000..f10e02d03682 --- /dev/null +++ b/sys-apps/shadow/files/shadow-4.1.2.1+openpam.patch @@ -0,0 +1,121 @@ +Index: shadow-4.1.2.1/configure.in +=================================================================== +--- shadow-4.1.2.1.orig/configure.in ++++ shadow-4.1.2.1/configure.in +@@ -339,13 +339,29 @@ if test "$with_libpam" != "no"; then + AC_MSG_ERROR(libpam not found) + fi + +- AC_CHECK_LIB(pam_misc, main, +- [pam_misc_lib="yes"], [pam_misc_lib="no"]) +- if test "$pam_misc_lib$with_libpam" = "noyes" ; then +- AC_MSG_ERROR(libpam_misc not found) ++ LIBPAM="-lpam" ++ pam_conv_function="no" ++ ++ AC_CHECK_LIB(pam, openpam_ttyconv, ++ [pam_conv_function="openpam_ttyconv"], ++ AC_CHECK_LIB(pam_misc, misc_conv, ++ [pam_conv_function="misc_conv"; LIBPAM="$LIBPAM -lpam_misc"]) ++ ) ++ ++ if test "$pam_conv_function$with_libpam" = "noyes" ; then ++ AC_MSG_ERROR(PAM conversation function not found) + fi + +- if test "$pam_lib$pam_misc_lib" = "yesyes" ; then ++ pam_headers_found=no ++ AC_CHECK_HEADERS( [security/openpam.h security/pam_misc.h], ++ [ pam_headers_found=yes ; break ], [], ++ [ #include <security/pam_appl.h> ] ) ++ if test "$pam_headers_found$with_libpam" = "noyes" ; then ++ AC_MSG_ERROR(PAM headers not found) ++ fi ++ ++ ++ if test "$pam_lib$pam_headers_found" = "yesyes" -a "$pam_conv_function" != "no" ; then + with_libpam="yes" + else + with_libpam="no" +@@ -353,9 +369,22 @@ if test "$with_libpam" != "no"; then + fi + dnl Now with_libpam is either yes or no + if test "$with_libpam" = "yes"; then ++ AC_CHECK_DECLS([PAM_ESTABLISH_CRED, ++ PAM_DELETE_CRED, ++ PAM_NEW_AUTHTOK_REQD, ++ PAM_DATA_SILENT], ++ [], [], [#include <security/pam_appl.h>]) ++ ++ ++ save_libs=$LIBS ++ LIBS="$LIBS $LIBPAM" ++ AC_CHECK_FUNCS([pam_fail_delay]) ++ LIBS=$save_libs ++ + AC_DEFINE(USE_PAM, 1, [Define to support Pluggable Authentication Modules]) ++ AC_DEFINE_UNQUOTED(SHADOW_PAM_CONVERSATION, [$pam_conv_function],[PAM converstation to use]) + AM_CONDITIONAL(USE_PAM, [true]) +- LIBPAM="-lpam -lpam_misc" ++ + AC_MSG_CHECKING(use login and su access checking if PAM not used) + AC_MSG_RESULT(no) + else +Index: shadow-4.1.2.1/lib/pam_defs.h +=================================================================== +--- shadow-4.1.2.1.orig/lib/pam_defs.h ++++ shadow-4.1.2.1/lib/pam_defs.h +@@ -28,24 +28,31 @@ + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#include <config.h> + #include <security/pam_appl.h> +-#include <security/pam_misc.h> ++#ifdef HAVE_SECURITY_PAM_MISC_H ++# include <security/pam_misc.h> ++#endif ++#ifdef HAVE_SECURITY_OPENPAM_H ++# include <security/openpam.h> ++#endif ++ + + static struct pam_conv conv = { +- misc_conv, ++ SHADOW_PAM_CONVERSATION, + NULL + }; + + /* compatibility with different versions of Linux-PAM */ +-#ifndef PAM_ESTABLISH_CRED ++#if !HAVE_DECL_PAM_ESTABLISH_CRED + #define PAM_ESTABLISH_CRED PAM_CRED_ESTABLISH + #endif +-#ifndef PAM_DELETE_CRED ++#if !HAVE_DECL_PAM_DELETE_CRED + #define PAM_DELETE_CRED PAM_CRED_DELETE + #endif +-#ifndef PAM_NEW_AUTHTOK_REQD ++#if !HAVE_DECL_PAM_NEW_AUTHTOK_REQD + #define PAM_NEW_AUTHTOK_REQD PAM_AUTHTOKEN_REQD + #endif +-#ifndef PAM_DATA_SILENT ++#if !HAVE_DECL_PAM_DATA_SILENT + #define PAM_DATA_SILENT 0 + #endif +Index: shadow-4.1.2.1/src/login.c +=================================================================== +--- shadow-4.1.2.1.orig/src/login.c ++++ shadow-4.1.2.1/src/login.c +@@ -644,9 +644,10 @@ int main (int argc, char **argv) + failed = 0; + + failcount++; ++#ifdef HAVE_PAM_FAIL_DELAY + if (delay > 0) + retcode = pam_fail_delay(pamh, 1000000*delay); +- ++#endif + retcode = pam_authenticate (pamh, 0); + + pam_get_item (pamh, PAM_USER, diff --git a/sys-apps/shadow/shadow-4.1.2.1.ebuild b/sys-apps/shadow/shadow-4.1.2.1.ebuild index f403ed5950d4..d07c3262059e 100644 --- a/sys-apps/shadow/shadow-4.1.2.1.ebuild +++ b/sys-apps/shadow/shadow-4.1.2.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.1.2.1.ebuild,v 1.1 2008/06/28 23:27:38 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.1.2.1.ebuild,v 1.2 2008/07/22 14:23:53 flameeyes Exp $ inherit eutils libtool toolchain-funcs autotools pam multilib @@ -13,10 +13,9 @@ SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" IUSE="audit cracklib nls pam selinux skey" -# Does not work with OpenPAM (yet?) RDEPEND="audit? ( sys-process/audit ) cracklib? ( >=sys-libs/cracklib-2.7-r3 ) - pam? ( >=sys-libs/pam-0.99 ) + pam? ( virtual/pam ) !sys-apps/pam-login !app-admin/nologin skey? ( sys-auth/skey ) @@ -39,6 +38,11 @@ src_unpack() { epatch "${FILESDIR}"/${PN}-4.0.13-dots-in-usernames.patch epatch "${FILESDIR}"/${PN}-4.0.13-long-groupnames.patch + # Support OpenPAM #232586 + epatch "${FILESDIR}"/${P}+openpam.patch + + eautoreconf + elibtoolize epunt_cxx } @@ -46,8 +50,6 @@ src_unpack() { src_compile() { tc-is-cross-compiler && export ac_cv_func_setpgrp_void=yes econf \ - --disable-desrpc \ - --with-libcrypt \ --enable-shared=no \ --enable-static=yes \ $(use_with audit) \ |