mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
netapi: add skeleton for NetRenameMachineInDomain.
Guenther
This commit is contained in:
@ -447,3 +447,21 @@ WERROR NetGetJoinableOUs_r(struct libnetapi_ctx *ctx,
|
||||
done:
|
||||
return werr;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
****************************************************************/
|
||||
|
||||
WERROR NetRenameMachineInDomain_r(struct libnetapi_ctx *ctx,
|
||||
struct NetRenameMachineInDomain *r)
|
||||
{
|
||||
return WERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
****************************************************************/
|
||||
|
||||
WERROR NetRenameMachineInDomain_l(struct libnetapi_ctx *ctx,
|
||||
struct NetRenameMachineInDomain *r)
|
||||
{
|
||||
LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetRenameMachineInDomain);
|
||||
}
|
||||
|
@ -214,6 +214,54 @@ NET_API_STATUS NetGetJoinableOUs(const char * server_name /* [in] [unique] */,
|
||||
return r.out.result;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
NetRenameMachineInDomain
|
||||
****************************************************************/
|
||||
|
||||
NET_API_STATUS NetRenameMachineInDomain(const char * server_name /* [in] */,
|
||||
const char * new_machine_name /* [in] */,
|
||||
const char * account /* [in] */,
|
||||
const char * password /* [in] */,
|
||||
uint32_t rename_options /* [in] */)
|
||||
{
|
||||
struct NetRenameMachineInDomain r;
|
||||
struct libnetapi_ctx *ctx = NULL;
|
||||
NET_API_STATUS status;
|
||||
WERROR werr;
|
||||
|
||||
status = libnetapi_getctx(&ctx);
|
||||
if (status != 0) {
|
||||
return status;
|
||||
}
|
||||
|
||||
/* In parameters */
|
||||
r.in.server_name = server_name;
|
||||
r.in.new_machine_name = new_machine_name;
|
||||
r.in.account = account;
|
||||
r.in.password = password;
|
||||
r.in.rename_options = rename_options;
|
||||
|
||||
/* Out parameters */
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
NDR_PRINT_IN_DEBUG(NetRenameMachineInDomain, &r);
|
||||
}
|
||||
|
||||
if (LIBNETAPI_LOCAL_SERVER(server_name)) {
|
||||
werr = NetRenameMachineInDomain_l(ctx, &r);
|
||||
} else {
|
||||
werr = NetRenameMachineInDomain_r(ctx, &r);
|
||||
}
|
||||
|
||||
r.out.result = W_ERROR_V(werr);
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
NDR_PRINT_OUT_DEBUG(NetRenameMachineInDomain, &r);
|
||||
}
|
||||
|
||||
return r.out.result;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
NetServerGetInfo
|
||||
****************************************************************/
|
||||
|
@ -35,6 +35,15 @@ WERROR NetGetJoinableOUs_r(struct libnetapi_ctx *ctx,
|
||||
struct NetGetJoinableOUs *r);
|
||||
WERROR NetGetJoinableOUs_l(struct libnetapi_ctx *ctx,
|
||||
struct NetGetJoinableOUs *r);
|
||||
NET_API_STATUS NetRenameMachineInDomain(const char * server_name /* [in] */,
|
||||
const char * new_machine_name /* [in] */,
|
||||
const char * account /* [in] */,
|
||||
const char * password /* [in] */,
|
||||
uint32_t rename_options /* [in] */);
|
||||
WERROR NetRenameMachineInDomain_r(struct libnetapi_ctx *ctx,
|
||||
struct NetRenameMachineInDomain *r);
|
||||
WERROR NetRenameMachineInDomain_l(struct libnetapi_ctx *ctx,
|
||||
struct NetRenameMachineInDomain *r);
|
||||
NET_API_STATUS NetServerGetInfo(const char * server_name /* [in] [unique] */,
|
||||
uint32_t level /* [in] */,
|
||||
uint8_t **buffer /* [out] [ref] */);
|
||||
|
Reference in New Issue
Block a user