s3:libnetapi: Add NetComposeOfflineDomainJoin() to API.
authorSamuel Cabrero <scabrero@samba.org>
Thu, 31 Aug 2023 10:44:26 +0000 (12:44 +0200)
committerJule Anger <janger@samba.org>
Wed, 29 Nov 2023 14:51:11 +0000 (14:51 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13577

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 7cabbec2eaf5aefd3751c635c12556eca590f506)

source3/lib/netapi/netapi.h

index df465aef51b1fecad956d46b3da32ffe2183e407..660a7766bd67a9628b231ecd585882d62549d543 100644 (file)
@@ -1673,6 +1673,49 @@ NET_API_STATUS NetRequestOfflineDomainJoin(uint8_t *provision_bin_data /* [in] [
                                           uint32_t options /* [in] */,
                                           const char * windows_path /* [in] [unique] */);
 
+/************************************************************//**
+ *
+ * NetComposeOfflineDomainJoin
+ *
+ * @brief Compose an offline domain join blob
+ *
+ * Intended to be used by external applications who provision the computer
+ * acconut on their own.
+ *
+ *
+ * @param[in] dns_domain_name The domain DNS name
+ * @param[in] netbios_domain_name The domain NETBIOS name
+ * @param[in] domain_sid The domain SID
+ * @param[in] domain_guid The domain GUID
+ * @param[in] forest_name The forest name
+ * @param[in] machine_account_name The machine account name
+ * @param[in] machine_account_password The machine account password
+ * @param[in] dc_name The domain controller name used to provision the account
+ * @param[in] dc_address The domain controller address used to provision the account
+ * @param[in] domain_is_ad True if the domain is AD
+ * @param[in,out] compose_bin_data The generated binary buffer
+ * @param[in,out] compose_bin_data_size The generated binary buffer size
+ * @param[in,out] compose_text_data The generated text data blob
+ * @return NET_API_STATUS
+ *
+ * example join/compose_offline_domain_join.c
+ *
+ ***************************************************************/
+
+NET_API_STATUS NetComposeOfflineDomainJoin(const char *dns_domain_name /* [in] [ref] */,
+                                          const char *netbios_domain_name /* [in] [ref] */,
+                                          struct domsid *domain_sid /* [in] [ref] */,
+                                          struct GUID *domain_guid /* [in] [ref] */,
+                                          const char *forest_name /* [in] [ref] */,
+                                          const char *machine_account_name /* [in] [ref] */,
+                                          const char *machine_account_password /* [in] [ref] */,
+                                          const char *dc_name /* [in] [unique] */,
+                                          const char *dc_address /* [in] [unique] */,
+                                          int domain_is_ad /* [in] */,
+                                          uint8_t **provision_bin_data /* [in,out] [unique] */,
+                                          uint32_t *provision_bin_data_size /* [in,out] [unique] */,
+                                          const char * *provision_text_data /* [in,out] [unique] */);
+
 /************************************************************//**
  *
  * NetServerGetInfo