s3:libnet_join: call do_JoinConfig() after we did remote changes on the server
authorStefan Metzmacher <metze@samba.org>
Thu, 18 May 2017 13:52:59 +0000 (15:52 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 27 Jun 2017 14:57:44 +0000 (16:57 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12782

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/libnet/libnet_join.c

index 7493ac8..5e4a0d3 100644 (file)
@@ -2211,12 +2211,12 @@ static WERROR libnet_join_post_processing(TALLOC_CTX *mem_ctx,
                return r->out.result;
        }
 
-       werr = do_JoinConfig(r);
-       if (!W_ERROR_IS_OK(werr)) {
-               return werr;
-       }
-
        if (!(r->in.join_flags & WKSSVC_JOIN_FLAGS_JOIN_TYPE)) {
+               werr = do_JoinConfig(r);
+               if (!W_ERROR_IS_OK(werr)) {
+                       return werr;
+               }
+
                return WERR_OK;
        }
 
@@ -2237,6 +2237,11 @@ static WERROR libnet_join_post_processing(TALLOC_CTX *mem_ctx,
                saf_join_store(r->out.dns_domain_name, r->in.dc_name);
        }
 
+       werr = do_JoinConfig(r);
+       if (!W_ERROR_IS_OK(werr)) {
+               return werr;
+       }
+
 #ifdef HAVE_ADS
        if (r->out.domain_is_ad &&
            !(r->in.join_flags & WKSSVC_JOIN_FLAGS_JOIN_UNSECURE)) {