]> 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 13:12:52 +0000 (13:12 +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.

(cherry picked from commit bc891e749fe361caeb7d7ca5208ebf1e1f4f02ac)

bin/named/server.c

index b4c2d324c281ca25a93451f82aab2295b55d57ff..305a7d36b371d5c5692d05836da1d2fe81c8a9f8 100644 (file)
@@ -8407,7 +8407,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)
                {