]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: increase loglevel when leases_db_del() with anything then NT_STATUS_NOT_FOUND
authorRalph Boehme <slow@samba.org>
Thu, 2 Jul 2020 12:09:15 +0000 (14:09 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 6 Aug 2020 13:32:38 +0000 (13:32 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14428

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit fbb8bbe1243eb2a0351dc2422929278f85a99e26)

source3/locking/locking.c

index 1220cb3a2be1656b2dc07e1979771190612bf008..2d9569809e44f666feac52d6383d1c56d6576542 100644 (file)
@@ -728,8 +728,13 @@ NTSTATUS remove_lease_if_stale(struct share_mode_lock *lck,
 
        status = leases_db_del(client_guid, lease_key, &d->id);
        if (!NT_STATUS_IS_OK(status)) {
-               DBG_DEBUG("leases_db_del failed: %s\n",
-                         nt_errstr(status));
+               int level = DBGLVL_DEBUG;
+
+               if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+                       level = DBGLVL_ERR;
+               }
+               DBG_PREFIX(level, ("leases_db_del failed: %s\n",
+                          nt_errstr(status)));
        }
        return status;
 }