pam: update to 1.2.1.

This commit is contained in:
Juan RP 2015-07-10 07:37:19 +02:00
parent 78a451a097
commit 14902a61e6
3 changed files with 38 additions and 15 deletions

View File

@ -0,0 +1,31 @@
--- ./modules/pam_exec/pam_exec.c.orig
+++ ./modules/pam_exec/pam_exec.c
@@ -103,11 +103,14 @@
int optargc;
const char *logfile = NULL;
const char *authtok = NULL;
+ char authtok_buf[PAM_MAX_RESP_SIZE+1];
+
pid_t pid;
int fds[2];
int stdout_fds[2];
FILE *stdout_file = NULL;
+ memset(authtok_buf, 0, sizeof(authtok_buf));
if (argc < 1) {
pam_syslog (pamh, LOG_ERR,
"This module needs at least one argument");
@@ -178,11 +181,11 @@
}
pam_set_item (pamh, PAM_AUTHTOK, resp);
- authtok = strndupa (resp, PAM_MAX_RESP_SIZE);
+ authtok = strncpy(authtok_buf, resp, sizeof(authtok_buf));
_pam_drop (resp);
}
else
- authtok = strndupa (void_pass, PAM_MAX_RESP_SIZE);
+ authtok = strncpy(authtok_buf, void_pass, sizeof(authtok_buf));
if (pipe(fds) != 0)
{

View File

@ -93,14 +93,3 @@
#endif
if (retval != 0) {
if (!opt_silent || opt_debug)
--- configure.in.orig 2014-01-11 13:09:06.207296880 +0100
+++ configure.in 2014-01-11 13:14:56.237585380 +0100
@@ -404,7 +404,7 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" =
[crypt_libs="crypt"])
BACKUP_LIBS=$LIBS
-AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="-l$ac_lib", LIBCRYPT="")
+AC_SEARCH_LIBS([crypt],[$crypt_libs], [test -n "$ac_lib" && LIBCRYPT="-l$ac_lib"], LIBCRYPT="")
AC_CHECK_FUNCS(crypt_r crypt_gensalt_r)
LIBS=$BACKUP_LIBS
AC_SUBST(LIBCRYPT)

View File

@ -1,7 +1,7 @@
# Template file for 'pam'
pkgname=pam
version=1.1.8
revision=10
version=1.2.1
revision=1
build_pie=yes
wrksrc="Linux-PAM-$version"
build_style=gnu-configure
@ -28,10 +28,13 @@ short_desc="A flexible mechanism for authenticating users"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.kernel.org/pub/linux/libs/pam/"
license="GPL-2"
distfiles="https://fedorahosted.org/releases/l/i/linux-pam/Linux-PAM-${version}.tar.bz2"
checksum=c4b1f23a236d169e2496fea20721578d864ba00f7242d2b41d81050ac87a1e55
distfiles="http://linux-pam.org/library/Linux-PAM-${version}.tar.bz2"
checksum=342b1211c0d3b203a7df2540a5b03a428a087bd8a48c17e49ae268f992b334d9
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
*-musl) configure_args+=" ac_cv_search_crypt=no";;
esac
autoreconf -fi
}
post_install() {