libdns: Sync to upstream.
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 14 Jun 2018 04:10:57 +0000 (13:10 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Thu, 14 Jun 2018 04:10:57 +0000 (13:10 +0900)
* dirmngr/dns.c (dns_nssconf_loadfile): Handle exclamation mark.

--

Reverting local change, merge upstream's debug-tracing branch.
(commit 21281fc1b63bb74d51762b8e363c49b1a258783d)

Fixes-commit: d4c0187dd93163f12e9f953366adef81ecf526a6
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
dirmngr/dns.c

index 8e8b6db..13ef4b8 100644 (file)
@@ -6096,17 +6096,9 @@ int dns_nssconf_loadfile(struct dns_resolv_conf *resconf, FILE *fp) {
                        dns_anyconf_skip(" \t", fp);
 
                        if ('[' == dns_anyconf_peek(fp)) {
-                               dns_anyconf_skip("[ \t", fp);
+                               dns_anyconf_skip("[! \t", fp);
 
-                               for (;;) {
-                                       if ('!' == dns_anyconf_peek(fp)) {
-                                               dns_anyconf_skip("! \t", fp);
-                                               /* FIXME: negating statuses; currently not implemented */
-                                               dns_anyconf_skip("^#;]\n", fp); /* skip to end of criteria */
-                                               break;
-                                       }
-
-                                       if (!dns_anyconf_scan(&cf, "%w_", fp, &error)) break;
+                               while (dns_anyconf_scan(&cf, "%w_", fp, &error)) {
                                        dns_anyconf_skip("= \t", fp);
                                        if (!dns_anyconf_scan(&cf, "%w_", fp, &error)) {
                                                dns_anyconf_pop(&cf); /* discard status */