libnet: fix join by creating keytab after changing the config.
authorMichael Adam <obnox@samba.org>
Fri, 29 Aug 2008 15:43:12 +0000 (17:43 +0200)
committerStefan Metzmacher <metze@samba.org>
Sat, 13 Dec 2008 11:27:50 +0000 (12:27 +0100)
Michael
(cherry picked from commit 96d1c780bf9524b929e6026776602a5288aea73d)
(cherry picked from commit 298e5b663b1d6b469d130041dbed151801a45d1e)

source/libnet/libnet_join.c

index 526a0bdfee7bceee2e73ef77ddd165f380f463ac..285504d4a2e2017f1d63b2ab4019f0c93985dd27 100644 (file)
@@ -1465,6 +1465,17 @@ static WERROR libnet_join_post_processing(TALLOC_CTX *mem_ctx,
 
        if (r->in.join_flags & WKSSVC_JOIN_FLAGS_JOIN_TYPE) {
                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 */
        }
 
        return WERR_OK;
@@ -1712,16 +1723,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: