summaryrefslogtreecommitdiff
path: root/sys-apps/shadow
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/shadow')
-rw-r--r--sys-apps/shadow/Manifest2
-rw-r--r--sys-apps/shadow/files/pam.d-include/shadow-r17
-rw-r--r--sys-apps/shadow/shadow-4.8-r3.ebuild233
3 files changed, 242 insertions, 0 deletions
diff --git a/sys-apps/shadow/Manifest b/sys-apps/shadow/Manifest
index 770eeef93f7f..bd953167cd2e 100644
--- a/sys-apps/shadow/Manifest
+++ b/sys-apps/shadow/Manifest
@@ -1,6 +1,7 @@
AUX default/useradd 96 BLAKE2B 64b694bdff7f901e19ac21695e3b2eebeb5a03683be5a01e33f96a4e7f94d1059a3ea3703fd4f7167778c8aebb0605640edfd60c46bc48242fae8b37f7182303 SHA512 87b01ac88c2065392fa988871489d8403ef93341b4cfbadb4504f39a2a3396ddef756efc6378868d00627a58a1feb9612eb52a8135558a211a09c6a9ccf3404f
AUX pam.d-include/passwd 144 BLAKE2B 95e159c70416218950ad5cdc41c83b52f8d2ec042d35c9908ca400bd57dcb234fb7691aa2a5a7646a379553aa6dee0dd96ee569aa492d7f20774e991a90f8602 SHA512 31611a08d97cd2c129f18d451a555ff6c781f91603c77fc0c66ff406b5fa4a97db19ae4ce104816a6324529d10e131de0d5329646bdab2abc8dc3ee5b82b057f
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
@@ -10,4 +11,5 @@ DIST shadow-4.8.tar.xz 1609060 BLAKE2B 9d0b515e40f45c0baf420ef7ffaf5b6dd7989b26c
EBUILD shadow-4.6.ebuild 5363 BLAKE2B 90361141986d5b78eee02f022665073d2af2970949a5406b9aee09b5a7abd7aa8397048596275daa3bba4547380764f2c5ff26d634cbf03f8c387274f016282e SHA512 95c2ab76e365f10cf57277708dca5a5b96b24f1d527cd86d1ab5209f04f51251b3eb123473c77558223ae8c08310af13d2f8fe6e7314f69055933af8a9001074
EBUILD shadow-4.7-r2.ebuild 5794 BLAKE2B f7a8dde2cac49657be337c7e226e6341c764ee0ed9ab1aa6e9d2bba96eb1f903c9fdb63c77152f5fd1ed1a4493fdd16a87ef6a01010c493650deb0a05da9a8e3 SHA512 9965f73207d382ca980fc996978ea6db7520b343029c61ae0d192ef4cb77dafe89e42142dcf561648c224415d1d696bcc865bce0544744e77579ba62a928e80b
EBUILD shadow-4.8-r2.ebuild 5855 BLAKE2B 965b32c9bec14bb3974e0bb576fa7cbee71dfee64015da653a6a2d1a08f2ea59aae6b4490f3f24c3ddad7982fdccbd5a3da8e4634778093809d508f2aa0b8c9b SHA512 2feae1d196ef0e6eddf74417ae846921e8c94fa820dc7f10d0e66d7748523db265810080f676291d2cb89d998a5c6467a857ad76d2facf8c76faf8cce5e9a3a3
+EBUILD shadow-4.8-r3.ebuild 5762 BLAKE2B d75b0f31ae6652a7d1513282b1bdbda106988a1e6cd97aacf8bb94cc03d07d2d4d52d9f3cf75f4c723331051407d012bcde828bb62120d9bb3145c9ed06b9a0a SHA512 e89ec9de0bbc6edaa6b25d07690269073e59ac9ee716c95f49b52c6c3bca5a3812b068703dc5a9b78b5980ab40b0db808437ff4180f1fe20991ac83757af7091
MISC metadata.xml 562 BLAKE2B 7ea54e53f53a91898e5cb5975e9f1aa37639b0ca887213e389c85e0b46cc2dcdf6a1a80795ecd3a74ecc1c4b76d600af563b8d26ce618de1030914ae04f4b152 SHA512 35e207e3d5e3de3f93c8c4a580ec7109bbb778d2d424eef76c5c6b25f8b47d68480a55e9d2b15f9be4f27a273443d6220752337eb538dc05517c0c5a004722e7
diff --git a/sys-apps/shadow/files/pam.d-include/shadow-r1 b/sys-apps/shadow/files/pam.d-include/shadow-r1
new file mode 100644
index 000000000000..e42e8493ffe3
--- /dev/null
+++ b/sys-apps/shadow/files/pam.d-include/shadow-r1
@@ -0,0 +1,7 @@
+#%PAM-1.0
+
+auth sufficient pam_rootok.so
+
+account include system-auth
+
+password required pam_permit.so
diff --git a/sys-apps/shadow/shadow-4.8-r3.ebuild b/sys-apps/shadow/shadow-4.8-r3.ebuild
new file mode 100644
index 000000000000..ce51a62e4d92
--- /dev/null
+++ b/sys-apps/shadow/shadow-4.8-r3.ebuild
@@ -0,0 +1,233 @@
+# Copyright 1999-2019 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.xz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
+IUSE="acl audit bcrypt +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 )
+
+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=
+ )
+ su? ( !sys-apps/util-linux[su] )
+ xattr? ( sys-apps/attr:0= )
+"
+BDEPEND="
+ app-arch/xz-utils
+ sys-devel/gettext
+"
+RDEPEND="
+ ${DEPEND}
+ pam? ( >=sys-auth/pambase-20150213 )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.1.3-dots-in-usernames.patch"
+ "${FILESDIR}/${P}-revert-bin-merge.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+ #elibtoolize
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-account-tools-setuid
+ --enable-shared=no
+ --enable-static=yes
+ --with-btrfs
+ --without-group-name-max-length
+ --without-tcb
+ $(use_enable nls)
+ $(use_with acl)
+ $(use_with audit)
+ $(use_with bcrypt)
+ $(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 chsh shfn ; do
+ newpamd "${FILESDIR}"/pam.d-include/passwd ${x}
+ done
+
+ newpamd "${FILESDIR}"/pam.d-include/shadow-r1 groupmems
+
+ # 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."
+}