From: Steve Howells Date: Sat, 31 Jan 2015 16:09:17 +0000 (+0000) Subject: s4.2/fsmo.py: fixed fsmo transfer exception X-Git-Tag: samba-4.1.19~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1da224b43a534513b28e176d3b1926ffba06bcb4;p=thirdparty%2Fsamba.git s4.2/fsmo.py: fixed fsmo transfer exception In transfer_role() there is an duplicate call to samdb.modify() inside the if statement where the type of role is being determined (specifically for the naming fsmo). This call is unnecessary as after the if statement their is a correct call, with a try/catch block, used by all fsmo transfers that will handle errors - such as the DC with the fsmo role being offline. The call to samdb.modify() inside the if statement for naming fsmo has been removed. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10924 Signed-off-by: Steve Howells Reviewed-by: Stefan Metzmacher Reviewed-by: Marc Muehlfeld Reviewed-by: Andrew Bartlett (cherry picked from commit 9198246f91c02e33ed7a3580588557d0fb9f8811) --- diff --git a/python/samba/netcmd/fsmo.py b/python/samba/netcmd/fsmo.py index 02721f97707..1bc4a960d99 100644 --- a/python/samba/netcmd/fsmo.py +++ b/python/samba/netcmd/fsmo.py @@ -50,7 +50,6 @@ def transfer_role(outf, role, samdb): m["becomeDomainMaster"]= ldb.MessageElement( "1", ldb.FLAG_MOD_REPLACE, "becomeDomainMaster") - samdb.modify(m) elif role == "infrastructure": m["becomeInfrastructureMaster"]= ldb.MessageElement( "1", ldb.FLAG_MOD_REPLACE,