2006-09-18 22:20:37 +00:00
/*
* Unix SMB / CIFS implementation .
* server auto - generated by pidl . DO NOT MODIFY !
*/
# include "includes.h"
# include "librpc/gen_ndr/srv_wkssvc.h"
static BOOL api_wkssvc_NetWkstaGetInfo ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct wkssvc_NetWkstaGetInfo r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_wkssvc_NetWkstaGetInfo " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_wkssvc_NetWkstaGetInfo ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( wkssvc_NetWkstaGetInfo , & r ) ;
2006-09-19 22:22:57 +00:00
ZERO_STRUCT ( r . out ) ;
2007-01-16 17:48:59 +00:00
r . out . info = talloc_zero ( mem_ctx , union wkssvc_NetWkstaInfo ) ;
2006-09-18 22:20:37 +00:00
if ( r . out . info = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2007-01-18 10:18:59 +00:00
r . out . result = _wkssvc_NetWkstaGetInfo ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( wkssvc_NetWkstaGetInfo , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_wkssvc_NetWkstaGetInfo ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_wkssvc_NetWkstaSetInfo ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct wkssvc_NetWkstaSetInfo r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_wkssvc_NetWkstaSetInfo " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_wkssvc_NetWkstaSetInfo ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( wkssvc_NetWkstaSetInfo , & r ) ;
2006-09-19 22:22:57 +00:00
ZERO_STRUCT ( r . out ) ;
2006-09-18 22:20:37 +00:00
r . out . parm_error = r . in . parm_error ;
2007-01-18 10:18:59 +00:00
r . out . result = _wkssvc_NetWkstaSetInfo ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( wkssvc_NetWkstaSetInfo , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_wkssvc_NetWkstaSetInfo ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_wkssvc_NetWkstaEnumUsers ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct wkssvc_NetWkstaEnumUsers r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_wkssvc_NetWkstaEnumUsers " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_wkssvc_NetWkstaEnumUsers ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( wkssvc_NetWkstaEnumUsers , & r ) ;
2006-09-19 22:22:57 +00:00
ZERO_STRUCT ( r . out ) ;
2006-09-18 22:20:37 +00:00
r . out . users = r . in . users ;
2007-01-16 17:48:59 +00:00
r . out . entriesread = talloc_zero ( mem_ctx , uint32_t ) ;
2006-09-18 22:20:37 +00:00
if ( r . out . entriesread = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2007-01-16 17:48:59 +00:00
r . out . totalentries = talloc_zero ( mem_ctx , uint32_t ) ;
2006-09-18 22:20:37 +00:00
if ( r . out . totalentries = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
r . out . resumehandle = r . in . resumehandle ;
2007-01-18 10:18:59 +00:00
r . out . result = _wkssvc_NetWkstaEnumUsers ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( wkssvc_NetWkstaEnumUsers , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_wkssvc_NetWkstaEnumUsers ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRWKSTAUSERGETINFO ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRWKSTAUSERGETINFO r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRWKSTAUSERGETINFO " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRWKSTAUSERGETINFO ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRWKSTAUSERGETINFO , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRWKSTAUSERGETINFO ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRWKSTAUSERGETINFO , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRWKSTAUSERGETINFO ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRWKSTAUSERSETINFO ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRWKSTAUSERSETINFO r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRWKSTAUSERSETINFO " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRWKSTAUSERSETINFO ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRWKSTAUSERSETINFO , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRWKSTAUSERSETINFO ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRWKSTAUSERSETINFO , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRWKSTAUSERSETINFO ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_wkssvc_NetWkstaTransportEnum ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct wkssvc_NetWkstaTransportEnum r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_wkssvc_NetWkstaTransportEnum " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_wkssvc_NetWkstaTransportEnum ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( wkssvc_NetWkstaTransportEnum , & r ) ;
2006-09-19 22:22:57 +00:00
ZERO_STRUCT ( r . out ) ;
2006-09-18 22:20:37 +00:00
r . out . level = r . in . level ;
r . out . ctr = r . in . ctr ;
2007-01-16 17:48:59 +00:00
r . out . totalentries = talloc_zero ( mem_ctx , uint32_t ) ;
2006-09-18 22:20:37 +00:00
if ( r . out . totalentries = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
r . out . resume_handle = r . in . resume_handle ;
2007-01-18 10:18:59 +00:00
r . out . result = _wkssvc_NetWkstaTransportEnum ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( wkssvc_NetWkstaTransportEnum , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_wkssvc_NetWkstaTransportEnum ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRWKSTATRANSPORTADD ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRWKSTATRANSPORTADD r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRWKSTATRANSPORTADD " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRWKSTATRANSPORTADD ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRWKSTATRANSPORTADD , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRWKSTATRANSPORTADD ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRWKSTATRANSPORTADD , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRWKSTATRANSPORTADD ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRWKSTATRANSPORTDEL ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRWKSTATRANSPORTDEL r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRWKSTATRANSPORTDEL " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRWKSTATRANSPORTDEL ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRWKSTATRANSPORTDEL , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRWKSTATRANSPORTDEL ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRWKSTATRANSPORTDEL , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRWKSTATRANSPORTDEL ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRUSEADD ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRUSEADD r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRUSEADD " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRUSEADD ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRUSEADD , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRUSEADD ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRUSEADD , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRUSEADD ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRUSEGETINFO ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRUSEGETINFO r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRUSEGETINFO " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRUSEGETINFO ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRUSEGETINFO , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRUSEGETINFO ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRUSEGETINFO , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRUSEGETINFO ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRUSEDEL ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRUSEDEL r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRUSEDEL " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRUSEDEL ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRUSEDEL , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRUSEDEL ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRUSEDEL , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRUSEDEL ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRUSEENUM ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRUSEENUM r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRUSEENUM " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRUSEENUM ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRUSEENUM , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRUSEENUM ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRUSEENUM , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRUSEENUM ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRMESSAGEBUFFERSEND ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRMESSAGEBUFFERSEND r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRMESSAGEBUFFERSEND " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRMESSAGEBUFFERSEND ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRMESSAGEBUFFERSEND , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRMESSAGEBUFFERSEND ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRMESSAGEBUFFERSEND , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRMESSAGEBUFFERSEND ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRWORKSTATIONSTATISTICSGET ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRWORKSTATIONSTATISTICSGET r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRWORKSTATIONSTATISTICSGET " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRWORKSTATIONSTATISTICSGET ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRWORKSTATIONSTATISTICSGET , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRWORKSTATIONSTATISTICSGET ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRWORKSTATIONSTATISTICSGET , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRWORKSTATIONSTATISTICSGET ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRLOGONDOMAINNAMEADD ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRLOGONDOMAINNAMEADD r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRLOGONDOMAINNAMEADD " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEADD ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRLOGONDOMAINNAMEADD , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRLOGONDOMAINNAMEADD ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRLOGONDOMAINNAMEADD , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRLOGONDOMAINNAMEADD ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRLOGONDOMAINNAMEDEL ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRLOGONDOMAINNAMEDEL r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRLOGONDOMAINNAMEDEL " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEDEL ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRLOGONDOMAINNAMEDEL , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRLOGONDOMAINNAMEDEL ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRLOGONDOMAINNAMEDEL , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRLOGONDOMAINNAMEDEL ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRJOINDOMAIN ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRJOINDOMAIN r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRJOINDOMAIN " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRJOINDOMAIN ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRJOINDOMAIN , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRJOINDOMAIN ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRJOINDOMAIN , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRJOINDOMAIN ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRUNJOINDOMAIN ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRUNJOINDOMAIN r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRUNJOINDOMAIN " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRUNJOINDOMAIN ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRUNJOINDOMAIN , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRUNJOINDOMAIN ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRUNJOINDOMAIN , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRUNJOINDOMAIN ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRRENAMEMACHINEINDOMAIN ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRRENAMEMACHINEINDOMAIN r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRRENAMEMACHINEINDOMAIN " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRRENAMEMACHINEINDOMAIN ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRRENAMEMACHINEINDOMAIN , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRRENAMEMACHINEINDOMAIN ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRRENAMEMACHINEINDOMAIN , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRRENAMEMACHINEINDOMAIN ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRVALIDATENAME ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRVALIDATENAME r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRVALIDATENAME " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRVALIDATENAME ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRVALIDATENAME , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRVALIDATENAME ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRVALIDATENAME , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRVALIDATENAME ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRGETJOININFORMATION ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRGETJOININFORMATION r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRGETJOININFORMATION " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRGETJOININFORMATION ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRGETJOININFORMATION , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRGETJOININFORMATION ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRGETJOININFORMATION , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRGETJOININFORMATION ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRGETJOINABLEOUS ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRGETJOINABLEOUS r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRGETJOINABLEOUS " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRGETJOINABLEOUS ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRGETJOINABLEOUS , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRGETJOINABLEOUS ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRGETJOINABLEOUS , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRGETJOINABLEOUS ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_wkssvc_NetrJoinDomain2 ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct wkssvc_NetrJoinDomain2 r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_wkssvc_NetrJoinDomain2 " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_wkssvc_NetrJoinDomain2 ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( wkssvc_NetrJoinDomain2 , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _wkssvc_NetrJoinDomain2 ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrJoinDomain2 , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_wkssvc_NetrJoinDomain2 ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_wkssvc_NetrUnjoinDomain2 ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct wkssvc_NetrUnjoinDomain2 r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_wkssvc_NetrUnjoinDomain2 " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_wkssvc_NetrUnjoinDomain2 ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( wkssvc_NetrUnjoinDomain2 , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _wkssvc_NetrUnjoinDomain2 ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrUnjoinDomain2 , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_wkssvc_NetrUnjoinDomain2 ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_wkssvc_NetrRenameMachineInDomain2 ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct wkssvc_NetrRenameMachineInDomain2 r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_wkssvc_NetrRenameMachineInDomain2 " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_wkssvc_NetrRenameMachineInDomain2 ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( wkssvc_NetrRenameMachineInDomain2 , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _wkssvc_NetrRenameMachineInDomain2 ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrRenameMachineInDomain2 , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_wkssvc_NetrRenameMachineInDomain2 ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRVALIDATENAME2 ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRVALIDATENAME2 r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRVALIDATENAME2 " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRVALIDATENAME2 ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRVALIDATENAME2 , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRVALIDATENAME2 ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRVALIDATENAME2 , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRVALIDATENAME2 ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRGETJOINABLEOUS2 ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRGETJOINABLEOUS2 r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRGETJOINABLEOUS2 " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRGETJOINABLEOUS2 ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRGETJOINABLEOUS2 , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRGETJOINABLEOUS2 ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRGETJOINABLEOUS2 , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRGETJOINABLEOUS2 ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_wkssvc_NetrAddAlternateComputerName ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct wkssvc_NetrAddAlternateComputerName r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_wkssvc_NetrAddAlternateComputerName " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_wkssvc_NetrAddAlternateComputerName ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( wkssvc_NetrAddAlternateComputerName , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _wkssvc_NetrAddAlternateComputerName ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrAddAlternateComputerName , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_wkssvc_NetrAddAlternateComputerName ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_wkssvc_NetrRemoveAlternateComputerName ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct wkssvc_NetrRemoveAlternateComputerName r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_wkssvc_NetrRemoveAlternateComputerName " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_wkssvc_NetrRemoveAlternateComputerName ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( wkssvc_NetrRemoveAlternateComputerName , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _wkssvc_NetrRemoveAlternateComputerName ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrRemoveAlternateComputerName , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_wkssvc_NetrRemoveAlternateComputerName ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRSETPRIMARYCOMPUTERNAME ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRSETPRIMARYCOMPUTERNAME , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRSETPRIMARYCOMPUTERNAME ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRSETPRIMARYCOMPUTERNAME , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRSETPRIMARYCOMPUTERNAME ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_WKSSVC_NETRENUMERATECOMPUTERNAMES ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct WKSSVC_NETRENUMERATECOMPUTERNAMES r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_WKSSVC_NETRENUMERATECOMPUTERNAMES " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-18 22:20:37 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-18 22:20:37 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_WKSSVC_NETRENUMERATECOMPUTERNAMES ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( WKSSVC_NETRENUMERATECOMPUTERNAMES , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _WKSSVC_NETRENUMERATECOMPUTERNAMES ( p , & r ) ;
2006-09-18 22:20:37 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( WKSSVC_NETRENUMERATECOMPUTERNAMES , & r ) ;
2006-09-18 22:20:37 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_WKSSVC_NETRENUMERATECOMPUTERNAMES ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-18 22:20:37 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
/* Tables */
static struct api_struct api_wkssvc_cmds [ ] =
{
2007-08-19 22:10:11 +00:00
{ " WKSSVC_NETWKSTAGETINFO " , NDR_WKSSVC_NETWKSTAGETINFO , api_wkssvc_NetWkstaGetInfo } ,
{ " WKSSVC_NETWKSTASETINFO " , NDR_WKSSVC_NETWKSTASETINFO , api_wkssvc_NetWkstaSetInfo } ,
{ " WKSSVC_NETWKSTAENUMUSERS " , NDR_WKSSVC_NETWKSTAENUMUSERS , api_wkssvc_NetWkstaEnumUsers } ,
{ " WKSSVC_NETRWKSTAUSERGETINFO " , NDR_WKSSVC_NETRWKSTAUSERGETINFO , api_WKSSVC_NETRWKSTAUSERGETINFO } ,
{ " WKSSVC_NETRWKSTAUSERSETINFO " , NDR_WKSSVC_NETRWKSTAUSERSETINFO , api_WKSSVC_NETRWKSTAUSERSETINFO } ,
{ " WKSSVC_NETWKSTATRANSPORTENUM " , NDR_WKSSVC_NETWKSTATRANSPORTENUM , api_wkssvc_NetWkstaTransportEnum } ,
{ " WKSSVC_NETRWKSTATRANSPORTADD " , NDR_WKSSVC_NETRWKSTATRANSPORTADD , api_WKSSVC_NETRWKSTATRANSPORTADD } ,
{ " WKSSVC_NETRWKSTATRANSPORTDEL " , NDR_WKSSVC_NETRWKSTATRANSPORTDEL , api_WKSSVC_NETRWKSTATRANSPORTDEL } ,
{ " WKSSVC_NETRUSEADD " , NDR_WKSSVC_NETRUSEADD , api_WKSSVC_NETRUSEADD } ,
{ " WKSSVC_NETRUSEGETINFO " , NDR_WKSSVC_NETRUSEGETINFO , api_WKSSVC_NETRUSEGETINFO } ,
{ " WKSSVC_NETRUSEDEL " , NDR_WKSSVC_NETRUSEDEL , api_WKSSVC_NETRUSEDEL } ,
{ " WKSSVC_NETRUSEENUM " , NDR_WKSSVC_NETRUSEENUM , api_WKSSVC_NETRUSEENUM } ,
{ " WKSSVC_NETRMESSAGEBUFFERSEND " , NDR_WKSSVC_NETRMESSAGEBUFFERSEND , api_WKSSVC_NETRMESSAGEBUFFERSEND } ,
{ " WKSSVC_NETRWORKSTATIONSTATISTICSGET " , NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET , api_WKSSVC_NETRWORKSTATIONSTATISTICSGET } ,
{ " WKSSVC_NETRLOGONDOMAINNAMEADD " , NDR_WKSSVC_NETRLOGONDOMAINNAMEADD , api_WKSSVC_NETRLOGONDOMAINNAMEADD } ,
{ " WKSSVC_NETRLOGONDOMAINNAMEDEL " , NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL , api_WKSSVC_NETRLOGONDOMAINNAMEDEL } ,
{ " WKSSVC_NETRJOINDOMAIN " , NDR_WKSSVC_NETRJOINDOMAIN , api_WKSSVC_NETRJOINDOMAIN } ,
{ " WKSSVC_NETRUNJOINDOMAIN " , NDR_WKSSVC_NETRUNJOINDOMAIN , api_WKSSVC_NETRUNJOINDOMAIN } ,
{ " WKSSVC_NETRRENAMEMACHINEINDOMAIN " , NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN , api_WKSSVC_NETRRENAMEMACHINEINDOMAIN } ,
{ " WKSSVC_NETRVALIDATENAME " , NDR_WKSSVC_NETRVALIDATENAME , api_WKSSVC_NETRVALIDATENAME } ,
{ " WKSSVC_NETRGETJOININFORMATION " , NDR_WKSSVC_NETRGETJOININFORMATION , api_WKSSVC_NETRGETJOININFORMATION } ,
{ " WKSSVC_NETRGETJOINABLEOUS " , NDR_WKSSVC_NETRGETJOINABLEOUS , api_WKSSVC_NETRGETJOINABLEOUS } ,
{ " WKSSVC_NETRJOINDOMAIN2 " , NDR_WKSSVC_NETRJOINDOMAIN2 , api_wkssvc_NetrJoinDomain2 } ,
{ " WKSSVC_NETRUNJOINDOMAIN2 " , NDR_WKSSVC_NETRUNJOINDOMAIN2 , api_wkssvc_NetrUnjoinDomain2 } ,
{ " WKSSVC_NETRRENAMEMACHINEINDOMAIN2 " , NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2 , api_wkssvc_NetrRenameMachineInDomain2 } ,
{ " WKSSVC_NETRVALIDATENAME2 " , NDR_WKSSVC_NETRVALIDATENAME2 , api_WKSSVC_NETRVALIDATENAME2 } ,
{ " WKSSVC_NETRGETJOINABLEOUS2 " , NDR_WKSSVC_NETRGETJOINABLEOUS2 , api_WKSSVC_NETRGETJOINABLEOUS2 } ,
{ " WKSSVC_NETRADDALTERNATECOMPUTERNAME " , NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME , api_wkssvc_NetrAddAlternateComputerName } ,
{ " WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME " , NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME , api_wkssvc_NetrRemoveAlternateComputerName } ,
{ " WKSSVC_NETRSETPRIMARYCOMPUTERNAME " , NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME , api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME } ,
{ " WKSSVC_NETRENUMERATECOMPUTERNAMES " , NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES , api_WKSSVC_NETRENUMERATECOMPUTERNAMES } ,
2006-09-18 22:20:37 +00:00
} ;
void wkssvc_get_pipe_fns ( struct api_struct * * fns , int * n_fns )
{
* fns = api_wkssvc_cmds ;
* n_fns = sizeof ( api_wkssvc_cmds ) / sizeof ( struct api_struct ) ;
}
NTSTATUS rpc_wkssvc_init ( void )
{
return rpc_pipe_register_commands ( SMB_RPC_INTERFACE_VERSION , " wkssvc " , " wkssvc " , api_wkssvc_cmds , sizeof ( api_wkssvc_cmds ) / sizeof ( struct api_struct ) ) ;
}