summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-17 11:09:59 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-17 11:30:07 +1100
commita82bc073e2e7dd5eef13c64ad219fa1179df8aa7 (patch)
treebf8884b03ffc6292a216dda7996b27ad514acb4b
parent3f9c97dbc55826867d1978e09d69d365cff94643 (diff)
downloadsamba-a82bc073e2e7dd5eef13c64ad219fa1179df8aa7.tar.gz
samba-a82bc073e2e7dd5eef13c64ad219fa1179df8aa7.tar.bz2
samba-a82bc073e2e7dd5eef13c64ad219fa1179df8aa7.zip
s4-join: show a reasonable error on DsAddEntry() failing
DsAddEntry() gives errors in a reply container
-rw-r--r--source4/scripting/python/samba/join.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/join.py b/source4/scripting/python/samba/join.py
index 23ec845ea6..091b58c430 100644
--- a/source4/scripting/python/samba/join.py
+++ b/source4/scripting/python/samba/join.py
@@ -294,7 +294,12 @@ class dc_join:
req2.first_object = first_object
(level, ctr) = ctx.drsuapi.DsAddEntry(ctx.drsuapi_handle, 2, req2)
-
+ if ctr.err_ver != 1:
+ raise RuntimeError("expected err_ver 1, got %u" % ctr.err_ver)
+ if ctr.err_data.status != (0, 'WERR_OK'):
+ print("DsAddEntry failed with status %s info %s" % (ctr.err_data.status,
+ ctr.err_data.info.extended_err))
+ raise RuntimeError("DsAddEntry failed")
def join_add_objects(ctx):
'''add the various objects needed for the join'''