From: Andrew Bartlett Date: Thu, 26 Nov 2009 21:10:54 +0000 (+1100) Subject: s4:upgradeprovision Rework update_machine_account_password() tranactions X-Git-Tag: samba-4.0.0alpha9~137 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8455a765164abf43794e10390978b22156e5c50a;p=thirdparty%2Fsamba.git s4:upgradeprovision Rework update_machine_account_password() tranactions This balances the transaction_begin() and transactin_prepare_commit() calls Andrew Bartlett --- diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision index 81cf3388dfc..9298c02672f 100755 --- a/source4/scripting/bin/upgradeprovision +++ b/source4/scripting/bin/upgradeprovision @@ -712,10 +712,12 @@ def update_machine_account_password(newpaths,paths,creds,session,names): machinepass=machinepass, key_version_number=kvno, secure_channel_type=secrets_msg[0]["secureChannelType"]) - sam_ldb.transaction_prepare_commit() - secrets_ldb.transaction_prepare_commit() - sam_ldb.transaction_commit() - secrets_ldb.transaction_commit() + sam_ldb.transaction_prepare_commit() + secrets_ldb.transaction_prepare_commit() + sam_ldb.transaction_commit() + secrets_ldb.transaction_commit() + else: + secrets_ldb.transaction_cancel() # From here start the big steps of the program # First get files paths