Bug 14880 - dbcheck: Performs expired tombstone check despite Option set to False
Summary: dbcheck: Performs expired tombstone check despite Option set to False
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.14.8
Hardware: All Linux
: P5 normal (vote)
Target Milestone: 4.15
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-22 05:21 UTC by G. Heinrich
Modified: 2021-10-22 05:21 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description G. Heinrich 2021-10-22 05:21:07 UTC
In dbchecker.py the flag to check for expired tombstones is by default set to false in __init__ (check_expired_tombstones=False (Line 59) and later self.check_expired_tombstones = check_expired_tombstones (Line 106)). 
In dbcheck.py the Option is also set to false by default (Option("--selftest-check-expired-tombstones", dest = "selftest_check_expired_tombstones", default=False ... (Line 82)).

Back to dbchecker.py the code in lines 1814 to 1819 is the following:
    def is_expired_tombstone(self, dn, repl_val):
        if self.check_expired_tombstones:
            return False

If I read this correctly, the tombstone check is not performed when the boolean is set to true but is performed when the boolean is set to false. So the check in line 1815 should be the exact opposite (if not self.check_expired_tombstones: return false).