1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3-libnet: fix libnet_unjoin_remove_machine_acct() when called without ads struct.

Guenther
This commit is contained in:
Günther Deschner 2009-06-22 22:35:58 +02:00
parent 4aade2768b
commit 36a8abce4f

View File

@ -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);