Package: libc-bin
Version: 2.31-13+deb11u2
Severity: serious
Tags: patch

Dear libc-bin maintainers:

In Debian 11, the default /etc/nsswitch.conf file has now "files"
instead of the traditional "compat".

So far, so good. This is documented in Release Notes, and those who
need NIS may change /etc/nsswitch.conf if they need it.

But there is a problem: The postinst updates the file every time
it is detected that it matches *any* old default (via md5sum).

This is a functionality which was part of base-files in the past and
it was useful when there was a default /etc/nsswitch.conf which
would work for almost everybody. But this is not the case anymore,
because the default file is not good for those using NIS.

As a result, not only upgrading a Debian 10 system to Debian 11 makes
NIS to require an adjustment (i.e. putting compat again after postinst
modifies the file), but also each and every upgrade from Debian 11
point x to Debian 11 point x+1.

Patch attached. I hope this may be fixed for Debian 11.2.

Thanks.
--- a/debian/debhelper.in/libc-bin.postinst
+++ b/debian/debhelper.in/libc-bin.postinst
@@ -43,9 +43,10 @@ if [ "$1" = "configure" ] && [ "$2" = "" ] ; then
   install_from_default /usr/share/libc-bin/nsswitch.conf /etc/nsswitch.conf
 fi
 
-if [ "$1" = "configure" ] && [ "$2" != "" ]; then
-  update_to_current_default /usr/share/libc-bin/nsswitch.conf 
/etc/nsswitch.conf
-fi
+# Not ok to do this on a Debian 11 system anymore.
+# if [ "$1" = "configure" ] && [ "$2" != "" ]; then
+#   update_to_current_default /usr/share/libc-bin/nsswitch.conf 
/etc/nsswitch.conf
+# fi
 
 if [ "$1" = "triggered" ] || [ "$1" = "configure" ]; then
   ldconfig || ldconfig --verbose

Reply via email to