summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-08-29 17:55:28 +0200
committerMichael Adam <obnox@samba.org>2008-08-29 18:00:51 +0200
commitf9a0b1675e409a63797693f9d189e9728258ce73 (patch)
treeed548e032c749558ba8508aaf87e0f614ad56428 /source3
parent2d25608a5d5c2e38aba7f45ed96ffb271d25de66 (diff)
downloadsamba-f9a0b1675e409a63797693f9d189e9728258ce73.tar.gz
samba-f9a0b1675e409a63797693f9d189e9728258ce73.tar.bz2
samba-f9a0b1675e409a63797693f9d189e9728258ce73.zip
libnet_join: streamline logic of libnet_join_post_processing()
Michael (This used to be commit 81cc1af1e699e454fbb1d12636d002f845231006)
Diffstat (limited to 'source3')
-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);