]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix an invalid condition check when detecting a lock-file change
authorAram Sargsyan <aram@isc.org>
Thu, 26 Oct 2023 12:24:17 +0000 (12:24 +0000)
committerAram Sargsyan <aram@isc.org>
Thu, 26 Oct 2023 12:34:07 +0000 (12:34 +0000)
It is obvious that the '!cfg_obj_asstring(obj)' check should be
'cfg_obj_asstring(obj)' instead, because it is an AND logic chain
which further uses 'obj' as a string.

Fix the error.

bin/named/server.c

index 61d782d9dd4140b4d4bd337e17fa06be640fc410..a6b2c2be9b16bb5be53e5893e82024d0cbb05d08 100644 (file)
@@ -8151,7 +8151,7 @@ check_lockfile(named_server_t *server, const cfg_obj_t *config,
        (void)named_config_get(maps, "lock-file", &obj);
 
        if (!first_time) {
-               if (obj != NULL && !cfg_obj_isstring(obj) &&
+               if (obj != NULL && cfg_obj_isstring(obj) &&
                    server->lockfile != NULL &&
                    strcmp(cfg_obj_asstring(obj), server->lockfile) != 0)
                {