diff options
author | Günther Deschner <gd@samba.org> | 2009-06-22 22:35:58 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-06-22 22:35:58 +0200 |
commit | 36a8abce4f737102b5a2acf3c0e221391079831d (patch) | |
tree | bda42f0f7359c52247235d80a307097b1f913a90 /source3/libnet | |
parent | 4aade2768b40b805b50578ec6fa99fe57525b147 (diff) | |
download | samba-36a8abce4f737102b5a2acf3c0e221391079831d.tar.gz samba-36a8abce4f737102b5a2acf3c0e221391079831d.tar.bz2 samba-36a8abce4f737102b5a2acf3c0e221391079831d.zip |
s3-libnet: fix libnet_unjoin_remove_machine_acct() when called without ads struct.
Guenther
Diffstat (limited to 'source3/libnet')
-rw-r--r-- | source3/libnet/libnet_join.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index a96fd8c500..86d2a02fd3 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -264,7 +264,13 @@ static ADS_STATUS libnet_unjoin_remove_machine_acct(TALLOC_CTX *mem_ctx, ADS_STATUS status; if (!r->in.ads) { - return libnet_unjoin_connect_ads(mem_ctx, r); + status = libnet_unjoin_connect_ads(mem_ctx, r); + if (!ADS_ERR_OK(status)) { + libnet_unjoin_set_error_string(mem_ctx, r, + "failed to connect to AD: %s", + ads_errstr(status)); + return status; + } } status = ads_leave_realm(r->in.ads, r->in.machine_name); |