Similar to bug #4831, nss_wins also clobbers the indent of daemons which have managed to invoke it.
Since the cifs-utils version of mount.cifs no longer does SMB host lookups, it now seems necessary to require nss_wins, so more users will be affected by this (assuming many users have hosts that require connecting with the server name, and not all have working DNS, as is common in non-AD environments).
The problem is triggered in any process which has had to invoke nss_wins at any time (e.g. DNS has not succeeded in resolving a host name), and subsequently logs. I have personally seen it in openvpn on my laptop, the Mandriva bug reporter sees it in ntpd since his resolv.conf points at the local named, which starts after ntpd.
The easiest way to reproduce this is as follows:
2)Ensure that nss_wins is invoked, e.g. put 'wins' before 'dns' in the hosts line in nsswitch.conf
3)Start a daemon that will invoke nss_wins (e.g. needs a dns lookup) and that logs to syslog. A good candidate here is ntpd (using say 'server pool.ntp.org').
You'll notice messages obviously from ntpd being tagged as from nss_wins, e.g.:
Jun 7 20:38:20 tiger nss_wins: frequency initialized -45.638 PPM from /var/lib/ntp/drift
With the attached patch, you get the expected behaviour:
Jun 7 20:39:39 tiger ntpd: frequency initialized -45.638 PPM from /var/lib/ntp/drift
I note that there seem to be bug reports on this same issue on other Linux distros:
as well as having been complained about on postfix and sendmail mailing lists (but, afaict, no upstream bug report yet).
A patch is available in Mandriva packaging svn:
Created attachment 5766 [details]
Current patch from mandriva packaging svn
Created attachment 5767 [details]
Slightly cleaner patch
Not sure if we want to invest in that code. nsswitch/wins.c has to die in its current form. It needs rewriting to use libwbclient and winbind. That's a LOT less code to take care of.
Well until that is done it wouldn't be bad to include patches that help fixing current bugs.
/me totally for moving all the code for nss_wins inside winbindd
Also reported in Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598313
Probably not important enough to deserve being fixe in 3.5 but would be nice to have in 3.6
Hi, I for one would be grateful if this bug was patched ASAP as it appears to be responsible for the crippling of some cross platform music players (Rhythmbox, Clementine) on various Linux distros.
I know that you have to have to develop the big picture stuff and have limited time and resources but this is one of those Linux situations where the application developer refers you to the distro package maintainer who then refers you to the the root package maintainer, and by the time the end user gets there they just give up on the package.
1. A number of Debian based distributions are affected.
2. A patch exists.
3. More than 1 popular music application is affected.
4. This is a single point from which a solution can be implemented.
5. This problem has existed for some time.
6. Many people would be happy.
I hope that I am posting in the right place and this is the bug that causes the crashes. If not, my apologies. I will be happy to help if there is anything I can do to help fix this bug.
This was fixed by 5ab1452436a5be5fbdf892343a4fc710f387eabf in master for Samba 4.4.
We now always query winbind, rather than run the main Samba code in a nss plugin, which is a bad idea for many reasons.