diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-12-24 17:15:03 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-12-24 17:15:03 +0000 |
commit | c7031a0b322bfe547e1830b6b62e8ba7e81e392a (patch) | |
tree | 84dbbcb732c9ddc5f01b44de990db39fa1f56c21 /sys-apps | |
parent | Fix /var/run handling, per bug#448430, thanks to flameeyes (diff) | |
download | historical-c7031a0b322bfe547e1830b6b62e8ba7e81e392a.tar.gz historical-c7031a0b322bfe547e1830b6b62e8ba7e81e392a.tar.bz2 historical-c7031a0b322bfe547e1830b6b62e8ba7e81e392a.zip |
Fix pamd file for newusers (bug #448204 by Sergey Popov).
Package-Manager: portage-2.2.0_alpha149/cvs/Linux x86_64
Manifest-Sign-Key: 0x1CD13C8AD4301342
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/shadow/ChangeLog | 8 | ||||
-rw-r--r-- | sys-apps/shadow/Manifest | 23 | ||||
-rw-r--r-- | sys-apps/shadow/shadow-4.1.5.1-r1.ebuild | 198 |
3 files changed, 214 insertions, 15 deletions
diff --git a/sys-apps/shadow/ChangeLog b/sys-apps/shadow/ChangeLog index 61863271a713..7e7d92d8bfce 100644 --- a/sys-apps/shadow/ChangeLog +++ b/sys-apps/shadow/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/shadow # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/ChangeLog,v 1.274 2012/08/18 21:28:14 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/ChangeLog,v 1.275 2012/12/24 17:14:14 flameeyes Exp $ + +*shadow-4.1.5.1-r1 (24 Dec 2012) + + 24 Dec 2012; Diego E. Pettenò <flameeyes@gentoo.org> + +shadow-4.1.5.1-r1.ebuild: + Fix pamd file for newusers (bug #448204 by Sergey Popov). 18 Aug 2012; Mike Frysinger <vapier@gentoo.org> shadow-4.1.4.3.ebuild, shadow-4.1.5-r1.ebuild, shadow-4.1.5-r2.ebuild, shadow-4.1.5.1.ebuild, diff --git a/sys-apps/shadow/Manifest b/sys-apps/shadow/Manifest index c1f2c6633467..8eeea6e81f2c 100644 --- a/sys-apps/shadow/Manifest +++ b/sys-apps/shadow/Manifest @@ -34,24 +34,19 @@ EBUILD shadow-4.1.4.2-r6.ebuild 5321 SHA256 4a77c13904a42a146ce4c6becb1d98c69249 EBUILD shadow-4.1.4.3.ebuild 5444 SHA256 88ed1044474e017ec791096b5960b8d98874c3209261c5eae813c121a5601d84 SHA512 55fca2f5c627ce81bebc7f526f0027873ed961a89bbc79c458565d4d4e2d209e22db3aa0a3cc774d1730613468ddf7752ae7db4a1877dcb361d8c06eb1d5a594 WHIRLPOOL c6a439b7a96dd5797106ff7068ef2266b8966b2a478a51ea876b374116cd22a26b765d6fd068efb1219ff5f0cb0ef121bc9e904c39e1850036e45d987e694d40 EBUILD shadow-4.1.5-r1.ebuild 5360 SHA256 ec2a2254e09045e849659033998c1a088a6461efd48d8ca3ad055a831684ccf5 SHA512 91c9c9c71d6d78e862ffde4536bbd9c35e88f409041fe35c817cf29f7276681d85be233789d918e053e89960a8c77e4c2a3327f7d8ab63c6958e9bd0c27c62bc WHIRLPOOL 60b1a0b8b9a1099f66d83eb275eeba01b72d5d205cf61592006886a248f7dcaf19eccec6023cbcba229425f8e784d3ae21bd10f936ed0fcfbdf27d7f48b034f6 EBUILD shadow-4.1.5-r2.ebuild 5508 SHA256 8b2b1760a10f254493042805971e4e3a2933e2c56e04b00351b982a87bdd232d SHA512 1efcab09419e228ac0f10d292a54412535abe3ba05296fc11734c1e6f0b5264c71511bcceebc38c6f3c4198dc433b46db421575676aaec96cee1a464455c2e69 WHIRLPOOL 551e965d7e5552fa7cf6dcefb233a851afa5f66bed1e944ca915aa46bf51c2fba43694b33e1c58774c018a7124eec46d11c0a23650da0b0f89213962ced79883 +EBUILD shadow-4.1.5.1-r1.ebuild 5292 SHA256 d013ff5e638784185a2451484fdf07c396f87fd6a563b2a982ca125a686e25c1 SHA512 45e8e9b1fbc669b831a47ce9d8fb56ad1a32e232596e9f8d2f57deb732ef782c88584f8172f4f1edb490da649c85746211d2b964e27d12979fe3bc107fa52d37 WHIRLPOOL 2133aa74e9b6c9dcebd5e07cf491779badb853cb48f5db0667243c1abeea82865b9ab8a5e20efce77a398033238a24dc022a6957347526223b479aace4a6151e EBUILD shadow-4.1.5.1.ebuild 5286 SHA256 0da36c171e0162b095d0a878368c4f4653752800ae404372ace676c79013b4de SHA512 67279b2c87d3dc7d7058696b365e3fe499a6e56c461972a3b94fa0ca5989a30ef63e74946156408275af2fdf88ff75410e4cf0c62bd8b22b26d362bea01ecfd6 WHIRLPOOL 86663847683e2724247105537a496be93310aa8e58e09fc3cbcec718f63eff5a4c51f6d81f2906dfc3271a6a7cd6d9ef0f94ccf1e463e1cfcd94e7c88816e5b9 EBUILD shadow-4.1.5.ebuild 5316 SHA256 3d721e963aebfde2d9c74be7eed0cae750eec4f2957e88c41920de7279bcc390 SHA512 646ceb6e2bb06925c9c87c4e94d7883c24138cfe2209c4e5967a6d9746b8b07b403315de3e5703052b41a73d4eb750f8a73aac0c98e54caee283ac5e30351a58 WHIRLPOOL a8471ffd7138b4feab5b0d6c7dc30425feee10b2c2ac5d5657f85061b089d432a988d4f3bdcaeb31e3f43e37d893ac24f9ab7bdbffd91c78a47dcb3c6edcd751 -MISC ChangeLog 46783 SHA256 a2f0d7d67a371371097fd4e9d3960a92fa11877ce0d3f80f1a5593fa6fd5bdcd SHA512 f6937946bb74dbf750414a826f099804ca5e77610c2f2c98765f94346e85cdf4f220a4b355d89c20429ed6085fb7e8d52635f32c6b8b6053345baa1e5b42a434 WHIRLPOOL 1ce46189d135e025e9579e4c5a2d63e4b40057271b2b76403003b1a1a0518c23844c703e87117ef7bb6acad884c78a150a8059e6ce3b69b06a77f7fb5e160fad +MISC ChangeLog 46966 SHA256 3203527e52234c7e21c940969e34b5c85ccba3d22e3ede48b735272a46b7069c SHA512 73f2131ecf125d054443b0391f36995c3ffaa2a64313d58df05d771450e2f8c2cd83f2a90d9b87bce0669c06d4db4919cdf416720d6af586750e4e09beb45a9d WHIRLPOOL c182c4070f43ea9950e7f20e4a50e92bda4bc75acfa3aeeff814bc447697f3d0b1a11298706990a6ff2d7aca1f273fdfe403bb0957ab24fa83438b7508ca6452 MISC metadata.xml 295 SHA256 70669ae3eafc9eb73e2f493b1286a85c11d3d11b6cd565413eaf929dacff57e7 SHA512 a949e632dbd07e1fe5c045b2bf8628a1423b1981d16b46546a8e024ee35137e02ccf82013c082bdfa59d57af8de45e64f6c90101d863345a6a93b73cf61b9c97 WHIRLPOOL c9856f6a219ae62fee0ac98aa0eaf13ce48e06f864dc0648bad3da640a52c3942e1787a0da9842ca4f1984ecd163e93d724cfb489d3059f8cb73701435cabb9f -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQIcBAEBCAAGBQJQMAj4AAoJELEHsLL7fEFWAQYQALE3MvhnMzzpUCEwiApEzxk9 -gFLKGuv7A11ZAfGc/IxBmC71XgWSVzrIGjbIxXV5QRdUQQzntPs6RmfyRdki5AxL -IAHMP+5ZzvPF4pt3FZ1P6bdlNUjTa9bhBaBYKajHM6X+/Qegg1GpUyvVY5f5ETio -Obmmz4lImuvLk07uv4lRT9Nrv8dXnXTB1vuybTPzM4cuI6ROn88jSFHV6dy2sCF6 -pR1Tpie0jrxQ1DX9vTHKE9wrRNbTOiqw8WRT3ShKuKhwLeGSNv+dJ4lkYHP3G4xW -nbhDuxwzfKq8pl0GEcavbfWqwy6L+txL8kI65OBCkHcjEcfuzNnXaizKHeQ9aaHp -odxdEwZneokC87p+GQI6kCXWMEFlHD4bW5lDsOl+U9wJ6gkChzxSPmi44uivapPl -Ff7Oohep4RPhwd5BuRabr8Qg9nBOzFHUQv3N5WnRiWl0hG81lqExsEdO/fe47/cB -WtEPZI8dn75/Oau+SqXcUxWrmiq61ytQnx1h+eSr6aYjjL3dFwcYfciMzfKoYheG -LTlZvNa0Yz24WWnVkM60maC2zOMDTY1kb6qqFrxgGCrpuWiACvx6x06Z5wmgJSoV -Wd4U4WJV4JKkXzSsP9oQNLB4ay8g8sKkxgclVJ9/Mhp92nXsCibRuTLjf7KLo6e2 -nL5BjD4d4KPfrsF8msOg -=8Pnx +iQEcBAEBCAAGBQJQ2I2WAAoJEBzRPIrUMBNCVj8H/0BXoG6j9K3uVMemPOBD7d7L +4bidToyY5BG5MDonkpJq0g4lYUijAta6vj6wNzKtXlBBWBTGYLlbM8uWIfYysG7D +K8W221tjBDMCUhc3p7vJQ6GjbOcSwOAifb7k3Dy+piOlaihQxzQcfaRJ/kzIXOaI +4kyfUVOCixeF3tlQq/lNVpTPgttPiT4L0rKoYxOlyYXz9yyXg3HvrVhMMpnwuqgi +DtQBEBZ63cEP5so7xECnzT/ciKwN09s0EsdJq7HLRtKH9RFjX+tEI3N6w9vPs3E6 +8MhhGsuc+rEiD7capaaaFKKJo3KBgqiMvJzi6T9BHcMV8p4ypipHukLnZ/8f420= +=zCcN -----END PGP SIGNATURE----- diff --git a/sys-apps/shadow/shadow-4.1.5.1-r1.ebuild b/sys-apps/shadow/shadow-4.1.5.1-r1.ebuild new file mode 100644 index 000000000000..e8b3a5d0a467 --- /dev/null +++ b/sys-apps/shadow/shadow-4.1.5.1-r1.ebuild @@ -0,0 +1,198 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.1.5.1-r1.ebuild,v 1.1 2012/12/24 17:14:14 flameeyes Exp $ + +EAPI="2" + +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="http://pkg-shadow.alioth.debian.org/releases/${P}.tar.bz2" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="acl audit cracklib nls pam selinux skey xattr" + +RDEPEND="acl? ( sys-apps/acl ) + audit? ( sys-process/audit ) + cracklib? ( >=sys-libs/cracklib-2.7-r3 ) + pam? ( virtual/pam ) + skey? ( sys-auth/skey ) + selinux? ( + >=sys-libs/libselinux-1.28 + sys-libs/libsemanage + ) + nls? ( virtual/libintl ) + xattr? ( sys-apps/attr )" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext )" +RDEPEND="${RDEPEND} + pam? ( >=sys-auth/pambase-20120417 )" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-4.1.3-dots-in-usernames.patch #22920 + epatch_user + elibtoolize + epunt_cxx +} + +src_configure() { + tc-is-cross-compiler && export ac_cv_func_setpgrp_void=yes + econf \ + --without-group-name-max-length \ + --without-tcb \ + --enable-shared=no \ + --enable-static=yes \ + $(use_with acl) \ + $(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) \ + $(use_with xattr attr) + has_version 'sys-libs/uclibc[-rpc]' && sed -i '/RLOGIN/d' config.h #425052 +} + +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 + + # 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 + local devs + case $(tc-arch) in + ppc*) devs="hvc0 hvsi0 ttyPSC0";; + hppa) devs="ttyB0";; + arm) devs="ttyFB0 ttySAC0 ttySAC1 ttySAC2 ttySAC3 ttymxc0 ttymxc1 ttyO0 ttyO1 ttyO2";; + sh) devs="ttySC0 ttySC1";; + esac + [[ -n ${devs} ]] && printf '%s\n' ${devs} >> "${D}"/etc/securetty + + # needed for 'useradd -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/shadow || die + + for x in chpasswd chgpasswd newusers; do + newpamd "${FILESDIR}"/pam.d-include/passwd ${x} || die + done + + for x in chage chsh chfn \ + user{add,del,mod} group{add,del,mod} ; do + newpamd "${FILESDIR}"/pam.d-include/shadow ${x} || die + 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 {} + + + # Remove pam.d files provided by pambase. + rm "${D}"/etc/pam.d/{login,passwd,su} || die + 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. + if [ ! -f "${ROOT}"/etc/gshadow ] ; then + if grpck -r -R "${ROOT}" 2>/dev/null ; then + grpconv -R "${ROOT}" + else + ewarn "Running 'grpck' returned errors. Please run it by hand, and then" + ewarn "run 'grpconv' afterwards!" + fi + fi + + einfo "The 'adduser' symlink to 'useradd' has been dropped." +} |