mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s3-libnetapi: add NetProvisionComputerAccount() boilerplate
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
This commit is contained in:
parent
b19a145e8f
commit
3f71d1fa1c
@ -589,3 +589,21 @@ WERROR NetRenameMachineInDomain_l(struct libnetapi_ctx *ctx,
|
||||
{
|
||||
LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetRenameMachineInDomain);
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
****************************************************************/
|
||||
|
||||
WERROR NetProvisionComputerAccount_r(struct libnetapi_ctx *ctx,
|
||||
struct NetProvisionComputerAccount *r)
|
||||
{
|
||||
return WERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
****************************************************************/
|
||||
|
||||
WERROR NetProvisionComputerAccount_l(struct libnetapi_ctx *ctx,
|
||||
struct NetProvisionComputerAccount *r)
|
||||
{
|
||||
return WERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
@ -287,6 +287,64 @@ NET_API_STATUS NetRenameMachineInDomain(const char * server_name /* [in] */,
|
||||
return (NET_API_STATUS)r.out.result;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
NetProvisionComputerAccount
|
||||
****************************************************************/
|
||||
|
||||
NET_API_STATUS NetProvisionComputerAccount(const char * domain /* [in] [ref] */,
|
||||
const char * machine_name /* [in] [ref] */,
|
||||
const char * machine_account_ou /* [in] [unique] */,
|
||||
const char * dcname /* [in] [unique] */,
|
||||
uint32_t options /* [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] */)
|
||||
{
|
||||
struct NetProvisionComputerAccount 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.domain = domain;
|
||||
r.in.machine_name = machine_name;
|
||||
r.in.machine_account_ou = machine_account_ou;
|
||||
r.in.dcname = dcname;
|
||||
r.in.options = options;
|
||||
r.in.provision_bin_data = provision_bin_data;
|
||||
r.in.provision_bin_data_size = provision_bin_data_size;
|
||||
r.in.provision_text_data = provision_text_data;
|
||||
|
||||
/* Out parameters */
|
||||
r.out.provision_bin_data = provision_bin_data;
|
||||
r.out.provision_bin_data_size = provision_bin_data_size;
|
||||
r.out.provision_text_data = provision_text_data;
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
NDR_PRINT_IN_DEBUG(NetProvisionComputerAccount, &r);
|
||||
}
|
||||
|
||||
werr = NetProvisionComputerAccount_l(ctx, &r);
|
||||
|
||||
r.out.result = W_ERROR_V(werr);
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
NDR_PRINT_OUT_DEBUG(NetProvisionComputerAccount, &r);
|
||||
}
|
||||
|
||||
TALLOC_FREE(frame);
|
||||
return (NET_API_STATUS)r.out.result;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
NetServerGetInfo
|
||||
****************************************************************/
|
||||
|
@ -63,6 +63,18 @@ WERROR NetRenameMachineInDomain_r(struct libnetapi_ctx *ctx,
|
||||
struct NetRenameMachineInDomain *r);
|
||||
WERROR NetRenameMachineInDomain_l(struct libnetapi_ctx *ctx,
|
||||
struct NetRenameMachineInDomain *r);
|
||||
NET_API_STATUS NetProvisionComputerAccount(const char * domain /* [in] [ref] */,
|
||||
const char * machine_name /* [in] [ref] */,
|
||||
const char * machine_account_ou /* [in] [unique] */,
|
||||
const char * dcname /* [in] [unique] */,
|
||||
uint32_t options /* [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] */);
|
||||
WERROR NetProvisionComputerAccount_r(struct libnetapi_ctx *ctx,
|
||||
struct NetProvisionComputerAccount *r);
|
||||
WERROR NetProvisionComputerAccount_l(struct libnetapi_ctx *ctx,
|
||||
struct NetProvisionComputerAccount *r);
|
||||
NET_API_STATUS NetServerGetInfo(const char * server_name /* [in] [unique] */,
|
||||
uint32_t level /* [in] */,
|
||||
uint8_t **buffer /* [out] [ref] */);
|
||||
|
Loading…
Reference in New Issue
Block a user