rwrap: Only warn if we can't open the dns hosts file
authorAndreas Schneider <asn@samba.org>
Tue, 18 Jul 2017 08:22:38 +0000 (10:22 +0200)
committerAndreas Schneider <asn@samba.org>
Tue, 28 Aug 2018 09:46:15 +0000 (11:46 +0200)
It is possible that it hasn't been created yet. At least in Samba when
we start the test environment.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
src/resolv_wrapper.c

index 8b748350db2b84cd56835a2697bd1e3b235c2a3e..2b496967a1d3bd6cebba7f4a838e4cf67998f2c7 100644 (file)
@@ -853,7 +853,7 @@ static int rwrap_get_record(const char *hostfile, unsigned recursion,
 
        fp = fopen(hostfile, "r");
        if (fp == NULL) {
-               RWRAP_LOG(RWRAP_LOG_ERROR,
+               RWRAP_LOG(RWRAP_LOG_WARN,
                          "Opening %s failed: %s",
                          hostfile, strerror(errno));
                return -1;