summaryrefslogtreecommitdiff
path: root/source3/lib/gencache.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2016-03-03 15:59:05 +0100
committerRalph Boehme <slow@samba.org>2016-03-07 17:58:16 +0100
commitf857f30236b1143be930ec56f233846d867bd3bd (patch)
tree960a85027d83ba47bc35a3ae0737d50c0c6063aa /source3/lib/gencache.c
parentb73235fb54a24d5ece5ac356741a57b18493d56b (diff)
downloadsamba-f857f30236b1143be930ec56f233846d867bd3bd.tar.gz
lib: skip deleted entries in gencache_iterate
"net cache flush" can give nasty error messages like Couldn't delete entry! key = IDMAP/UID2SID/12345 These happen when there's an already deleted entry in gencache_notrans.tdb, indicated by a 0 timeout. This happens if two gencache_del function calls have happened right after the other and a gencache_stabilize has not wiped them. In gencache_iterate, don't show these deleted entries Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/lib/gencache.c')
-rw-r--r--source3/lib/gencache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index c353aa65e8e..29fadecd740 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -894,6 +894,11 @@ static int gencache_iterate_blobs_fn(struct tdb_context *tdb, TDB_DATA key,
}
endptr += 1;
+ if (timeout == 0) {
+ /* delete marker */
+ goto done;
+ }
+
if (fnmatch(state->pattern, keystr, 0) != 0) {
goto done;
}