summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-28 11:19:57 +0100
committerGünther Deschner <gd@samba.org>2008-02-28 11:38:01 +0100
commit09886976f6895dc9e906e62c54408076cd509304 (patch)
tree70a0b1144775b699aa1768e792b8192dfc243652 /source3
parent1d807c3c29eaffb512279d3180f088cfcfe980f8 (diff)
downloadsamba-09886976f6895dc9e906e62c54408076cd509304.tar.gz
samba-09886976f6895dc9e906e62c54408076cd509304.tar.bz2
samba-09886976f6895dc9e906e62c54408076cd509304.zip
Fill in machine account manipulation flags while unjoining in libnetunjoin.
Guenther (This used to be commit 23ae67158e6506199318025e3dd5fd5c0b099548)
Diffstat (limited to 'source3')
-rw-r--r--source3/libnet/libnet_join.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 30b38372f1..40372611c2 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -1464,6 +1464,8 @@ static WERROR libnet_DomainUnjoin(TALLOC_CTX *mem_ctx,
return ntstatus_to_werror(status);
}
+ r->out.disabled_machine_account = true;
+
#ifdef WITH_ADS
if (r->in.unjoin_flags & WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE) {
ADS_STATUS ads_status;
@@ -1473,6 +1475,12 @@ static WERROR libnet_DomainUnjoin(TALLOC_CTX *mem_ctx,
libnet_unjoin_set_error_string(mem_ctx, r,
"failed to remove machine account from AD: %s",
ads_errstr(ads_status));
+ } else {
+ r->out.deleted_machine_account = true;
+ /* dirty hack */
+ r->out.dns_domain_name = talloc_strdup(mem_ctx,
+ r->in.ads->server.realm);
+ W_ERROR_HAVE_NO_MEMORY(r->out.dns_domain_name);
}
}
#endif /* WITH_ADS */