2006-09-19 02:20:37 +04:00
/*
* Unix SMB / CIFS implementation .
* client auto - generated by pidl . DO NOT MODIFY !
*/
# include "includes.h"
2008-12-16 18:32:18 +03:00
# include "../librpc/gen_ndr/cli_wkssvc.h"
2006-09-19 02:20:37 +04:00
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetWkstaGetInfo ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
uint32_t level /* [in] */ ,
union wkssvc_NetWkstaInfo * info /* [out] [ref,switch_is(level)] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
struct wkssvc_NetWkstaGetInfo r ;
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
r . in . server_name = server_name ;
r . in . level = level ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetWkstaGetInfo , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETWKSTAGETINFO ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetWkstaGetInfo , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
* info = * r . out . info ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetWkstaSetInfo ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
uint32_t level /* [in] */ ,
union wkssvc_NetWkstaInfo * info /* [in] [ref,switch_is(level)] */ ,
uint32_t * parm_error /* [in,out] [ref] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
struct wkssvc_NetWkstaSetInfo r ;
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
r . in . server_name = server_name ;
r . in . level = level ;
r . in . info = info ;
r . in . parm_error = parm_error ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetWkstaSetInfo , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETWKSTASETINFO ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetWkstaSetInfo , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
* parm_error = * r . out . parm_error ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
struct wkssvc_NetWkstaEnumUsersInfo * info /* [in,out] [ref] */ ,
uint32_t prefmaxlen /* [in] */ ,
uint32_t * entries_read /* [out] [ref] */ ,
uint32_t * resume_handle /* [in,out] [unique] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
struct wkssvc_NetWkstaEnumUsers r ;
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
r . in . server_name = server_name ;
2007-11-30 03:44:44 +03:00
r . in . info = info ;
2006-09-19 02:20:37 +04:00
r . in . prefmaxlen = prefmaxlen ;
2007-11-30 03:44:44 +03:00
r . in . resume_handle = resume_handle ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetWkstaEnumUsers , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETWKSTAENUMUSERS ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetWkstaEnumUsers , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2007-11-30 03:44:44 +03:00
* info = * r . out . info ;
* entries_read = * r . out . entries_read ;
if ( resume_handle & & r . out . resume_handle ) {
* resume_handle = * r . out . resume_handle ;
2007-01-16 18:42:03 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrWkstaUserGetInfo ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * unknown /* [in] [unique,charset(UTF16)] */ ,
uint32_t level /* [in] */ ,
union wkssvc_NetrWkstaUserInfo * info /* [out] [ref,switch_is(level)] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrWkstaUserGetInfo r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . unknown = unknown ;
r . in . level = level ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrWkstaUserGetInfo , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRWKSTAUSERGETINFO ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrWkstaUserGetInfo , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2007-11-30 03:44:44 +03:00
* info = * r . out . info ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrWkstaUserSetInfo ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * unknown /* [in] [unique,charset(UTF16)] */ ,
uint32_t level /* [in] */ ,
union wkssvc_NetrWkstaUserInfo * info /* [in] [ref,switch_is(level)] */ ,
uint32_t * parm_err /* [in,out] [unique] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrWkstaUserSetInfo r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . unknown = unknown ;
r . in . level = level ;
r . in . info = info ;
r . in . parm_err = parm_err ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrWkstaUserSetInfo , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRWKSTAUSERSETINFO ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrWkstaUserSetInfo , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2007-11-30 03:44:44 +03:00
if ( parm_err & & r . out . parm_err ) {
* parm_err = * r . out . parm_err ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
struct wkssvc_NetWkstaTransportInfo * info /* [in,out] [ref] */ ,
uint32_t max_buffer /* [in] */ ,
uint32_t * total_entries /* [out] [ref] */ ,
uint32_t * resume_handle /* [in,out] [unique] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
struct wkssvc_NetWkstaTransportEnum r ;
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
r . in . server_name = server_name ;
2007-11-30 03:44:44 +03:00
r . in . info = info ;
2006-09-19 02:20:37 +04:00
r . in . max_buffer = max_buffer ;
r . in . resume_handle = resume_handle ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetWkstaTransportEnum , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETWKSTATRANSPORTENUM ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetWkstaTransportEnum , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2007-11-30 03:44:44 +03:00
* info = * r . out . info ;
* total_entries = * r . out . total_entries ;
if ( resume_handle & & r . out . resume_handle ) {
* resume_handle = * r . out . resume_handle ;
2007-01-16 18:42:03 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrWkstaTransportAdd ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
uint32_t level /* [in] */ ,
struct wkssvc_NetWkstaTransportInfo0 * info0 /* [in] [ref] */ ,
uint32_t * parm_err /* [in,out] [unique] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrWkstaTransportAdd r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . level = level ;
r . in . info0 = info0 ;
r . in . parm_err = parm_err ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrWkstaTransportAdd , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRWKSTATRANSPORTADD ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrWkstaTransportAdd , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2007-11-30 03:44:44 +03:00
if ( parm_err & & r . out . parm_err ) {
* parm_err = * r . out . parm_err ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrWkstaTransportDel ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * transport_name /* [in] [unique,charset(UTF16)] */ ,
uint32_t unknown3 /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrWkstaTransportDel r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . transport_name = transport_name ;
r . in . unknown3 = unknown3 ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrWkstaTransportDel , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRWKSTATRANSPORTDEL ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrWkstaTransportDel , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrUseAdd ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
uint32_t level /* [in] */ ,
union wkssvc_NetrUseGetInfoCtr * ctr /* [in] [ref,switch_is(level)] */ ,
uint32_t * parm_err /* [in,out] [unique] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrUseAdd r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . level = level ;
r . in . ctr = ctr ;
r . in . parm_err = parm_err ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrUseAdd , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRUSEADD ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrUseAdd , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2007-11-30 03:44:44 +03:00
if ( parm_err & & r . out . parm_err ) {
* parm_err = * r . out . parm_err ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrUseGetInfo ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * use_name /* [in] [ref,charset(UTF16)] */ ,
uint32_t level /* [in] */ ,
union wkssvc_NetrUseGetInfoCtr * ctr /* [out] [ref,switch_is(level)] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrUseGetInfo r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . use_name = use_name ;
r . in . level = level ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrUseGetInfo , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRUSEGETINFO ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrUseGetInfo , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2007-11-30 03:44:44 +03:00
* ctr = * r . out . ctr ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrUseDel ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * use_name /* [in] [ref,charset(UTF16)] */ ,
uint32_t force_cond /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrUseDel r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . use_name = use_name ;
r . in . force_cond = force_cond ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrUseDel , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRUSEDEL ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrUseDel , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrUseEnum ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
struct wkssvc_NetrUseEnumInfo * info /* [in,out] [ref] */ ,
uint32_t prefmaxlen /* [in] */ ,
uint32_t * entries_read /* [out] [ref] */ ,
uint32_t * resume_handle /* [in,out] [unique] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrUseEnum r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . info = info ;
r . in . prefmaxlen = prefmaxlen ;
r . in . resume_handle = resume_handle ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrUseEnum , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRUSEENUM ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrUseEnum , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2007-11-30 03:44:44 +03:00
* info = * r . out . info ;
* entries_read = * r . out . entries_read ;
if ( resume_handle & & r . out . resume_handle ) {
* resume_handle = * r . out . resume_handle ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrMessageBufferSend ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * message_name /* [in] [ref,charset(UTF16)] */ ,
const char * message_sender_name /* [in] [unique,charset(UTF16)] */ ,
uint8_t * message_buffer /* [in] [ref,size_is(message_size)] */ ,
uint32_t message_size /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrMessageBufferSend r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . message_name = message_name ;
r . in . message_sender_name = message_sender_name ;
r . in . message_buffer = message_buffer ;
r . in . message_size = message_size ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrMessageBufferSend , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRMESSAGEBUFFERSEND ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrMessageBufferSend , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrWorkstationStatisticsGet ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * unknown2 /* [in] [unique,charset(UTF16)] */ ,
uint32_t unknown3 /* [in] */ ,
uint32_t unknown4 /* [in] */ ,
struct wkssvc_NetrWorkstationStatistics * * info /* [out] [ref] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrWorkstationStatisticsGet r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . unknown2 = unknown2 ;
r . in . unknown3 = unknown3 ;
r . in . unknown4 = unknown4 ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrWorkstationStatisticsGet , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrWorkstationStatisticsGet , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2007-11-30 03:44:44 +03:00
* info = * r . out . info ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrLogonDomainNameAdd ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * domain_name /* [in] [ref,charset(UTF16)] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrLogonDomainNameAdd r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . domain_name = domain_name ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrLogonDomainNameAdd , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRLOGONDOMAINNAMEADD ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrLogonDomainNameAdd , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrLogonDomainNameDel ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * domain_name /* [in] [ref,charset(UTF16)] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrLogonDomainNameDel r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . domain_name = domain_name ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrLogonDomainNameDel , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrLogonDomainNameDel , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrJoinDomain ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * domain_name /* [in] [ref,charset(UTF16)] */ ,
const char * account_ou /* [in] [unique,charset(UTF16)] */ ,
const char * Account /* [in] [unique,charset(UTF16)] */ ,
const char * password /* [in] [unique,charset(UTF16)] */ ,
uint32_t join_flags /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrJoinDomain r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . domain_name = domain_name ;
r . in . account_ou = account_ou ;
r . in . Account = Account ;
r . in . password = password ;
r . in . join_flags = join_flags ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrJoinDomain , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRJOINDOMAIN ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrJoinDomain , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrUnjoinDomain ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * Account /* [in] [unique,charset(UTF16)] */ ,
const char * password /* [in] [unique,charset(UTF16)] */ ,
uint32_t unjoin_flags /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrUnjoinDomain r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . Account = Account ;
r . in . password = password ;
r . in . unjoin_flags = unjoin_flags ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrUnjoinDomain , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRUNJOINDOMAIN ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrUnjoinDomain , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * NewMachineName /* [in] [unique,charset(UTF16)] */ ,
const char * Account /* [in] [unique,charset(UTF16)] */ ,
const char * password /* [in] [unique,charset(UTF16)] */ ,
uint32_t RenameOptions /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrRenameMachineInDomain r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . NewMachineName = NewMachineName ;
r . in . Account = Account ;
r . in . password = password ;
r . in . RenameOptions = RenameOptions ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrRenameMachineInDomain , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrRenameMachineInDomain , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrValidateName ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * name /* [in] [ref,charset(UTF16)] */ ,
const char * Account /* [in] [unique,charset(UTF16)] */ ,
const char * Password /* [in] [unique,charset(UTF16)] */ ,
enum wkssvc_NetValidateNameType name_type /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrValidateName r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . name = name ;
r . in . Account = Account ;
r . in . Password = Password ;
r . in . name_type = name_type ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrValidateName , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRVALIDATENAME ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrValidateName , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrGetJoinInformation ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * * name_buffer /* [in,out] [ref,charset(UTF16)] */ ,
enum wkssvc_NetJoinStatus * name_type /* [out] [ref] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrGetJoinInformation r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . name_buffer = name_buffer ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrGetJoinInformation , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRGETJOININFORMATION ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrGetJoinInformation , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2007-11-30 03:44:44 +03:00
* name_buffer = * r . out . name_buffer ;
* name_type = * r . out . name_type ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrGetJoinableOus ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * domain_name /* [in] [ref,charset(UTF16)] */ ,
const char * Account /* [in] [unique,charset(UTF16)] */ ,
const char * unknown /* [in] [unique,charset(UTF16)] */ ,
uint32_t * num_ous /* [in,out] [ref] */ ,
const char * * * ous /* [out] [ref,charset(UTF16),size_is(,*num_ous)] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrGetJoinableOus r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . domain_name = domain_name ;
r . in . Account = Account ;
r . in . unknown = unknown ;
r . in . num_ous = num_ous ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrGetJoinableOus , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRGETJOINABLEOUS ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrGetJoinableOus , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2007-11-30 03:44:44 +03:00
* num_ous = * r . out . num_ous ;
2008-02-07 11:49:59 +03:00
* ous = * r . out . ous ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrJoinDomain2 ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * domain_name /* [in] [ref,charset(UTF16)] */ ,
const char * account_ou /* [in] [unique,charset(UTF16)] */ ,
const char * admin_account /* [in] [unique,charset(UTF16)] */ ,
struct wkssvc_PasswordBuffer * encrypted_password /* [in] [unique] */ ,
uint32_t join_flags /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
struct wkssvc_NetrJoinDomain2 r ;
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
r . in . server_name = server_name ;
r . in . domain_name = domain_name ;
2007-11-30 03:44:44 +03:00
r . in . account_ou = account_ou ;
2006-09-19 02:20:37 +04:00
r . in . admin_account = admin_account ;
r . in . encrypted_password = encrypted_password ;
r . in . join_flags = join_flags ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrJoinDomain2 , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRJOINDOMAIN2 ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrJoinDomain2 , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrUnjoinDomain2 ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * account /* [in] [unique,charset(UTF16)] */ ,
struct wkssvc_PasswordBuffer * encrypted_password /* [in] [unique] */ ,
uint32_t unjoin_flags /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
struct wkssvc_NetrUnjoinDomain2 r ;
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
r . in . server_name = server_name ;
r . in . account = account ;
r . in . encrypted_password = encrypted_password ;
r . in . unjoin_flags = unjoin_flags ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrUnjoinDomain2 , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRUNJOINDOMAIN2 ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrUnjoinDomain2 , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain2 ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * NewMachineName /* [in] [unique,charset(UTF16)] */ ,
const char * Account /* [in] [unique,charset(UTF16)] */ ,
struct wkssvc_PasswordBuffer * EncryptedPassword /* [in] [unique] */ ,
uint32_t RenameOptions /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
struct wkssvc_NetrRenameMachineInDomain2 r ;
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
r . in . server_name = server_name ;
r . in . NewMachineName = NewMachineName ;
r . in . Account = Account ;
r . in . EncryptedPassword = EncryptedPassword ;
r . in . RenameOptions = RenameOptions ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrRenameMachineInDomain2 , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2 ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrRenameMachineInDomain2 , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrValidateName2 ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * name /* [in] [ref,charset(UTF16)] */ ,
const char * Account /* [in] [unique,charset(UTF16)] */ ,
struct wkssvc_PasswordBuffer * EncryptedPassword /* [in] [unique] */ ,
enum wkssvc_NetValidateNameType name_type /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrValidateName2 r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . name = name ;
r . in . Account = Account ;
r . in . EncryptedPassword = EncryptedPassword ;
r . in . name_type = name_type ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrValidateName2 , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRVALIDATENAME2 ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrValidateName2 , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrGetJoinableOus2 ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * domain_name /* [in] [ref,charset(UTF16)] */ ,
const char * Account /* [in] [unique,charset(UTF16)] */ ,
struct wkssvc_PasswordBuffer * EncryptedPassword /* [in] [unique] */ ,
uint32_t * num_ous /* [in,out] [ref] */ ,
const char * * * ous /* [out] [ref,charset(UTF16),size_is(,*num_ous)] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrGetJoinableOus2 r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . domain_name = domain_name ;
r . in . Account = Account ;
r . in . EncryptedPassword = EncryptedPassword ;
r . in . num_ous = num_ous ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrGetJoinableOus2 , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRGETJOINABLEOUS2 ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrGetJoinableOus2 , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2007-11-30 03:44:44 +03:00
* num_ous = * r . out . num_ous ;
2008-02-07 11:49:59 +03:00
* ous = * r . out . ous ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrAddAlternateComputerName ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * NewAlternateMachineName /* [in] [unique,charset(UTF16)] */ ,
const char * Account /* [in] [unique,charset(UTF16)] */ ,
struct wkssvc_PasswordBuffer * EncryptedPassword /* [in] [unique] */ ,
uint32_t Reserved /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
struct wkssvc_NetrAddAlternateComputerName r ;
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
r . in . server_name = server_name ;
r . in . NewAlternateMachineName = NewAlternateMachineName ;
r . in . Account = Account ;
r . in . EncryptedPassword = EncryptedPassword ;
r . in . Reserved = Reserved ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrAddAlternateComputerName , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrAddAlternateComputerName , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrRemoveAlternateComputerName ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * AlternateMachineNameToRemove /* [in] [unique,charset(UTF16)] */ ,
const char * Account /* [in] [unique,charset(UTF16)] */ ,
struct wkssvc_PasswordBuffer * EncryptedPassword /* [in] [unique] */ ,
uint32_t Reserved /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
struct wkssvc_NetrRemoveAlternateComputerName r ;
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
r . in . server_name = server_name ;
r . in . AlternateMachineNameToRemove = AlternateMachineNameToRemove ;
r . in . Account = Account ;
r . in . EncryptedPassword = EncryptedPassword ;
r . in . Reserved = Reserved ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrRemoveAlternateComputerName , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 02:39:15 +04:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrRemoveAlternateComputerName , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrSetPrimaryComputername ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
const char * primary_name /* [in] [unique,charset(UTF16)] */ ,
const char * Account /* [in] [unique,charset(UTF16)] */ ,
struct wkssvc_PasswordBuffer * EncryptedPassword /* [in] [unique] */ ,
uint32_t Reserved /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrSetPrimaryComputername r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . primary_name = primary_name ;
r . in . Account = Account ;
r . in . EncryptedPassword = EncryptedPassword ;
r . in . Reserved = Reserved ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrSetPrimaryComputername , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrSetPrimaryComputername , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_wkssvc_NetrEnumerateComputerNames ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
const char * server_name /* [in] [unique,charset(UTF16)] */ ,
enum wkssvc_ComputerNameType name_type /* [in] */ ,
uint32_t Reserved /* [in] */ ,
struct wkssvc_ComputerNamesCtr * * ctr /* [out] [ref] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-19 02:20:37 +04:00
{
2007-11-30 03:44:44 +03:00
struct wkssvc_NetrEnumerateComputerNames r ;
2006-09-19 02:20:37 +04:00
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* In parameters */
2007-11-30 03:44:44 +03:00
r . in . server_name = server_name ;
r . in . name_type = name_type ;
r . in . Reserved = Reserved ;
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrEnumerateComputerNames , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
& ndr_table_wkssvc ,
NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2008-01-09 13:59:11 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-11-30 03:44:44 +03:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrEnumerateComputerNames , & r ) ;
2008-01-09 13:59:11 +03:00
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return variables */
2007-11-30 03:44:44 +03:00
* ctr = * r . out . ctr ;
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-19 02:20:37 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}