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 12:18:21 +0000 (12:18 +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>
(backported from commit fbb8bbe1243eb2a0351dc2422929278f85a99e26)
[slow@samba.org: remove_lease_if_stale() does not exist in 4.11]

source3/locking/locking.c

index 8fa1237d6ad85d5881ce937b62b63f161c689e87..5272a3dc829dd94ad33d8f4cb8e7fa07595b643f 100644 (file)
@@ -704,13 +704,16 @@ static void remove_share_mode_lease(struct share_mode_data *d,
        }
 
        {
+               int level = DBGLVL_DEBUG;
                NTSTATUS status;
 
                status = leases_db_del(&e->client_guid,
                                       &e->lease_key,
                                       &d->id);
-
-               DEBUG(10, ("%s: leases_db_del returned %s\n", __func__,
+               if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+                       level = DBGLVL_ERR;
+               }
+               DBG_PREFIX(level, ("leases_db_del failed: %s\n",
                           nt_errstr(status)));
        }
 }