[PATCH] registry: Don't leave dangling transactions

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Oct 8 07:43:09 MDT 2014


Hi!

Review&push would be appreciated.

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 2db33dab5fe7d5fcce3a62047426bea0f95643db Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Wed, 8 Oct 2014 15:39:28 +0200
Subject: [PATCH] registry: Don't leave dangling transactions

When a createkey fails due to access denied, we need to do a
transaction_cancel. Otherwise the lock on the db will stay around.

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/registry/reg_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index 47a717b..d1c70ec 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -634,7 +634,7 @@ WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
 				 key->token))
 	{
 		err = WERR_ACCESS_DENIED;
-		goto done;
+		goto trans_done;
 	}
 
 	/*
-- 
1.8.1.2



More information about the samba-technical mailing list