Parsing of negation statements in nsswitch.conf currently not implemented

Gaetan Bisson bisson at archlinux.org
Thu Jan 19 10:51:55 CET 2017


Hi,

We've been having issues over at Arch Linux with the new libdns code.
Our /etc/nsswitch.conf contains the following line:

	hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname

And it turns out dirmngr fails to parse the negation statement (the bang
in !UNAVAIL). This results in gnupg not being able to resolve any name.

Looking at dirmngr/dns.c it was unclear to me how to properly handle
such negations. The dns_anyconf_scan calls used in dns_nssconf_loadfile
do not allow to store a negation bit easily...

In the meantime, I wrote the attached patch which ignores those
statements altogether. It makes libdns work as expected for us.

Cheers.

-- 
Gaetan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: negation.patch
Type: text/x-diff
Size: 771 bytes
Desc: not available
URL: </pipermail/attachments/20170118/d83902b6/attachment.patch>


More information about the Gnupg-devel mailing list