1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

python: Correctly re-raise the LdbError if the embedded error is not ldb.ERR_UNWILLING_TO_PERFORM

The current code attempts a SAMR based password set for all errors,
we want to continue on LDAP or local LDB (in the restore case) unless
we really got the specific error given by Windows 2000.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14414

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: David Mulder <dmulder@suse.com>

Autobuild-User(master): Gary Lockyer <gary@samba.org>
Autobuild-Date(master): Tue Jun 23 05:07:00 UTC 2020 on sn-devel-184
This commit is contained in:
Andrew Bartlett
2020-06-18 08:39:09 +12:00
committed by Gary Lockyer
parent d701bc1518
commit 9513d02ef3

View File

@ -746,7 +746,7 @@ class DCJoinContext(object):
except ldb.LdbError as e2:
(num, _) = e2.args
if num != ldb.ERR_UNWILLING_TO_PERFORM:
pass
raise
ctx.net.set_password(account_name=ctx.samname,
domain_name=ctx.domain_name,
newpassword=ctx.acct_pass)