summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libnet/libnet_join.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index b34b4872f4..a39dee676f 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -1503,20 +1503,22 @@ static WERROR libnet_join_post_processing(TALLOC_CTX *mem_ctx,
return werr;
}
- if (r->in.join_flags & WKSSVC_JOIN_FLAGS_JOIN_TYPE) {
- saf_store(r->in.domain_name, r->in.dc_name);
+ if (!(r->in.join_flags & WKSSVC_JOIN_FLAGS_JOIN_TYPE)) {
+ return WERR_OK;
+ }
+
+ saf_store(r->in.domain_name, r->in.dc_name);
#ifdef WITH_ADS
- if (r->out.domain_is_ad) {
- ADS_STATUS ads_status;
+ if (r->out.domain_is_ad) {
+ ADS_STATUS ads_status;
- ads_status = libnet_join_post_processing_ads(mem_ctx, r);
- if (!ADS_ERR_OK(ads_status)) {
- return WERR_GENERAL_FAILURE;
- }
+ ads_status = libnet_join_post_processing_ads(mem_ctx, r);
+ if (!ADS_ERR_OK(ads_status)) {
+ return WERR_GENERAL_FAILURE;
}
-#endif /* WITH_ADS */
}
+#endif /* WITH_ADS */
libnet_join_add_dom_rids_to_builtins(r->out.domain_sid);