summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-28 11:23:36 +0100
committerGünther Deschner <gd@samba.org>2008-02-28 11:38:01 +0100
commit4ba6c04d0a1f229cd75de9e3ea6be07653b34b51 (patch)
treea3ddb1e9fe8768c779923f192adb178ee8ef2023
parent09886976f6895dc9e906e62c54408076cd509304 (diff)
downloadsamba-4ba6c04d0a1f229cd75de9e3ea6be07653b34b51.tar.gz
samba-4ba6c04d0a1f229cd75de9e3ea6be07653b34b51.tar.bz2
samba-4ba6c04d0a1f229cd75de9e3ea6be07653b34b51.zip
Delete affinity cache entries while unjoining with libnetunjoin.
Guenther (This used to be commit 0315b8e53dca9a836d6bc2282fb1192f40545601)
-rw-r--r--source3/libnet/libnet_join.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 40372611c2..c690cfc0dc 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -1142,7 +1142,7 @@ static WERROR do_JoinConfig(struct libnet_JoinCtx *r)
/****************************************************************
****************************************************************/
-static WERROR do_UnjoinConfig(struct libnet_UnjoinCtx *r)
+static WERROR libnet_unjoin_config(struct libnet_UnjoinCtx *r)
{
WERROR werr;
@@ -1509,6 +1509,17 @@ static WERROR libnet_unjoin_pre_processing(TALLOC_CTX *mem_ctx,
return WERR_OK;
}
+/****************************************************************
+****************************************************************/
+
+static WERROR libnet_unjoin_post_processing(TALLOC_CTX *mem_ctx,
+ struct libnet_UnjoinCtx *r)
+{
+ saf_delete(r->out.netbios_domain_name);
+ saf_delete(r->out.dns_domain_name);
+
+ return libnet_unjoin_config(r);
+}
/****************************************************************
****************************************************************/
@@ -1530,11 +1541,12 @@ WERROR libnet_Unjoin(TALLOC_CTX *mem_ctx,
if (r->in.unjoin_flags & WKSSVC_JOIN_FLAGS_JOIN_TYPE) {
werr = libnet_DomainUnjoin(mem_ctx, r);
if (!W_ERROR_IS_OK(werr)) {
+ libnet_unjoin_config(r);
goto done;
}
}
- werr = do_UnjoinConfig(r);
+ werr = libnet_unjoin_post_processing(mem_ctx, r);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}