diff options
author | Fabio Erculiani <lxnay@gentoo.org> | 2009-12-04 23:26:34 +0000 |
---|---|---|
committer | Fabio Erculiani <lxnay@gentoo.org> | 2009-12-04 23:26:34 +0000 |
commit | d0e9af1c81f2336f77c34d0e4aca6793db481f88 (patch) | |
tree | fb70e31606feec7ca67c29c6145d342cfbd5dc65 /sys-apps/shadow | |
parent | Fix LICENSE (bug #177815). (diff) | |
download | historical-d0e9af1c81f2336f77c34d0e4aca6793db481f88.tar.gz historical-d0e9af1c81f2336f77c34d0e4aca6793db481f88.tar.bz2 historical-d0e9af1c81f2336f77c34d0e4aca6793db481f88.zip |
Fix invalid environment variables reset, close bug #283725, thanks to myself for reporting, thanks to parafin for providing a working patch
Package-Manager: portage-2.2_rc46/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/shadow')
-rw-r--r-- | sys-apps/shadow/ChangeLog | 10 | ||||
-rw-r--r-- | sys-apps/shadow/Manifest | 19 | ||||
-rw-r--r-- | sys-apps/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch | 12 | ||||
-rw-r--r-- | sys-apps/shadow/shadow-4.1.3.1.ebuild | 187 | ||||
-rw-r--r-- | sys-apps/shadow/shadow-4.1.4.2-r1.ebuild (renamed from sys-apps/shadow/shadow-4.1.4.1.ebuild) | 4 | ||||
-rw-r--r-- | sys-apps/shadow/shadow-4.1.4.2.ebuild | 187 |
6 files changed, 27 insertions, 392 deletions
diff --git a/sys-apps/shadow/ChangeLog b/sys-apps/shadow/ChangeLog index 0575d45d5142..6357f0318c7d 100644 --- a/sys-apps/shadow/ChangeLog +++ b/sys-apps/shadow/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-apps/shadow # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/ChangeLog,v 1.228 2009/07/24 18:26:53 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/ChangeLog,v 1.229 2009/12/04 23:26:34 lxnay Exp $ + +*shadow-4.1.4.2-r1 (04 Dec 2009) + + 04 Dec 2009; Fabio Erculiani <lxnay@gentoo.org> -shadow-4.1.3.1.ebuild, + -shadow-4.1.4.1.ebuild, -shadow-4.1.4.2.ebuild, +shadow-4.1.4.2-r1.ebuild, + +files/shadow-4.1.4.2-env-reset-keep-locale.patch: + Fix invalid environment variables reset, close bug #283725, thanks to + myself for reporting, thanks to parafin for providing a working patch *shadow-4.1.4.2 (24 Jul 2009) diff --git a/sys-apps/shadow/Manifest b/sys-apps/shadow/Manifest index 99ece43b572e..2f0c31dfa051 100644 --- a/sys-apps/shadow/Manifest +++ b/sys-apps/shadow/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX 4.1.2.2/shadow-svn-2298.patch 1702 RMD160 0c9acfa0a9664e58012dfc86aea2b328aedcfc24 SHA1 aae2e1aa5b40269258f7bef890e93685bd7ff6b4 SHA256 a19dfd9a3f884930f7a1458e9e9767853d09949a9c04274762097ceddfd8129b AUX 4.1.2.2/shadow-svn-2364.patch 1944 RMD160 b70c637777ce46115fff0ce1796feff0b5d32e24 SHA1 861172fb52ccafe0e7c35cb740dbfae472a5b59d SHA256 32f1da89c135aaa03062e973b3f2281f560c1cc35663af739ae2b4c2dafc6277 AUX default/useradd 96 RMD160 55c38953c800c6aae1ebe4312028560f77e7414f SHA1 348916abd4f794ee99310e1c006fbf00296ea2d7 SHA256 31aa2cbe4a34a9f7d4d134c1fecd007c9bbf4d40e19d0dcddbcd396f1853b490 @@ -38,22 +35,12 @@ AUX shadow-4.1.2.2-l64a.patch 308 RMD160 d7d0ab42c8fd3d9a53dd1ce262dfc7b17fa4f31 AUX shadow-4.1.2.2-optional-nscd.patch 3244 RMD160 f844c6958f4f3830e9d98daa7622c12991918f61 SHA1 91590b754b562c0918b3232cd4f9e4282cf54891 SHA256 18d97094520b9eda248da1449cda5b448d4102dd234cce4af5cabd6190afb652 AUX shadow-4.1.2.2-optional-utimes.patch 1397 RMD160 ffeceac79a9474fcd4c9064ebac6edddc45b6eeb SHA1 b56a1174a5fa591b04d7b93b44ec2c5f9285dd28 SHA256 28de85f16e6f4c52ea8f67beecd483d9a58adcd3c2234e88da049fccb9aabd93 AUX shadow-4.1.3-dots-in-usernames.patch 302 RMD160 dcd0fdb1646a16cae1f3da0858257a22addefd17 SHA1 997e007090618713f9f0295ab540a6f2c9489885 SHA256 2299ffaec204d20e00d791bf5b982571c9261a74c7a7b865a9f7cad1cdcb43ba +AUX shadow-4.1.4.2-env-reset-keep-locale.patch 466 RMD160 f6f038729fe230edd6f2222c42754a5381f0d597 SHA1 9f3aaf40ff0db7a47a30762c27d71efc02c44ef5 SHA256 f2f5786f3daff320212dd13370fa53ad25132ba0b33bb26c8610450696df3673 DIST shadow-4.1.2.2.tar.bz2 1697615 RMD160 19b8d3bc37d26d708ecad6a86e6a1f2dcc3c51d3 SHA1 6cbd29104c219ff6776eececb8068f7326d57a45 SHA256 378fbfb0e8bb8c87be239fccd692818871f763206bb7d881744f4fa72dc6b491 -DIST shadow-4.1.3.1.tar.bz2 1700410 RMD160 cf22332343f57793aed431d7329a81f70cbe17f3 SHA1 9cc82ac7d8497b207982c7cdf2288910f38ca7bb SHA256 1f00bbeb2f2a02d17c55468ca3f49190971b3441861f1235ab3092ee7545c8f5 -DIST shadow-4.1.4.1.tar.bz2 1778831 RMD160 bb2f78ca661f76cf2241f6bd9ea0bb494dee4bbe SHA1 2f35b85de87076f6f5383a9d0538b2aec13dd416 SHA256 f3dc204a67c587d1e0a5ad2de24ee584adb3f30c604444e554de29e379fec844 DIST shadow-4.1.4.2.tar.bz2 1790400 RMD160 8483dc5aefc52708199e09a7b2d6831f0a8e357b SHA1 43e29471057c671de51360b10e3ee2b419c78ffa SHA256 97987f6a7967a85e6aa0dba2a1d52db8bd69af5a717391de5693db768fb78990 DIST shadow_4.0.18.2.orig.tar.gz 2501791 RMD160 f13d5c06bc88eea8d851a8c396110b2e96d1bb39 SHA1 c3426cddc8605ddb7ff55fdc231dc191ecc46989 SHA256 0b3cbfb32200cacd8544734d227d0a576642baf573f972f046bbbae457145cae EBUILD shadow-4.0.18.2.ebuild 5172 RMD160 52a11801829a25b8c856d0841e0f398dc103ec08 SHA1 2f0a7f884c7f37ecc2679bbfcd3e642974edd79a SHA256 aba083a533bab41c29dd818772b5890f8b8eb9b634bb870b75b9bf0046c3b8a6 EBUILD shadow-4.1.2.2.ebuild 4754 RMD160 8c5c5bbb82ef37b66dc9da78b4a735dba6660fb4 SHA1 935f5d49f4d6cb928275c9fe32e0cd86ea87b62c SHA256 78898eb623d2a5da8697408528b57b45304a8981b17865eb1f4bc99ec74831c6 -EBUILD shadow-4.1.3.1.ebuild 5099 RMD160 c799c378e2c19ba910725988a34200e2f1960eca SHA1 c3b2f96f5e7330aad28ae125ca4914021a9b466e SHA256 c47fa6a20843ee51765902094ecd5b70218834952c1537713b1053dc7fdbf75f -EBUILD shadow-4.1.4.1.ebuild 5099 RMD160 2925ad8374efb1c6cd389a88303b4b0eb46456ae SHA1 e082cdc37e78559aecaa7b93cff7364308e3ca09 SHA256 196613794a20a660b082c8266ffb77d35472d84f0ecae064f0fc1719ef92108f -EBUILD shadow-4.1.4.2.ebuild 5099 RMD160 8eca8e31b8c265fc5efe1b1b482b832e7e205193 SHA1 bb49d82a194681cb31dca672b30c338b72fd79ef SHA256 d3db586432932d7e1e836674b77e5ebc0e55b17336885ace138157ef9db57bbf -MISC ChangeLog 39239 RMD160 e7eaf269317d7771f050203b5e9b37d8343be582 SHA1 a0ef90bba5976ea43f56ba6d195e375776bed4c2 SHA256 c244aee66df5b4f7f3d57c6d3b11c1b449c9320fb4759b4f9ded0f712af68250 +EBUILD shadow-4.1.4.2-r1.ebuild 5182 RMD160 64c9e2a1454bf1f0d0025aab846b63cced8770e3 SHA1 8b41b0b6d2ab533e91b61e12291b6ed181719cee SHA256 99d8792d19a852282175dd79efa92c45a43e2aa55626ce5d1d58b79b23ebfd8e +MISC ChangeLog 39621 RMD160 48afc7992a77363416c3b03f5f6a619738527efc SHA1 9cae9c97a34ea171965a0b6672e51dca0522cfbe SHA256 5e219fe40441f89c7d016890620933b867b7e7efa35827bd417d9731e9095d14 MISC metadata.xml 412 RMD160 8cb1c2ffd3365f4334c78591e9349d394771dfed SHA1 e32195b6f24c7feae2ddfa3c9410a109c1e357f2 SHA256 41b211af54ade1542ce67559eeeb233c9fde4c97e66ef3602ae0f2dc228d7504 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.11 (GNU/Linux) - -iEYEARECAAYFAkqRHekACgkQlPl3HsVfCDqj1QCffWvC92Lgj2l5IPVI1sT9euB4 -sVkAnA26rcRm3au6Hqk/5dGkuXHVLRvd -=VFe6 ------END PGP SIGNATURE----- diff --git a/sys-apps/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch b/sys-apps/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch new file mode 100644 index 000000000000..919640e6dd3d --- /dev/null +++ b/sys-apps/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch @@ -0,0 +1,12 @@ +diff -ur shadow-4.1.4.2/libmisc/env.c shadow-4.1.4.2-patched/libmisc/env.c +--- shadow-4.1.4.2/libmisc/env.c 2009-04-28 00:07:56.000000000 +0400 ++++ shadow-4.1.4.2-patched/libmisc/env.c 2009-12-04 16:12:42.000000000 +0300 +@@ -251,7 +251,7 @@ + if (strncmp (*cur, *bad, strlen (*bad)) != 0) { + continue; + } +- if (strchr (*cur, '/') != NULL) { ++ if (strchr (*cur, '/') == NULL) { + continue; /* OK */ + } + for (move = cur; NULL != *move; move++) { diff --git a/sys-apps/shadow/shadow-4.1.3.1.ebuild b/sys-apps/shadow/shadow-4.1.3.1.ebuild deleted file mode 100644 index 99ff69c222be..000000000000 --- a/sys-apps/shadow/shadow-4.1.3.1.ebuild +++ /dev/null @@ -1,187 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.1.3.1.ebuild,v 1.2 2009/08/23 10:45:45 vapier Exp $ - -inherit eutils libtool toolchain-funcs pam multilib - -DESCRIPTION="Utilities to deal with user accounts" -HOMEPAGE="http://shadow.pld.org.pl/ http://pkg-shadow.alioth.debian.org/" -SRC_URI="ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-${PV}.tar.bz2" - -LICENSE="BSD GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="audit cracklib nls pam selinux skey" - -RDEPEND="audit? ( sys-process/audit ) - cracklib? ( >=sys-libs/cracklib-2.7-r3 ) - pam? ( virtual/pam ) - !sys-apps/pam-login - !app-admin/nologin - skey? ( sys-auth/skey ) - selinux? ( >=sys-libs/libselinux-1.28 ) - nls? ( virtual/libintl )" -DEPEND="${RDEPEND} - nls? ( sys-devel/gettext )" -RDEPEND="${RDEPEND} - pam? ( >=sys-auth/pambase-20080219.1 )" - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${PN}-4.1.3-dots-in-usernames.patch #22920 - elibtoolize - epunt_cxx -} - -src_compile() { - tc-is-cross-compiler && export ac_cv_func_setpgrp_void=yes - econf \ - --without-group-name-max-length \ - --enable-shared=no \ - --enable-static=yes \ - $(use_with audit) \ - $(use_with cracklib libcrack) \ - $(use_with pam libpam) \ - $(use_with skey) \ - $(use_with selinux) \ - $(use_enable nls) \ - $(use_with elibc_glibc nscd) - emake || die "compile problem" -} - -set_login_opt() { - local comment="" opt=$1 val=$2 - [[ -z ${val} ]] && comment="#" - sed -i -r \ - -e "/^#?${opt}/s:.*:${comment}${opt} ${val}:" \ - "${D}"/etc/login.defs - local res=$(grep "^${comment}${opt}" "${D}"/etc/login.defs) - einfo ${res:-Unable to find ${opt} in /etc/login.defs} -} - -src_install() { - emake DESTDIR="${D}" suidperms=4711 install || die "install problem" - dosym useradd /usr/sbin/adduser - - # Remove libshadow and libmisc; see bug 37725 and the following - # comment from shadow's README.linux: - # Currently, libshadow.a is for internal use only, so if you see - # -lshadow in a Makefile of some other package, it is safe to - # remove it. - rm -f "${D}"/{,usr/}$(get_libdir)/lib{misc,shadow}.{a,la} - - insinto /etc - # Using a securetty with devfs device names added - # (compat names kept for non-devfs compatibility) - insopts -m0600 ; doins "${FILESDIR}"/securetty - if ! use pam ; then - insopts -m0600 - doins etc/login.access etc/limits - fi - # Output arch-specific cruft - case $(tc-arch) in - ppc*) echo "hvc0" >> "${D}"/etc/securetty - echo "hvsi0" >> "${D}"/etc/securetty - echo "ttyPSC0" >> "${D}"/etc/securetty;; - hppa) echo "ttyB0" >> "${D}"/etc/securetty;; - arm) echo "ttyFB0" >> "${D}"/etc/securetty;; - sh) echo "ttySC0" >> "${D}"/etc/securetty - echo "ttySC1" >> "${D}"/etc/securetty;; - esac - - # needed for 'adduser -D' - insinto /etc/default - insopts -m0600 - doins "${FILESDIR}"/default/useradd - - # move passwd to / to help recover broke systems #64441 - mv "${D}"/usr/bin/passwd "${D}"/bin/ - dosym /bin/passwd /usr/bin/passwd - - cd "${S}" - insinto /etc - insopts -m0644 - newins etc/login.defs login.defs - - if ! use pam ; then - set_login_opt MAIL_CHECK_ENAB no - set_login_opt SU_WHEEL_ONLY yes - set_login_opt CRACKLIB_DICTPATH /usr/$(get_libdir)/cracklib_dict - set_login_opt LOGIN_RETRIES 3 - set_login_opt ENCRYPT_METHOD SHA512 - else - dopamd "${FILESDIR}/pam.d-include/"{su,passwd,shadow} - - newpamd "${FILESDIR}/login.pamd.2" login - - for x in chage chsh chfn chpasswd newusers \ - user{add,del,mod} group{add,del,mod} ; do - newpamd "${FILESDIR}"/pam.d-include/shadow ${x} - done - - # comment out login.defs options that pam hates - local opt - for opt in \ - CHFN_AUTH \ - CRACKLIB_DICTPATH \ - ENV_HZ \ - ENVIRON_FILE \ - FAILLOG_ENAB \ - FTMP_FILE \ - LASTLOG_ENAB \ - MAIL_CHECK_ENAB \ - MOTD_FILE \ - NOLOGINS_FILE \ - OBSCURE_CHECKS_ENAB \ - PASS_ALWAYS_WARN \ - PASS_CHANGE_TRIES \ - PASS_MIN_LEN \ - PORTTIME_CHECKS_ENAB \ - QUOTAS_ENAB \ - SU_WHEEL_ONLY - do - set_login_opt ${opt} - done - - sed -i -f "${FILESDIR}"/login_defs_pam.sed \ - "${D}"/etc/login.defs - - # remove manpages that pam will install for us - # and/or don't apply when using pam - find "${D}"/usr/share/man \ - '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \ - -exec rm {} \; - fi - - # Remove manpages that are handled by other packages - find "${D}"/usr/share/man \ - '(' -name id.1 -o -name passwd.5 -o -name getspnam.3 ')' \ - -exec rm {} \; - - cd "${S}" - dodoc ChangeLog NEWS TODO - newdoc README README.download - cd doc - dodoc HOWTO README* WISHLIST *.txt -} - -pkg_preinst() { - rm -f "${ROOT}"/etc/pam.d/system-auth.new \ - "${ROOT}/etc/login.defs.new" - - use pam && pam_epam_expand "${D}"/etc/pam.d/login -} - -pkg_postinst() { - # Enable shadow groups (we need ROOT=/ here, as grpconv only - # operate on / ...). - if [[ ${ROOT} == / && ! -f /etc/gshadow ]] ; then - if grpck -r 2>/dev/null ; then - grpconv - else - ewarn "Running 'grpck' returned errors. Please run it by hand, and then" - ewarn "run 'grpconv' afterwards!" - fi - fi -} diff --git a/sys-apps/shadow/shadow-4.1.4.1.ebuild b/sys-apps/shadow/shadow-4.1.4.2-r1.ebuild index 2ca635ba216f..a80cd80de651 100644 --- a/sys-apps/shadow/shadow-4.1.4.1.ebuild +++ b/sys-apps/shadow/shadow-4.1.4.2-r1.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-apps/shadow/shadow-4.1.4.1.ebuild,v 1.2 2009/08/23 10:45:45 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.1.4.2-r1.ebuild,v 1.1 2009/12/04 23:26:34 lxnay Exp $ inherit eutils libtool toolchain-funcs pam multilib @@ -29,6 +29,8 @@ RDEPEND="${RDEPEND} src_unpack() { unpack ${A} cd "${S}" + # See Gentoo bug #283725 + epatch "${FILESDIR}/${P}-env-reset-keep-locale.patch" epatch "${FILESDIR}"/${PN}-4.1.3-dots-in-usernames.patch #22920 elibtoolize epunt_cxx diff --git a/sys-apps/shadow/shadow-4.1.4.2.ebuild b/sys-apps/shadow/shadow-4.1.4.2.ebuild deleted file mode 100644 index a6feebbdfe67..000000000000 --- a/sys-apps/shadow/shadow-4.1.4.2.ebuild +++ /dev/null @@ -1,187 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.1.4.2.ebuild,v 1.2 2009/08/23 10:45:45 vapier Exp $ - -inherit eutils libtool toolchain-funcs pam multilib - -DESCRIPTION="Utilities to deal with user accounts" -HOMEPAGE="http://shadow.pld.org.pl/ http://pkg-shadow.alioth.debian.org/" -SRC_URI="ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-${PV}.tar.bz2" - -LICENSE="BSD GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="audit cracklib nls pam selinux skey" - -RDEPEND="audit? ( sys-process/audit ) - cracklib? ( >=sys-libs/cracklib-2.7-r3 ) - pam? ( virtual/pam ) - !sys-apps/pam-login - !app-admin/nologin - skey? ( sys-auth/skey ) - selinux? ( >=sys-libs/libselinux-1.28 ) - nls? ( virtual/libintl )" -DEPEND="${RDEPEND} - nls? ( sys-devel/gettext )" -RDEPEND="${RDEPEND} - pam? ( >=sys-auth/pambase-20080219.1 )" - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${PN}-4.1.3-dots-in-usernames.patch #22920 - elibtoolize - epunt_cxx -} - -src_compile() { - tc-is-cross-compiler && export ac_cv_func_setpgrp_void=yes - econf \ - --without-group-name-max-length \ - --enable-shared=no \ - --enable-static=yes \ - $(use_with audit) \ - $(use_with cracklib libcrack) \ - $(use_with pam libpam) \ - $(use_with skey) \ - $(use_with selinux) \ - $(use_enable nls) \ - $(use_with elibc_glibc nscd) - emake || die "compile problem" -} - -set_login_opt() { - local comment="" opt=$1 val=$2 - [[ -z ${val} ]] && comment="#" - sed -i -r \ - -e "/^#?${opt}/s:.*:${comment}${opt} ${val}:" \ - "${D}"/etc/login.defs - local res=$(grep "^${comment}${opt}" "${D}"/etc/login.defs) - einfo ${res:-Unable to find ${opt} in /etc/login.defs} -} - -src_install() { - emake DESTDIR="${D}" suidperms=4711 install || die "install problem" - dosym useradd /usr/sbin/adduser - - # Remove libshadow and libmisc; see bug 37725 and the following - # comment from shadow's README.linux: - # Currently, libshadow.a is for internal use only, so if you see - # -lshadow in a Makefile of some other package, it is safe to - # remove it. - rm -f "${D}"/{,usr/}$(get_libdir)/lib{misc,shadow}.{a,la} - - insinto /etc - # Using a securetty with devfs device names added - # (compat names kept for non-devfs compatibility) - insopts -m0600 ; doins "${FILESDIR}"/securetty - if ! use pam ; then - insopts -m0600 - doins etc/login.access etc/limits - fi - # Output arch-specific cruft - case $(tc-arch) in - ppc*) echo "hvc0" >> "${D}"/etc/securetty - echo "hvsi0" >> "${D}"/etc/securetty - echo "ttyPSC0" >> "${D}"/etc/securetty;; - hppa) echo "ttyB0" >> "${D}"/etc/securetty;; - arm) echo "ttyFB0" >> "${D}"/etc/securetty;; - sh) echo "ttySC0" >> "${D}"/etc/securetty - echo "ttySC1" >> "${D}"/etc/securetty;; - esac - - # needed for 'adduser -D' - insinto /etc/default - insopts -m0600 - doins "${FILESDIR}"/default/useradd - - # move passwd to / to help recover broke systems #64441 - mv "${D}"/usr/bin/passwd "${D}"/bin/ - dosym /bin/passwd /usr/bin/passwd - - cd "${S}" - insinto /etc - insopts -m0644 - newins etc/login.defs login.defs - - if ! use pam ; then - set_login_opt MAIL_CHECK_ENAB no - set_login_opt SU_WHEEL_ONLY yes - set_login_opt CRACKLIB_DICTPATH /usr/$(get_libdir)/cracklib_dict - set_login_opt LOGIN_RETRIES 3 - set_login_opt ENCRYPT_METHOD SHA512 - else - dopamd "${FILESDIR}/pam.d-include/"{su,passwd,shadow} - - newpamd "${FILESDIR}/login.pamd.2" login - - for x in chage chsh chfn chpasswd newusers \ - user{add,del,mod} group{add,del,mod} ; do - newpamd "${FILESDIR}"/pam.d-include/shadow ${x} - done - - # comment out login.defs options that pam hates - local opt - for opt in \ - CHFN_AUTH \ - CRACKLIB_DICTPATH \ - ENV_HZ \ - ENVIRON_FILE \ - FAILLOG_ENAB \ - FTMP_FILE \ - LASTLOG_ENAB \ - MAIL_CHECK_ENAB \ - MOTD_FILE \ - NOLOGINS_FILE \ - OBSCURE_CHECKS_ENAB \ - PASS_ALWAYS_WARN \ - PASS_CHANGE_TRIES \ - PASS_MIN_LEN \ - PORTTIME_CHECKS_ENAB \ - QUOTAS_ENAB \ - SU_WHEEL_ONLY - do - set_login_opt ${opt} - done - - sed -i -f "${FILESDIR}"/login_defs_pam.sed \ - "${D}"/etc/login.defs - - # remove manpages that pam will install for us - # and/or don't apply when using pam - find "${D}"/usr/share/man \ - '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \ - -exec rm {} \; - fi - - # Remove manpages that are handled by other packages - find "${D}"/usr/share/man \ - '(' -name id.1 -o -name passwd.5 -o -name getspnam.3 ')' \ - -exec rm {} \; - - cd "${S}" - dodoc ChangeLog NEWS TODO - newdoc README README.download - cd doc - dodoc HOWTO README* WISHLIST *.txt -} - -pkg_preinst() { - rm -f "${ROOT}"/etc/pam.d/system-auth.new \ - "${ROOT}/etc/login.defs.new" - - use pam && pam_epam_expand "${D}"/etc/pam.d/login -} - -pkg_postinst() { - # Enable shadow groups (we need ROOT=/ here, as grpconv only - # operate on / ...). - if [[ ${ROOT} == / && ! -f /etc/gshadow ]] ; then - if grpck -r 2>/dev/null ; then - grpconv - else - ewarn "Running 'grpck' returned errors. Please run it by hand, and then" - ewarn "run 'grpconv' afterwards!" - fi - fi -} |