summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2017-11-18 19:17:01 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2017-11-18 19:34:30 +0100
commit25fbe4af0a468fb23a53190fc590031928b54948 (patch)
tree70fe77163bb2f7bba5b2bd89febfc2178bb65204 /sys-libs/glibc/glibc-9999.ebuild
parentdev-libs/libisoburn: stable 1.4.8-r1 for ia64, bug #638002 (diff)
downloadgentoo-25fbe4af0a468fb23a53190fc590031928b54948.tar.gz
gentoo-25fbe4af0a468fb23a53190fc590031928b54948.tar.bz2
gentoo-25fbe4af0a468fb23a53190fc590031928b54948.zip
sys-libs/glibc: Forward-port safety checks to 9999
Commits 5d8d827255a5f831247dc838879c4582b46210c4 66b10cf352d69a96824cba2c2a2bdea8e8094d7b Package-Manager: Portage-2.3.14, Repoman-2.3.6
Diffstat (limited to 'sys-libs/glibc/glibc-9999.ebuild')
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index 25412dcedbb8..2be9e1d411d4 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_)