summaryrefslogtreecommitdiff
path: root/python/samba/dbchecker.py
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2019-04-29 11:59:50 +0200
committerStefan Metzmacher <metze@samba.org>2019-05-28 08:32:09 +0000
commit2ef79a4c1d695a3e498b142810a1317d85b9b6da (patch)
tree970449fa7fc8333ce438fa9e818aef8f6f63e50f /python/samba/dbchecker.py
parent15032ec6df1abbb53f1b1d5377aab369f83ae707 (diff)
downloadsamba-2ef79a4c1d695a3e498b142810a1317d85b9b6da.tar.gz
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 <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
Diffstat (limited to 'python/samba/dbchecker.py')
-rw-r--r--python/samba/dbchecker.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py
index a0500c6c578..04304b0b0dc 100644
--- a/python/samba/dbchecker.py
+++ b/python/samba/dbchecker.py
@@ -220,7 +220,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 = []