diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-12-17 18:44:03 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-12-17 18:44:03 +0000 |
commit | a8dbf37f8d2a1cdfaa49d852dbf0e399ef7cbcc8 (patch) | |
tree | e31e16262f9f39988731b8038050f6af0e0b08af /sys-libs/pam | |
parent | Fix old style Qt4 depend (diff) | |
download | gentoo-2-a8dbf37f8d2a1cdfaa49d852dbf0e399ef7cbcc8.tar.gz gentoo-2-a8dbf37f8d2a1cdfaa49d852dbf0e399ef7cbcc8.tar.bz2 gentoo-2-a8dbf37f8d2a1cdfaa49d852dbf0e399ef7cbcc8.zip |
Add patch to restore building on uClibc.
(Portage version: 2.2_rc60/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs/pam')
-rw-r--r-- | sys-libs/pam/ChangeLog | 6 | ||||
-rw-r--r-- | sys-libs/pam/files/Linux-PAM-1.1.0-uclibc.patch | 82 | ||||
-rw-r--r-- | sys-libs/pam/pam-1.1.1.ebuild | 6 |
3 files changed, 92 insertions, 2 deletions
diff --git a/sys-libs/pam/ChangeLog b/sys-libs/pam/ChangeLog index bf4665253017..b4593021d71b 100644 --- a/sys-libs/pam/ChangeLog +++ b/sys-libs/pam/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-libs/pam # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/ChangeLog,v 1.251 2009/12/16 18:16:14 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/ChangeLog,v 1.252 2009/12/17 18:44:03 flameeyes Exp $ + + 17 Dec 2009; Diego E. Pettenò <flameeyes@gentoo.org> + +files/Linux-PAM-1.1.0-uclibc.patch, pam-1.1.1.ebuild: + Add patch to restore building on uClibc. *pam-1.1.1 (16 Dec 2009) diff --git a/sys-libs/pam/files/Linux-PAM-1.1.0-uclibc.patch b/sys-libs/pam/files/Linux-PAM-1.1.0-uclibc.patch new file mode 100644 index 000000000000..6b8fa25f8f59 --- /dev/null +++ b/sys-libs/pam/files/Linux-PAM-1.1.0-uclibc.patch @@ -0,0 +1,82 @@ +Index: Linux-PAM-1.1.0/modules/pam_pwhistory/opasswd.c +=================================================================== +--- Linux-PAM-1.1.0.orig/modules/pam_pwhistory/opasswd.c ++++ Linux-PAM-1.1.0/modules/pam_pwhistory/opasswd.c +@@ -94,6 +94,23 @@ parse_entry (char *line, opwd *data) + return 0; + } + ++static int ++compare_password(const char *newpass, const char *oldpass) ++{ ++ char *outval; ++#ifdef HAVE_CRYPT_R ++ struct crypt_data output; ++ ++ output.initialized = 0; ++ ++ outval = crypt_r (newpass, oldpass, &output); ++#else ++ outval = crypt (newpass, oldpass); ++#endif ++ ++ return strcmp(outval, oldpass) == 0; ++} ++ + /* Check, if the new password is already in the opasswd file. */ + int + check_old_password (pam_handle_t *pamh, const char *user, +@@ -167,12 +184,9 @@ check_old_password (pam_handle_t *pamh, + if (found) + { + const char delimiters[] = ","; +- struct crypt_data output; + char *running; + char *oldpass; + +- memset (&output, 0, sizeof (output)); +- + running = strdupa (entry.old_passwords); + if (running == NULL) + return PAM_BUF_ERR; +@@ -180,7 +194,7 @@ check_old_password (pam_handle_t *pamh, + do { + oldpass = strsep (&running, delimiters); + if (oldpass && strlen (oldpass) > 0 && +- strcmp (crypt_r (newpass, oldpass, &output), oldpass) == 0) ++ compare_password(newpass, oldpass) ) + { + if (debug) + pam_syslog (pamh, LOG_DEBUG, "New password already used"); +Index: Linux-PAM-1.1.0/configure.in +=================================================================== +--- Linux-PAM-1.1.0.orig/configure.in ++++ Linux-PAM-1.1.0/configure.in +@@ -458,7 +458,7 @@ AC_FUNC_MEMCMP + AC_FUNC_VPRINTF + AC_CHECK_FUNCS(fseeko gethostname gettimeofday lckpwdf mkdir select) + AC_CHECK_FUNCS(strcspn strdup strspn strstr strtol uname) +-AC_CHECK_FUNCS(getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r) ++AC_CHECK_FUNCS(getutent_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r) + AC_CHECK_FUNCS(getgrouplist getline getdelim) + AC_CHECK_FUNCS(inet_ntop inet_pton ruserok_af) + +Index: Linux-PAM-1.1.0/modules/pam_timestamp/pam_timestamp.c +=================================================================== +--- Linux-PAM-1.1.0.orig/modules/pam_timestamp/pam_timestamp.c ++++ Linux-PAM-1.1.0/modules/pam_timestamp/pam_timestamp.c +@@ -200,7 +200,13 @@ check_login_time(const char *ruser, time + time_t oldest_login = 0; + + setutent(); +- while(!getutent_r(&utbuf, &ut)) { ++ while( ++#ifdef HAVE_GETUTENT_R ++ !getutent_r(&utbuf, &ut) ++#else ++ (ut = getutent()) != NULL ++#endif ++ ) { + if (ut->ut_type != USER_PROCESS) { + continue; + } diff --git a/sys-libs/pam/pam-1.1.1.ebuild b/sys-libs/pam/pam-1.1.1.ebuild index 5b843b70ec30..711db8486b1e 100644 --- a/sys-libs/pam/pam-1.1.1.ebuild +++ b/sys-libs/pam/pam-1.1.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-1.1.1.ebuild,v 1.1 2009/12/16 18:16:14 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-1.1.1.ebuild,v 1.2 2009/12/17 18:44:03 flameeyes Exp $ inherit libtool multilib eutils autotools pam toolchain-funcs flag-o-matic @@ -84,6 +84,10 @@ src_unpack() { # probably use EXTRA_PROGRAMS. epatch "${FILESDIR}/${MY_PN}-0.99.8.1-xtests.patch" + # Fix building on uClibc; it is added since 1.1.1 but applies to + # 1.1.0 as well. + epatch "${FILESDIR}/${MY_PN}-1.1.0-uclibc.patch" + # Remove libtool-2 libtool macros, see bug 261167 rm m4/libtool.m4 m4/lt*.m4 || die "rm libtool macros failed." |