diff --git a/srcpkgs/shadow/patches/shadow-add-missing-include.patch b/srcpkgs/shadow/patches/shadow-add-missing-include.patch new file mode 100644 index 00000000000..85f3467418d --- /dev/null +++ b/srcpkgs/shadow/patches/shadow-add-missing-include.patch @@ -0,0 +1,10 @@ +--- libmisc/copydir.c 2010-09-05 11:35:26.000000000 -0400 ++++ libmisc/copydir.c 2011-06-26 01:26:52.000000000 -0400 +@@ -34,6 +34,7 @@ + + #ident "$Id: copydir.c 3283 2010-09-05 15:34:42Z nekral-guest $" + ++#include + #include + #include + #include diff --git a/srcpkgs/shadow/patches/shadow-strncpy-usage.patch b/srcpkgs/shadow/patches/shadow-strncpy-usage.patch new file mode 100644 index 00000000000..1996621cb63 --- /dev/null +++ b/srcpkgs/shadow/patches/shadow-strncpy-usage.patch @@ -0,0 +1,23 @@ +--- src/usermod.c.orig 2012-02-13 08:19:43.792146449 -0500 ++++ src/usermod.c 2012-02-13 08:21:19.375114500 -0500 +@@ -182,7 +182,7 @@ + struct tm *tp; + + if (date < 0) { +- strncpy (buf, "never", maxsize); ++ strncpy (buf, "never", maxsize - 1); + } else { + time_t t = (time_t) date; + tp = gmtime (&t); +--- src/login.c.orig 2012-02-13 08:19:50.951994454 -0500 ++++ src/login.c 2012-02-13 08:21:04.490430937 -0500 +@@ -752,7 +752,8 @@ + _("%s login: "), hostn); + } else { + strncpy (loginprompt, _("login: "), +- sizeof (loginprompt)); ++ sizeof (loginprompt) - 1); ++ loginprompt[sizeof (loginprompt) - 1] = '\0'; + } + + retcode = pam_set_item (pamh, PAM_USER_PROMPT, loginprompt); diff --git a/srcpkgs/shadow/patches/xstrdup.patch b/srcpkgs/shadow/patches/xstrdup.patch new file mode 100644 index 00000000000..93bbcf0434b --- /dev/null +++ b/srcpkgs/shadow/patches/xstrdup.patch @@ -0,0 +1,9 @@ +--- libmisc/xmalloc.c 2008-08-30 21:55:44.000000000 -0500 ++++ libmisc/xmalloc.c.new 2008-08-30 21:55:36.000000000 -0500 +@@ -61,5 +61,6 @@ + + char *xstrdup (const char *str) + { ++ if(str == NULL) return NULL; + return strcpy (xmalloc (strlen (str) + 1), str); + } diff --git a/srcpkgs/shadow/shadow.rshlibs b/srcpkgs/shadow/shadow.rshlibs index a9b1eb8d2c3..fc578f36b11 100644 --- a/srcpkgs/shadow/shadow.rshlibs +++ b/srcpkgs/shadow/shadow.rshlibs @@ -2,3 +2,5 @@ libc.so.6 libpam.so.0 libpam_misc.so.0 libcrypt.so.1 +libacl.so.1 +libattr.so.1 diff --git a/srcpkgs/shadow/template b/srcpkgs/shadow/template index 603ac1988c7..612f9ff2a68 100644 --- a/srcpkgs/shadow/template +++ b/srcpkgs/shadow/template @@ -1,16 +1,15 @@ # Template file for 'shadow' pkgname=shadow -version=4.1.4.3 -revision=5 +version=4.1.5 homepage="http://pkg-shadow.alioth.debian.org" distfiles="$homepage/releases/$pkgname-$version.tar.bz2" build_style=gnu-configure configure_args="--libdir=/lib --enable-shared --disable-static - --with-libpam --without-selinux" +--with-libpam --without-selinux --with-acl --with-attr" short_desc="Shadow password file utilities" maintainer="Juan RP " license="BSD" -checksum=633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778 +checksum=e3c1ac70fa08d932777639c861155dc61024c2d4961e76f0d07fd239ba10cd87 long_desc=" Shadow password file utilities for GNU/Linux." @@ -25,8 +24,9 @@ conf_files="/etc/pam.d/usermod /etc/pam.d/userdel /etc/pam.d/useradd CFLAGS="-fPIE" LDFLAGS="-pie" -Add_dependency build pam-devel Add_dependency build gettext +Add_dependency build acl-devel +Add_dependency build pam-devel pre_build() { # Don't install the groups cmd, we use the one from coreutils.