diff options
author | Günther Deschner <gd@samba.org> | 2008-01-11 14:50:10 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-01-11 15:10:21 +0100 |
commit | 55b642c31213d0fb8a22d14759a948f2e2d8aa45 (patch) | |
tree | 43321f22a295643f6e5a2c81c4441e6cfb9b9e96 | |
parent | 7a87256cd1ac7962da9a5e37945ee5dd26a18c98 (diff) | |
download | samba-55b642c31213d0fb8a22d14759a948f2e2d8aa45.tar.gz samba-55b642c31213d0fb8a22d14759a948f2e2d8aa45.tar.bz2 samba-55b642c31213d0fb8a22d14759a948f2e2d8aa45.zip |
Set error string when ads_leave_realm() has failed in libnetjoin.
Guenther
(This used to be commit 01690f85bc7d052d4c57181d74aef27d1776169c)
-rw-r--r-- | source3/libnet/libnet_join.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index 2c60f99d79..46ebadbaee 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -202,7 +202,15 @@ static ADS_STATUS libnet_unjoin_remove_machine_acct(TALLOC_CTX *mem_ctx, } } - return ads_leave_realm(r->in.ads, r->in.machine_name); + status = ads_leave_realm(r->in.ads, r->in.machine_name); + if (!ADS_ERR_OK(status)) { + libnet_unjoin_set_error_string(mem_ctx, r, + "failed to leave realm: %s\n", + ads_errstr(status)); + return status; + } + + return ADS_SUCCESS; } /**************************************************************** |