s3-libnetapi: add NetRequestOfflineDomainJoin() boilerplate.
authorGünther Deschner <gd@samba.org>
Mon, 8 Feb 2021 12:59:40 +0000 (13:59 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 14 Jul 2021 16:49:30 +0000 (16:49 +0000)
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
source3/lib/netapi/joindomain.c
source3/lib/netapi/libnetapi.c
source3/lib/netapi/libnetapi.h

index dc873c194add558d37b1c4f706b40aae96c3e2e8..3ba9cce4f64b00934a87abfbb0a5b63c191bf4a4 100644 (file)
@@ -786,3 +786,21 @@ WERROR NetProvisionComputerAccount_l(struct libnetapi_ctx *ctx,
 
        return werr;
 }
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetRequestOfflineDomainJoin_r(struct libnetapi_ctx *ctx,
+                                    struct NetRequestOfflineDomainJoin *r)
+{
+       return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetRequestOfflineDomainJoin_l(struct libnetapi_ctx *ctx,
+                                    struct NetRequestOfflineDomainJoin *r)
+{
+       return WERR_NOT_SUPPORTED;
+}
index 210366e62786a6ce6ee944df93399ea2419cc18b..2fd97bba75bed105cb1cfc364919a4e5fd3eec02 100644 (file)
@@ -345,6 +345,53 @@ NET_API_STATUS NetProvisionComputerAccount(const char * domain /* [in] [ref] */,
        return (NET_API_STATUS)r.out.result;
 }
 
+/****************************************************************
+ NetRequestOfflineDomainJoin
+****************************************************************/
+
+NET_API_STATUS NetRequestOfflineDomainJoin(uint8_t *provision_bin_data /* [in] [unique] */,
+                                          uint32_t provision_bin_data_size /* [in] */,
+                                          uint32_t options /* [in] */,
+                                          const char * windows_path /* [in] [unique] */)
+{
+       struct NetRequestOfflineDomainJoin r;
+       struct libnetapi_ctx *ctx = NULL;
+       NET_API_STATUS status;
+       WERROR werr;
+       TALLOC_CTX *frame = talloc_stackframe();
+
+       ZERO_STRUCT(r);
+
+       status = libnetapi_getctx(&ctx);
+       if (status != 0) {
+               TALLOC_FREE(frame);
+               return status;
+       }
+
+       /* In parameters */
+       r.in.provision_bin_data = provision_bin_data;
+       r.in.provision_bin_data_size = provision_bin_data_size;
+       r.in.options = options;
+       r.in.windows_path = windows_path;
+
+       /* Out parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(NetRequestOfflineDomainJoin, &r);
+       }
+
+       werr = NetRequestOfflineDomainJoin_l(ctx, &r);
+
+       r.out.result = W_ERROR_V(werr);
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(NetRequestOfflineDomainJoin, &r);
+       }
+
+       TALLOC_FREE(frame);
+       return (NET_API_STATUS)r.out.result;
+}
+
 /****************************************************************
  NetServerGetInfo
 ****************************************************************/
index eab9cae3013642739f7003ff12123a8c046fdaae..d217656845d7ca7b2567191bf2153f72ac1527e1 100644 (file)
@@ -75,6 +75,14 @@ WERROR NetProvisionComputerAccount_r(struct libnetapi_ctx *ctx,
                                     struct NetProvisionComputerAccount *r);
 WERROR NetProvisionComputerAccount_l(struct libnetapi_ctx *ctx,
                                     struct NetProvisionComputerAccount *r);
+NET_API_STATUS NetRequestOfflineDomainJoin(uint8_t *provision_bin_data /* [in] [unique] */,
+                                          uint32_t provision_bin_data_size /* [in] */,
+                                          uint32_t options /* [in] */,
+                                          const char * windows_path /* [in] [unique] */);
+WERROR NetRequestOfflineDomainJoin_r(struct libnetapi_ctx *ctx,
+                                    struct NetRequestOfflineDomainJoin *r);
+WERROR NetRequestOfflineDomainJoin_l(struct libnetapi_ctx *ctx,
+                                    struct NetRequestOfflineDomainJoin *r);
 NET_API_STATUS NetServerGetInfo(const char * server_name /* [in] [unique] */,
                                uint32_t level /* [in] */,
                                uint8_t **buffer /* [out] [ref] */);