From 4dc265d6a0fe799006ac5be79114a145b3a114c5 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 17 Sep 2007 15:34:22 +0000 Subject: r25198: Change net_rpc_join_ok() to return NTSTATUS for better error propagation. Michael (This used to be commit 5a16da2185f07d1f48fabd93a7a6b8f2d6b91089) --- source3/utils/net_ads.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/utils/net_ads.c') 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; } -- cgit