summaryrefslogtreecommitdiff
path: root/source3/libnet/libnet_join.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2008-09-03 11:52:54 -0400
committerSimo Sorce <idra@samba.org>2008-09-03 11:52:54 -0400
commitc5894e14771562bccd153a98610722632ca3956a (patch)
tree5ea00141df4ffa12bad3475fdafc525ffa4d92af /source3/libnet/libnet_join.c
parenta1de4e988d7780f687bb7ed2288faf3dfbb9da71 (diff)
parent84fca380f2040c53d20fff41972d2f4102183766 (diff)
downloadsamba-c5894e14771562bccd153a98610722632ca3956a.tar.gz
samba-c5894e14771562bccd153a98610722632ca3956a.tar.bz2
samba-c5894e14771562bccd153a98610722632ca3956a.zip
Merge branch 'v3-devel' of ssh://git.samba.org/data/git/samba into v3-devel
(This used to be commit 8e4dca3b9416d9b5e535bda5e4befc073bfc1641)
Diffstat (limited to 'source3/libnet/libnet_join.c')
-rw-r--r--source3/libnet/libnet_join.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index b7a15c558b..a39dee676f 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -1503,10 +1503,23 @@ 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;
+
+ ads_status = libnet_join_post_processing_ads(mem_ctx, r);
+ if (!ADS_ERR_OK(ads_status)) {
+ return WERR_GENERAL_FAILURE;
+ }
+ }
+#endif /* WITH_ADS */
+
libnet_join_add_dom_rids_to_builtins(r->out.domain_sid);
return WERR_OK;
@@ -1754,16 +1767,6 @@ static WERROR libnet_DomainJoin(TALLOC_CTX *mem_ctx,
goto done;
}
-#ifdef WITH_ADS
- if (r->out.domain_is_ad) {
- ads_status = libnet_join_post_processing_ads(mem_ctx, r);
- if (!ADS_ERR_OK(ads_status)) {
- werr = WERR_GENERAL_FAILURE;
- goto done;
- }
- }
-#endif /* WITH_ADS */
-
werr = WERR_OK;
done: