summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2017-11-18 19:34:12 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2017-11-18 19:34:30 +0100
commit468d6930bad211f5744c1e41d99c496923bae677 (patch)
tree060c4e47b8e3c07d27b2c42dad18d557a973127c /sys-libs/glibc
parentsys-libs/glibc: Forward-port safety checks to 9999 (diff)
downloadgentoo-468d6930bad211f5744c1e41d99c496923bae677.tar.gz
gentoo-468d6930bad211f5744c1e41d99c496923bae677.tar.bz2
gentoo-468d6930bad211f5744c1e41d99c496923bae677.zip
sys-libs/glibc: Output fat warning if NIS is used and sys-auth/libnss-nis is not installed
Closes: https://bugs.gentoo.org/637946 Package-Manager: Portage-2.3.14, Repoman-2.3.6
Diffstat (limited to 'sys-libs/glibc')
-rw-r--r--sys-libs/glibc/glibc-2.26-r3.ebuild15
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild15
2 files changed, 30 insertions, 0 deletions
diff --git a/sys-libs/glibc/glibc-2.26-r3.ebuild b/sys-libs/glibc/glibc-2.26-r3.ebuild
index d66113063e92..13aa5ad8bfb6 100644
--- a/sys-libs/glibc/glibc-2.26-r3.ebuild
+++ b/sys-libs/glibc/glibc-2.26-r3.ebuild
@@ -800,4 +800,19 @@ pkg_postinst() {
fi
locale-gen -j $(makeopts_jobs) --config "${locale_list}"
fi
+
+ # Check for sanity of /etc/nsswitch.conf, take 2
+ if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
+ local entry
+ for entry in passwd group shadow; do
+ if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
+ ewarn ""
+ ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been"
+ ewarn "removed from glibc and is now provided by the package"
+ ewarn " sys-auth/libnss-nis"
+ ewarn "Install it now to keep your NIS setup working."
+ ewarn ""
+ fi
+ done
+ fi
}
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index 2be9e1d411d4..732d684a7281 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -808,4 +808,19 @@ pkg_postinst() {
use compile-locales || run_locale_gen "${EROOT}"
fi
+
+ # Check for sanity of /etc/nsswitch.conf, take 2
+ if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
+ local entry
+ for entry in passwd group shadow; do
+ if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
+ ewarn ""
+ ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been"
+ ewarn "removed from glibc and is now provided by the package"
+ ewarn " sys-auth/libnss-nis"
+ ewarn "Install it now to keep your NIS setup working."
+ ewarn ""
+ fi
+ done
+ fi
}