From: Stefan Metzmacher Date: Mon, 29 Apr 2019 09:59:50 +0000 (+0200) Subject: dbcheck: fallback to the default tombstoneLifetime of 180 days X-Git-Tag: samba-4.9.12~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fd604b1657503a9d3d494f50f40a566314c08e6;p=thirdparty%2Fsamba.git dbcheck: fallback to the default tombstoneLifetime of 180 days 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 Reviewed-by: Ralph Boehme Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Tue May 28 08:32:10 UTC 2019 on sn-devel-184 (cherry picked from commit 2ef79a4c1d695a3e498b142810a1317d85b9b6da) --- diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py index bd43667b99f..d9939a92933 100644 --- a/python/samba/dbchecker.py +++ b/python/samba/dbchecker.py @@ -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 = []