commit: 25fbe4af0a468fb23a53190fc590031928b54948
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 18 18:17:01 2017 +0000
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Nov 18 18:34:30 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25fbe4af
sys-libs/glibc: Forward-port safety checks to 9999
Commits
5d8d827255a5f831247dc838879c4582b46210c4
66b10cf352d69a96824cba2c2a2bdea8e8094d7b
Package-Manager: Portage-2.3.14, Repoman-2.3.6
sys-libs/glibc/glibc-9999.ebuild | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index 25412dcedbb..2be9e1d411d 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -196,6 +196,21 @@ pkg_pretend() {
die "old __guard detected"
fi
fi
+
+ # Check for sanity of /etc/nsswitch.conf
+ if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then
+ local entry
+ for entry in passwd group shadow; do
+ if ! egrep -q "^[ \t]*${entry}:.*files"
"${EROOT}"/etc/nsswitch.conf; then
+ eerror "Your ${EROOT}/etc/nsswitch.conf is out
of date."
+ eerror "Please make sure you have 'files'
entries for"
+ eerror "'passwd:', 'group:' and 'shadow:'
databases."
+ eerror "For more details see:"
+ eerror "
https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26"
+ die "nsswitch.conf has no 'files' provider in
'${entry}'."
+ fi
+ done
+ fi
}
# todo: shouldn't most of these checks be called also in src_configure again?
# (since consistency is not guaranteed between pkg_ and src_)