]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dbcheck: fallback to the default tombstoneLifetime of 180 days
authorStefan Metzmacher <metze@samba.org>
Mon, 29 Apr 2019 09:59:50 +0000 (11:59 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 8 Aug 2019 07:32:20 +0000 (07:32 +0000)
If a domain was provisioned by Windows 2000 this value is missing in the
database.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13967

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue May 28 08:32:10 UTC 2019 on sn-devel-184

(cherry picked from commit 2ef79a4c1d695a3e498b142810a1317d85b9b6da)

python/samba/dbchecker.py

index bd43667b99fdece7e6f1c8f4dadcd0411143519c..d9939a9293317c040ef32cd3c034be7678ea2e33 100644 (file)
@@ -199,7 +199,10 @@ class dbcheck(object):
                            scope=ldb.SCOPE_BASE,
                            expression="(objectClass=nTDSService)",
                            attrs=["tombstoneLifetime"])
-        self.tombstoneLifetime = int(res[0]["tombstoneLifetime"][0])
+        if "tombstoneLifetime" in res[0]:
+            self.tombstoneLifetime = int(res[0]["tombstoneLifetime"][0])
+        else:
+            self.tombstoneLifetime = 180
 
         self.compatibleFeatures = []
         self.requiredFeatures = []