rwrap: Turn some errors into warnings
authorAndreas Schneider <asn@samba.org>
Mon, 24 Aug 2020 14:44:58 +0000 (16:44 +0200)
committerAndreas Schneider <asn@samba.org>
Mon, 24 Aug 2020 14:46:13 +0000 (16:46 +0200)
This fixes some Samba tests which redirect stderr to stdout and then get
more messages than expected.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
src/resolv_wrapper.c

index 0d3f34ce5910e3d81dc960774355336ece3d78bd..b69a55a80e0c437e1ed2b2e7c5c6480a64d57bf6 100644 (file)
@@ -1844,7 +1844,7 @@ static int rwrap_parse_resolv_conf(struct __res_state *state,
 
        fp = fopen(resolv_conf, "r");
        if (fp == NULL) {
-               RWRAP_LOG(RWRAP_LOG_ERROR,
+               RWRAP_LOG(RWRAP_LOG_WARN,
                          "Opening %s failed: %s",
                          resolv_conf, strerror(errno));
                return -1;
@@ -1930,7 +1930,7 @@ static int rwrap_parse_resolv_conf(struct __res_state *state,
        fclose(fp);
 
        if (nserv == 0) {
-               RWRAP_LOG(RWRAP_LOG_ERROR,
+               RWRAP_LOG(RWRAP_LOG_WARN,
                          "No usable nameservers found in %s",
                          resolv_conf);
                errno = ESRCH;