summaryrefslogtreecommitdiff
path: root/source3/utils/net_ads.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/net_ads.c')
-rw-r--r--source3/utils/net_ads.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 5646a0c8a8..4a43306666 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1600,8 +1600,12 @@ int net_ads_join(int argc, const char **argv)
/* Verify that everything is ok */
- if ( net_rpc_join_ok(short_domain_name, ads->config.ldap_server_name, &ads->ldap.ip) != 0 ) {
- d_fprintf(stderr, "Failed to verify membership in domain!\n");
+ nt_status = net_rpc_join_ok(short_domain_name,
+ ads->config.ldap_server_name, &ads->ldap.ip);
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ d_fprintf(stderr,
+ "Failed to verify membership in domain: %s!\n",
+ nt_errstr(nt_status));
goto fail;
}