From 38423c67c8a23f6a1bc42038193182e2da3116eb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 25 Apr 2020 11:37:10 +0100 Subject: gentoo resync : 25.04.2020 --- sys-apps/shadow/Manifest | 5 - sys-apps/shadow/files/shadow-4.7-optional_su.patch | 130 ------------ sys-apps/shadow/shadow-4.6.ebuild | 214 ------------------- sys-apps/shadow/shadow-4.7-r2.ebuild | 236 --------------------- 4 files changed, 585 deletions(-) delete mode 100644 sys-apps/shadow/files/shadow-4.7-optional_su.patch delete mode 100644 sys-apps/shadow/shadow-4.6.ebuild delete mode 100644 sys-apps/shadow/shadow-4.7-r2.ebuild (limited to 'sys-apps/shadow') diff --git a/sys-apps/shadow/Manifest b/sys-apps/shadow/Manifest index afa159b50d92..ad1cf516dc8f 100644 --- a/sys-apps/shadow/Manifest +++ b/sys-apps/shadow/Manifest @@ -4,14 +4,9 @@ AUX pam.d-include/passwd 144 BLAKE2B 95e159c70416218950ad5cdc41c83b52f8d2ec042d3 AUX pam.d-include/shadow 152 BLAKE2B 82d1f678abc60586ea873da7e2f4907349d77a64085cc475fa09c47cb008b41a7a00a7de2816b2c5cb2f48452d1b07523be35f8dd29026736ba8fbd3ae3d7c56 SHA512 d07611c350d0d6f3386db5080c80a84e4135cf33e44fd3a390cb1092e034f9bd2a69495fadd4bda6ede9962e9658e77f2c8e12d3189cdcda6c7b3c607336f0c3 AUX pam.d-include/shadow-r1 116 BLAKE2B bc7baa8e224cb90b6ef79762941b3b7505fcf4b8ed8c5da06a33a8a7fefa91098e4ac0c0f915eeca4a19714d60a2bf43e3922805347e3dfe0ccc80f210bf88e4 SHA512 ddecc5cc8f667f9931ddf5d98d89a986712c5a6e44826add1e1d9ead37064758a3879f6afd1fc45c89c216956593852051e2ef3abc52e2ab58a0e191adfe75d1 AUX shadow-4.1.3-dots-in-usernames.patch 302 BLAKE2B a83f463be9267c3a704997b98d67cd0daddf8ee05debf447d091530517a855078bd53ce28c87045643b2b8c467dd09caad06a4eb0a6568c271e6a42b49a54dcc SHA512 ad20fb3f4f0292f39b5da796e41df71e9e8b1b81dd11a99b2d988440c1b435b0061333a0a5a37a909598d5a840a75946e8c59c74426bae7452de88cf673a5f7d -AUX shadow-4.7-optional_su.patch 3683 BLAKE2B 084151a48182f2b46830f4bcbe46234f753c169614d12f582acc93bed8c5ce69d8cd6bfeccb9936f0dbcb76efe947ae36e415fd659ffd4ee51c64d3270c33e6f SHA512 7f60622470d77b28d603d85b7873cfa01896f8368a09491fd1a0eac93aa6e763638cb279392b6a787b6be39c961566732aa1057b096480f397a50e1e2b10672c AUX shadow-4.8-revert-bin-merge.patch 305 BLAKE2B 2fb6407ed60251b3367931c2c7eb9b2bdaaff565ff5338fb6ffddc9b618963e7835925c07fea0cbaeeee90a03b7e0c571f0e1b9e1844fe9397f4e74672edb080 SHA512 bd821f6af288ac4a3cf9b0de30753626db90d187ece7d53ee7e0d6b7c61dbfecda84bd9ae60958120cc8ddce48055878c9daaa668dd88392bb70b73c7ad4fb01 -DIST shadow-4.6.tar.gz 3804282 BLAKE2B 268c90e7daba138827aec6039f428f52cdcf7929743fa1f49f801cc669de7456ec5a69531194cdb29f051ce7d0b2f1e966fdf2513a9fc8f7fbdeb29d786a509f SHA512 36358333e7f03ef558772f3361bc5851a7d7fd3d85c993a6b732e37304b8068b2893d55607b9bfe8b8eed616a687264f947ff66cefc74ea1a48ba9396d464714 -DIST shadow-4.7.tar.gz 3833335 BLAKE2B 8e030d3dcc5eb76332ff76aad8e9141edb4ae660f56dd3b420968c538d3022a72ab620710b9274b9afb44f497399f5c4ceef339b7d2c52106b9b8368ff127654 SHA512 9b134dc90d8fb39bc72db69ddb78cef6263921c8a2f00abc00ac796bf468ac18393399920eec14bd2a78b814a06fc18eb6f5685ede13fe222fc66b2e411cbb01 DIST shadow-4.8.1.tar.xz 1611196 BLAKE2B 952707cdd55dc6c00dcbc60dbc3bf84ac618dbe916b36d993802b3ce42594de332a9bc22933a28881af3d317a340eab017ada55511b4e4fbc3ca6b422c4bc254 SHA512 780a983483d847ed3c91c82064a0fa902b6f4185225978241bc3bc03fcc3aa143975b46aee43151c6ba43efcfdb1819516b76ba7ad3d1d3c34fcc38ea42e917b DIST shadow-4.8.tar.xz 1609060 BLAKE2B 9d0b515e40f45c0baf420ef7ffaf5b6dd7989b26c93fc6dd610876263ac22e61fbc2821649d347c28055ae84f64cd5ab5c2435450c55339c80b4ae5062ccc44f SHA512 1c607aec541400fc179d6cbbac7511289c618ab2ce6ee9d7c18a8bfda00421c62d4b9e58aff52b5f82d485468e7db955c186ea0faad9a08003ffc01bdf2ccece -EBUILD shadow-4.6.ebuild 5362 BLAKE2B 02e544a16044414f516aa98aefaae42d0dc86ce0d38501b1fb96251a3a147663efa0dbf22531a29204e7525614c273e78c5b4f0b98ca1d9414d8ee125792510a SHA512 ca07031d750b4be585d4ad3b270655e367529b1484461a9bc885943759ddb74fec7e0edaa839fa0e89c80eee345f00310c1a2bce2efd4879db5af9512860ee19 -EBUILD shadow-4.7-r2.ebuild 5865 BLAKE2B 904ce926d616c2d99f5c46cd76d467f379d2f03abaa2d69146ecfec1d1c8924ffca62b4f2384c52bed56e567b989f1ffda69015a8e3d66e8330eb84668af9d6d SHA512 11d686c602af33ccd92636d0d62fb5e314234192f7258c657c5a32789b99526f09f24268c7db1155128ba6e27c5b3f7b91f0ef9c7fb16088bfba74b3bafac3ae EBUILD shadow-4.8-r4.ebuild 5919 BLAKE2B 5441c3c87cad36d5d699dc9550773a0dbada6f7d9611e5f5c4257dbe7ce4bbdc9897462f83fa716697e29d9b41b4a0a9013150e1345c8a977df54513d0c6d3a6 SHA512 60213de331d25a1e3460c2f3534185949be43c88dacfce11c3e90f7e56c54eae42f63ddbea24ceef155511593edc1f6e6abd719701ac675b4482c7244817240d EBUILD shadow-4.8.1-r2.ebuild 5905 BLAKE2B cea5476aaf7a100ca61170bcae7c051c6b53ef4ff0e076ade433a391710e4724575c28ca9984fa6e9c81511c36e62894cf42de27c3570567d518b137e780eb07 SHA512 91dbacdb37c7ab338a3e6d570cf0c19b2e04e80a89afc9f0773141cabdacc6cad9d4c11432b7d72ef0c41efd4a216a6026c5dd1b4b5baaf30d236a3509879c7e MISC metadata.xml 562 BLAKE2B 7ea54e53f53a91898e5cb5975e9f1aa37639b0ca887213e389c85e0b46cc2dcdf6a1a80795ecd3a74ecc1c4b76d600af563b8d26ce618de1030914ae04f4b152 SHA512 35e207e3d5e3de3f93c8c4a580ec7109bbb778d2d424eef76c5c6b25f8b47d68480a55e9d2b15f9be4f27a273443d6220752337eb538dc05517c0c5a004722e7 diff --git a/sys-apps/shadow/files/shadow-4.7-optional_su.patch b/sys-apps/shadow/files/shadow-4.7-optional_su.patch deleted file mode 100644 index 472846460776..000000000000 --- a/sys-apps/shadow/files/shadow-4.7-optional_su.patch +++ /dev/null @@ -1,130 +0,0 @@ -From ddb0553b2e559fd431fe8b460c37cb7fef8c06ee Mon Sep 17 00:00:00 2001 -From: Lars Wendler -Date: Tue, 19 Nov 2019 10:57:06 +0100 -Subject: [PATCH] build: Make build/installation of su and its support files - optional - -Enabled by default -This is necessary because coreutils and util-linux can also provide su - -Signed-off-by: Lars Wendler ---- - configure.ac | 7 +++++++ - etc/pam.d/Makefile.am | 7 +++++-- - man/Makefile.am | 5 ++++- - src/Makefile.am | 10 ++++++++-- - 4 files changed, 24 insertions(+), 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 67625564..5629df98 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -286,6 +286,9 @@ AC_ARG_WITH(sssd, - AC_ARG_WITH(group-name-max-length, - [AC_HELP_STRING([--with-group-name-max-length], [set max group name length @<:@default=16@:>@])], - [with_group_name_max_length=$withval], [with_group_name_max_length=yes]) -+AC_ARG_WITH(su, -+ [AC_HELP_STRING([--with-su], [build and install su program and man page @<:@default=yes@:>@])], -+ [with_su=$withval], [with_su=yes]) - - if test "$with_group_name_max_length" = "no" ; then - with_group_name_max_length=0 -@@ -313,6 +316,9 @@ if test "$with_sssd" = "yes"; then - [AC_MSG_ERROR([posix_spawn is needed for sssd support])]) - fi - -+AS_IF([test "$with_su" != "no"], AC_DEFINE(WITH_SU, 1, [Build with su])]) -+AM_CONDITIONAL([WITH_SU], [test "x$with_su" != "xno"]) -+ - dnl Check for some functions in libc first, only if not found check for - dnl other libraries. This should prevent linking libnsl if not really - dnl needed (Linux glibc, Irix), but still link it if needed (Solaris). -@@ -719,4 +725,5 @@ echo " nscd support: $with_nscd" - echo " sssd support: $with_sssd" - echo " subordinate IDs support: $enable_subids" - echo " use file caps: $with_fcaps" -+echo " install su: $with_su" - echo -diff --git a/etc/pam.d/Makefile.am b/etc/pam.d/Makefile.am -index d967eb95..38ff26ae 100644 ---- a/etc/pam.d/Makefile.am -+++ b/etc/pam.d/Makefile.am -@@ -6,8 +6,7 @@ pamd_files = \ - chsh \ - groupmems \ - login \ -- passwd \ -- su -+ passwd - - pamd_acct_tools_files = \ - chage \ -@@ -29,4 +28,8 @@ pamd_DATA += $(pamd_acct_tools_files) - endif - endif - -+if WITH_SU -+pamd_files += su -+endif -+ - EXTRA_DIST = $(pamd_files) $(pamd_acct_tools_files) -diff --git a/man/Makefile.am b/man/Makefile.am -index 3f040e05..8b64feba 100644 ---- a/man/Makefile.am -+++ b/man/Makefile.am -@@ -41,7 +41,6 @@ man_MANS = \ - man1/sg.1 \ - man3/shadow.3 \ - man5/shadow.5 \ -- man1/su.1 \ - man5/suauth.5 \ - man8/useradd.8 \ - man8/userdel.8 \ -@@ -54,6 +53,10 @@ man_nopam = \ - man5/login.access.5 \ - man5/porttime.5 - -+if WITH_SU -+man_MANS += man1/su.1 -+endif -+ - if !USE_PAM - man_MANS += $(man_nopam) - endif -diff --git a/src/Makefile.am b/src/Makefile.am -index 34690ced..06ee9545 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -23,12 +23,15 @@ AM_CPPFLAGS = \ - # and installation would be much simpler (just two directories, - # $prefix/bin and $prefix/sbin, no install-data hacks...) - --bin_PROGRAMS = groups login su -+bin_PROGRAMS = groups login - sbin_PROGRAMS = nologin - ubin_PROGRAMS = faillog lastlog chage chfn chsh expiry gpasswd newgrp passwd - if ENABLE_SUBIDS - ubin_PROGRAMS += newgidmap newuidmap - endif -+if WITH_SU -+bin_PROGRAMS += su -+endif - usbin_PROGRAMS = \ - chgpasswd \ - chpasswd \ -@@ -52,8 +55,11 @@ usbin_PROGRAMS = \ - # id and groups are from gnu, sulogin from sysvinit - noinst_PROGRAMS = id sulogin - --suidbins = su -+suidbins = - suidubins = chage chfn chsh expiry gpasswd newgrp -+if WITH_SU -+suidbins += su -+endif - if !WITH_TCB - suidubins += passwd - endif --- -2.24.0 - diff --git a/sys-apps/shadow/shadow-4.6.ebuild b/sys-apps/shadow/shadow-4.6.ebuild deleted file mode 100644 index f8f0277dc131..000000000000 --- a/sys-apps/shadow/shadow-4.6.ebuild +++ /dev/null @@ -1,214 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit libtool pam - -DESCRIPTION="Utilities to deal with user accounts" -HOMEPAGE="https://github.com/shadow-maint/shadow" -SRC_URI="https://github.com/shadow-maint/shadow/releases/download/${PV}/${P}.tar.gz" - -LICENSE="BSD GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 ~riscv s390 sparc x86" -IUSE="acl audit +cracklib nls pam selinux skey split-usr xattr" -# Taken from the man/Makefile.am file. -LANGS=( cs da de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW ) - -RDEPEND="acl? ( sys-apps/acl:0= ) - audit? ( >=sys-process/audit-2.6:0= ) - cracklib? ( >=sys-libs/cracklib-2.7-r3:0= ) - pam? ( sys-libs/pam:0= ) - skey? ( sys-auth/skey:0= ) - selinux? ( - >=sys-libs/libselinux-1.28:0= - sys-libs/libsemanage:0= - ) - nls? ( virtual/libintl ) - xattr? ( sys-apps/attr:0= )" -DEPEND="${RDEPEND} - app-arch/xz-utils - nls? ( sys-devel/gettext )" -RDEPEND="${RDEPEND} - pam? ( >=sys-auth/pambase-20150213 )" - -PATCHES=( - "${FILESDIR}/${PN}-4.1.3-dots-in-usernames.patch" -) - -src_prepare() { - default - #eautoreconf - elibtoolize -} - -src_configure() { - local myeconfargs=( - --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) - ) - econf "${myeconfargs[@]}" - - has_version 'sys-libs/uclibc[-rpc]' && sed -i '/RLOGIN/d' config.h #425052 - - if use nls ; then - local l langs="po" # These are the pot files. - for l in ${LANGS[*]} ; do - has ${l} ${LINGUAS-${l}} && langs+=" ${l}" - done - sed -i "/^SUBDIRS = /s:=.*:= ${langs}:" man/Makefile || die - fi -} - -set_login_opt() { - local comment="" opt=$1 val=$2 - if [[ -z ${val} ]]; then - comment="#" - sed -i \ - -e "/^${opt}\>/s:^:#:" \ - "${ED%/}"/etc/login.defs || die - else - sed -i -r \ - -e "/^#?${opt}\>/s:.*:${opt} ${val}:" \ - "${ED%/}"/etc/login.defs - fi - local res=$(grep "^${comment}${opt}\>" "${ED%/}"/etc/login.defs) - einfo "${res:-Unable to find ${opt} in /etc/login.defs}" -} - -src_install() { - emake DESTDIR="${D}" suidperms=4711 install - - # 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 "${ED%/}"/{,usr/}$(get_libdir)/lib{misc,shadow}.{a,la} - - insinto /etc - if ! use pam ; then - insopts -m0600 - doins etc/login.access etc/limits - fi - - # needed for 'useradd -D' - insinto /etc/default - insopts -m0600 - doins "${FILESDIR}"/default/useradd - - if use split-usr ; then - # move passwd to / to help recover broke systems #64441 - dodir /bin - mv "${ED%/}"/usr/bin/passwd "${ED%/}"/bin/ || die - dosym ../../bin/passwd /usr/bin/passwd - fi - - cd "${S}" || die - insinto /etc - insopts -m0644 - newins etc/login.defs login.defs - - set_login_opt CREATE_HOME yes - 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 - set_login_opt CONSOLE - else - dopamd "${FILESDIR}"/pam.d-include/shadow - - for x in chpasswd chgpasswd newusers; do - newpamd "${FILESDIR}"/pam.d-include/passwd ${x} - done - - for x in chage chsh chfn \ - 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 sed_args=() - for opt in \ - CHFN_AUTH \ - CONSOLE \ - 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} - sed_args+=( -e "/^#${opt}\>/b pamnote" ) - done - sed -i "${sed_args[@]}" \ - -e 'b exit' \ - -e ': pamnote; i# NOTE: This setting should be configured via /etc/pam.d/ and not in this file.' \ - -e ': exit' \ - "${ED%/}"/etc/login.defs || die - - # remove manpages that pam will install for us - # and/or don't apply when using pam - find "${ED%/}"/usr/share/man \ - '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \ - -delete - - # Remove pam.d files provided by pambase. - rm "${ED%/}"/etc/pam.d/{login,passwd,su} || die - fi - - # Remove manpages that are handled by other packages - find "${ED%/}"/usr/share/man \ - '(' -name id.1 -o -name passwd.5 -o -name getspnam.3 ')' \ - -delete - - cd "${S}" || die - dodoc ChangeLog NEWS TODO - newdoc README README.download - cd doc || die - dodoc HOWTO README* WISHLIST *.txt -} - -pkg_preinst() { - rm -f "${EROOT}"/etc/pam.d/system-auth.new \ - "${EROOT}/etc/login.defs.new" -} - -pkg_postinst() { - # Enable shadow groups. - if [ ! -f "${EROOT}"/etc/gshadow ] ; then - if grpck -r -R "${EROOT}" 2>/dev/null ; then - grpconv -R "${EROOT}" - 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." -} diff --git a/sys-apps/shadow/shadow-4.7-r2.ebuild b/sys-apps/shadow/shadow-4.7-r2.ebuild deleted file mode 100644 index f30ee5ed23c7..000000000000 --- a/sys-apps/shadow/shadow-4.7-r2.ebuild +++ /dev/null @@ -1,236 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools libtool pam - -DESCRIPTION="Utilities to deal with user accounts" -HOMEPAGE="https://github.com/shadow-maint/shadow" -SRC_URI="https://github.com/shadow-maint/shadow/releases/download/${PV}/${P}.tar.gz" - -LICENSE="BSD GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="acl audit +cracklib nls pam selinux skey split-usr +su xattr" -# Taken from the man/Makefile.am file. -LANGS=( cs da de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW ) - -BDEPEND=" - app-arch/xz-utils - sys-devel/gettext -" -COMMON_DEPEND=" - acl? ( sys-apps/acl:0= ) - audit? ( >=sys-process/audit-2.6:0= ) - cracklib? ( >=sys-libs/cracklib-2.7-r3:0= ) - nls? ( virtual/libintl ) - pam? ( sys-libs/pam:0= ) - skey? ( sys-auth/skey:0= ) - selinux? ( - >=sys-libs/libselinux-1.28:0= - sys-libs/libsemanage:0= - ) - xattr? ( sys-apps/attr:0= ) -" -DEPEND="${COMMON_DEPEND} - >=sys-kernel/linux-headers-4.14 -" -RDEPEND="${COMMON_DEPEND} - pam? ( >=sys-auth/pambase-20150213 ) - su? ( !sys-apps/util-linux[su(-)] ) -" - -PATCHES=( - "${FILESDIR}/${PN}-4.1.3-dots-in-usernames.patch" - "${FILESDIR}/${PN}-4.7-optional_su.patch" -) - -src_prepare() { - default - eautoreconf - #elibtoolize -} - -src_configure() { - local myeconfargs=( - --with-btrfs - --without-group-name-max-length - --without-tcb - --enable-shared=no - --enable-static=yes - $(use_enable nls) - $(use_with acl) - $(use_with audit) - $(use_with cracklib libcrack) - $(use_with elibc_glibc nscd) - $(use_with pam libpam) - $(use_with selinux) - $(use_with skey) - $(use_with su) - $(use_with xattr attr) - ) - econf "${myeconfargs[@]}" - - has_version 'sys-libs/uclibc[-rpc]' && sed -i '/RLOGIN/d' config.h #425052 - - if use nls ; then - local l langs="po" # These are the pot files. - for l in ${LANGS[*]} ; do - has ${l} ${LINGUAS-${l}} && langs+=" ${l}" - done - sed -i "/^SUBDIRS = /s:=.*:= ${langs}:" man/Makefile || die - fi -} - -set_login_opt() { - local comment="" opt=$1 val=$2 - if [[ -z ${val} ]]; then - comment="#" - sed -i \ - -e "/^${opt}\>/s:^:#:" \ - "${ED}"/etc/login.defs || die - else - sed -i -r \ - -e "/^#?${opt}\>/s:.*:${opt} ${val}:" \ - "${ED}"/etc/login.defs - fi - local res=$(grep "^${comment}${opt}\>" "${ED}"/etc/login.defs) - einfo "${res:-Unable to find ${opt} in /etc/login.defs}" -} - -src_install() { - emake DESTDIR="${D}" suidperms=4711 install - - # 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 "${ED}"/{,usr/}$(get_libdir)/lib{misc,shadow}.{a,la} - - insinto /etc - if ! use pam ; then - insopts -m0600 - doins etc/login.access etc/limits - fi - - # needed for 'useradd -D' - insinto /etc/default - insopts -m0600 - doins "${FILESDIR}"/default/useradd - - if use split-usr ; then - # move passwd to / to help recover broke systems #64441 - # We cannot simply remove this or else net-misc/scponly - # and other tools will break because of hardcoded passwd - # location - dodir /bin - mv "${ED}"/usr/bin/passwd "${ED}"/bin/ || die - dosym ../../bin/passwd /usr/bin/passwd - fi - - cd "${S}" || die - insinto /etc - insopts -m0644 - newins etc/login.defs login.defs - - set_login_opt CREATE_HOME yes - 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 - set_login_opt CONSOLE - else - dopamd "${FILESDIR}"/pam.d-include/shadow - - for x in chpasswd chgpasswd newusers; do - newpamd "${FILESDIR}"/pam.d-include/passwd ${x} - done - - for x in chage chsh chfn \ - 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 sed_args=() - for opt in \ - CHFN_AUTH \ - CONSOLE \ - 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} - sed_args+=( -e "/^#${opt}\>/b pamnote" ) - done - sed -i "${sed_args[@]}" \ - -e 'b exit' \ - -e ': pamnote; i# NOTE: This setting should be configured via /etc/pam.d/ and not in this file.' \ - -e ': exit' \ - "${ED}"/etc/login.defs || die - - # remove manpages that pam will install for us - # and/or don't apply when using pam - find "${ED}"/usr/share/man -type f \ - '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \ - -delete - - # Remove pam.d files provided by pambase. - rm "${ED}"/etc/pam.d/{login,passwd} || die - if use su ; then - rm "${ED}"/etc/pam.d/su || die - fi - fi - - # Remove manpages that are handled by other packages - find "${ED}"/usr/share/man \ - '(' -name id.1 -o -name passwd.5 -o -name getspnam.3 ')' \ - -delete - - cd "${S}" || die - dodoc ChangeLog NEWS TODO - newdoc README README.download - cd doc || die - dodoc HOWTO README* WISHLIST *.txt -} - -pkg_preinst() { - rm -f "${EROOT}"/etc/pam.d/system-auth.new \ - "${EROOT}/etc/login.defs.new" -} - -pkg_postinst() { - # Enable shadow groups. - if [ ! -f "${EROOT}"/etc/gshadow ] ; then - if grpck -r -R "${EROOT}" 2>/dev/null ; then - grpconv -R "${EROOT}" - else - ewarn "Running 'grpck' returned errors. Please run it by hand, and then" - ewarn "run 'grpconv' afterwards!" - fi - fi - - [[ ! -f "${EROOT}"/etc/subgid ]] && - touch "${EROOT}"/etc/subgid - [[ ! -f "${EROOT}"/etc/subuid ]] && - touch "${EROOT}"/etc/subuid - - einfo "The 'adduser' symlink to 'useradd' has been dropped." -} -- cgit v1.2.3