[Samba] sambaundoguididx fails with ldb transaction error

Andrew Bartlett abartlet at samba.org
Wed Jun 27 19:49:09 UTC 2018


On Wed, 2018-06-27 at 17:02 +0200, Torsten Fohrer via samba wrote:
> 
> Hi,
> 
> trying to revert 4.8.0/1 issues with sambaundoguididx and getting following:
> 
> Traceback (most recent call last):
>    File "/root/sambaundoguididx", line 66, in <module>
>      db.modify(modmsg)
> _ldb.LdbError: (32, 'ldb_wait from (null) with LDB_WAIT_ALL: No such  
> object (32)')
> A transaction is still active in ldb context [0x56060ac2a310] on  
> tdb:///var/lib/samba/private/sam.ldb

Can you try the attached patch?

Andrew Bartlett
-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba
-------------- next part --------------
From 779b4921b509e2ad3d8a980e17c7f5ea7106a435 Mon Sep 17 00:00:00 2001
From: Andrew Bartlett <abartlet at samba.org>
Date: Thu, 28 Jun 2018 07:47:37 +1200
Subject: [PATCH] sambaundoguidindex: Cope with the @INDEXLIST object not
 existing

Signed-off-by: Andrew Bartlett <abartlet at samba.org>
---
 source4/scripting/bin/sambaundoguididx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/source4/scripting/bin/sambaundoguididx b/source4/scripting/bin/sambaundoguididx
index 24a95e20d7f..66a7ad62e19 100755
--- a/source4/scripting/bin/sambaundoguididx
+++ b/source4/scripting/bin/sambaundoguididx
@@ -63,7 +63,12 @@ for part in partitions[0]['partition']:
 
     db = ldb.Ldb(url=tdbpath, options=["modules:"])
     db.transaction_start()
-    db.modify(modmsg)
+    try:
+        db.modify(modmsg)
+    except ldb.LdbError as e:
+        if e.args[0] != ldb.ERR_NO_SUCH_OBJECT:
+            raise
+
     dbs.append(db)
 
 for db in dbs:
-- 
2.14.4



More information about the samba mailing list