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"
2007-10-18 17:40:25 -07:00
static bool api_wkssvc_NetWkstaGetInfo ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct wkssvc_NetWkstaGetInfo * r ;
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETWKSTAGETINFO ] ;
r = talloc ( NULL , struct wkssvc_NetWkstaGetInfo ) ;
if ( r = = NULL ) {
return False ;
}
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetWkstaGetInfo , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( r , union wkssvc_NetWkstaInfo ) ;
if ( r - > out . info = = NULL ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetWkstaGetInfo , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-10-18 17:40:25 -07:00
static bool api_wkssvc_NetWkstaSetInfo ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct wkssvc_NetWkstaSetInfo * r ;
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETWKSTASETINFO ] ;
r = talloc ( NULL , struct wkssvc_NetWkstaSetInfo ) ;
if ( r = = NULL ) {
return False ;
}
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetWkstaSetInfo , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
ZERO_STRUCT ( r - > out ) ;
r - > out . parm_error = r - > in . parm_error ;
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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetWkstaSetInfo , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-10-18 17:40:25 -07:00
static bool api_wkssvc_NetWkstaEnumUsers ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct wkssvc_NetWkstaEnumUsers * r ;
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETWKSTAENUMUSERS ] ;
r = talloc ( NULL , struct wkssvc_NetWkstaEnumUsers ) ;
if ( r = = NULL ) {
return False ;
}
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetWkstaEnumUsers , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
ZERO_STRUCT ( r - > out ) ;
2007-11-30 01:44:44 +01:00
r - > out . info = r - > in . info ;
r - > out . entries_read = talloc_zero ( r , uint32_t ) ;
if ( r - > out . entries_read = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-30 01:44:44 +01:00
r - > out . resume_handle = r - > in . resume_handle ;
2007-08-21 14:06:46 +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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetWkstaEnumUsers , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrWkstaUserGetInfo ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrWkstaUserGetInfo * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRWKSTAUSERGETINFO ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrWkstaUserGetInfo ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
return False ;
}
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrWkstaUserGetInfo , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( r , union wkssvc_NetrWkstaUserInfo ) ;
if ( r - > out . info = = NULL ) {
talloc_free ( r ) ;
return False ;
}
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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrWkstaUserGetInfo , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrWkstaUserSetInfo ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrWkstaUserSetInfo * r ;
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRWKSTAUSERSETINFO ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrWkstaUserSetInfo ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
return False ;
}
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrWkstaUserSetInfo , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . parm_err = r - > in . parm_err ;
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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrWkstaUserSetInfo , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-10-18 17:40:25 -07:00
static bool api_wkssvc_NetWkstaTransportEnum ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct wkssvc_NetWkstaTransportEnum * r ;
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETWKSTATRANSPORTENUM ] ;
r = talloc ( NULL , struct wkssvc_NetWkstaTransportEnum ) ;
if ( r = = NULL ) {
return False ;
}
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetWkstaTransportEnum , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
ZERO_STRUCT ( r - > out ) ;
2007-11-30 01:44:44 +01:00
r - > out . info = r - > in . info ;
r - > out . total_entries = talloc_zero ( r , uint32_t ) ;
if ( r - > out . total_entries = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
r - > out . resume_handle = r - > in . resume_handle ;
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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetWkstaTransportEnum , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrWkstaTransportAdd ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrWkstaTransportAdd * r ;
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRWKSTATRANSPORTADD ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrWkstaTransportAdd ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
return False ;
}
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrWkstaTransportAdd , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . parm_err = r - > in . parm_err ;
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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrWkstaTransportAdd , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrWkstaTransportDel ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrWkstaTransportDel * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRWKSTATRANSPORTDEL ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrWkstaTransportDel ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
return False ;
}
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrWkstaTransportDel , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01: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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrWkstaTransportDel , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrUseAdd ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrUseAdd * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRUSEADD ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrUseAdd ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
return False ;
}
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrUseAdd , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . parm_err = r - > in . parm_err ;
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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrUseAdd , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrUseGetInfo ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrUseGetInfo * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRUSEGETINFO ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrUseGetInfo ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
return False ;
}
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrUseGetInfo , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . ctr = talloc_zero ( r , union wkssvc_NetrUseGetInfoCtr ) ;
if ( r - > out . ctr = = NULL ) {
talloc_free ( r ) ;
return False ;
}
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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrUseGetInfo , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrUseDel ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrUseDel * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRUSEDEL ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrUseDel ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
return False ;
}
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrUseDel , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01: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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrUseDel , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrUseEnum ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrUseEnum * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRUSEENUM ] ;
2006-09-18 22:20:37 +00:00
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrUseEnum ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrUseEnum , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = r - > in . info ;
r - > out . entries_read = talloc_zero ( r , uint32_t ) ;
if ( r - > out . entries_read = = NULL ) {
talloc_free ( r ) ;
return False ;
}
r - > out . resume_handle = r - > in . resume_handle ;
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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrUseEnum , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrMessageBufferSend ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrMessageBufferSend * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRMESSAGEBUFFERSEND ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrMessageBufferSend ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
return False ;
}
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrMessageBufferSend , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01: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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrMessageBufferSend , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrWorkstationStatisticsGet ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrWorkstationStatisticsGet * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET ] ;
2006-09-18 22:20:37 +00:00
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrWorkstationStatisticsGet ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrWorkstationStatisticsGet , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( r , struct wkssvc_NetrWorkstationStatistics * ) ;
if ( r - > out . info = = NULL ) {
talloc_free ( r ) ;
return False ;
}
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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrWorkstationStatisticsGet , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrLogonDomainNameAdd ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrLogonDomainNameAdd * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRLOGONDOMAINNAMEADD ] ;
2006-09-18 22:20:37 +00:00
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrLogonDomainNameAdd ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrLogonDomainNameAdd , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01: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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrLogonDomainNameAdd , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrLogonDomainNameDel ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrLogonDomainNameDel * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrLogonDomainNameDel ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
return False ;
}
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrLogonDomainNameDel , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01: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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrLogonDomainNameDel , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrJoinDomain ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrJoinDomain * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRJOINDOMAIN ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrJoinDomain ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
return False ;
}
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrJoinDomain , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01: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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrJoinDomain , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrUnjoinDomain ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrUnjoinDomain * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRUNJOINDOMAIN ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrUnjoinDomain ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
return False ;
}
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrUnjoinDomain , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01: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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrUnjoinDomain , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrRenameMachineInDomain ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrRenameMachineInDomain * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrRenameMachineInDomain ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
return False ;
}
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrRenameMachineInDomain , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01: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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrRenameMachineInDomain , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrValidateName ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrValidateName * r ;
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRVALIDATENAME ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrValidateName ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrValidateName , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01: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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrValidateName , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrGetJoinInformation ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrGetJoinInformation * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRGETJOININFORMATION ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrGetJoinInformation ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
return False ;
}
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrGetJoinInformation , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . name_buffer = r - > in . name_buffer ;
r - > out . name_type = talloc_zero ( r , enum wkssvc_NetJoinStatus ) ;
if ( r - > out . name_type = = NULL ) {
talloc_free ( r ) ;
return False ;
}
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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrGetJoinInformation , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrGetJoinableOus ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrGetJoinableOus * r ;
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRGETJOINABLEOUS ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrGetJoinableOus ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrGetJoinableOus , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . num_ous = r - > in . num_ous ;
r - > out . ous = talloc_zero_array ( r , const char * * , * r - > out . num_ous ) ;
if ( r - > out . ous = = NULL ) {
talloc_free ( r ) ;
return False ;
}
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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrGetJoinableOus , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-10-18 17:40:25 -07:00
static bool api_wkssvc_NetrJoinDomain2 ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct wkssvc_NetrJoinDomain2 * r ;
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRJOINDOMAIN2 ] ;
r = talloc ( NULL , struct wkssvc_NetrJoinDomain2 ) ;
if ( r = = NULL ) {
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrJoinDomain2 , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrJoinDomain2 , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-10-18 17:40:25 -07:00
static bool api_wkssvc_NetrUnjoinDomain2 ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct wkssvc_NetrUnjoinDomain2 * r ;
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRUNJOINDOMAIN2 ] ;
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
r = talloc ( NULL , struct wkssvc_NetrUnjoinDomain2 ) ;
if ( r = = NULL ) {
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrUnjoinDomain2 , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrUnjoinDomain2 , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-10-18 17:40:25 -07:00
static bool api_wkssvc_NetrRenameMachineInDomain2 ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct wkssvc_NetrRenameMachineInDomain2 * r ;
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2 ] ;
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
r = talloc ( NULL , struct wkssvc_NetrRenameMachineInDomain2 ) ;
if ( r = = NULL ) {
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrRenameMachineInDomain2 , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrRenameMachineInDomain2 , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrValidateName2 ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrValidateName2 * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRVALIDATENAME2 ] ;
2006-09-18 22:20:37 +00:00
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrValidateName2 ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrValidateName2 , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01: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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrValidateName2 , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrGetJoinableOus2 ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrGetJoinableOus2 * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRGETJOINABLEOUS2 ] ;
2006-09-18 22:20:37 +00:00
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrGetJoinableOus2 ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrGetJoinableOus2 , r ) ;
ZERO_STRUCT ( r - > out ) ;
r - > out . num_ous = r - > in . num_ous ;
r - > out . ous = talloc_zero_array ( r , const char * * , * r - > out . num_ous ) ;
if ( r - > out . ous = = NULL ) {
talloc_free ( r ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01: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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrGetJoinableOus2 , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-10-18 17:40:25 -07:00
static bool api_wkssvc_NetrAddAlternateComputerName ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct wkssvc_NetrAddAlternateComputerName * r ;
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME ] ;
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
r = talloc ( NULL , struct wkssvc_NetrAddAlternateComputerName ) ;
if ( r = = NULL ) {
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrAddAlternateComputerName , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrAddAlternateComputerName , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-10-18 17:40:25 -07:00
static bool api_wkssvc_NetrRemoveAlternateComputerName ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct wkssvc_NetrRemoveAlternateComputerName * r ;
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME ] ;
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
r = talloc ( NULL , struct wkssvc_NetrRemoveAlternateComputerName ) ;
if ( r = = NULL ) {
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrRemoveAlternateComputerName , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrRemoveAlternateComputerName , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrSetPrimaryComputername ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrSetPrimaryComputername * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME ] ;
2006-09-18 22:20:37 +00:00
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrSetPrimaryComputername ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrSetPrimaryComputername , r ) ;
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01: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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrSetPrimaryComputername , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return True ;
}
2007-11-30 01:44:44 +01:00
static bool api_wkssvc_NetrEnumerateComputerNames ( pipes_struct * p )
2006-09-18 22:20:37 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-18 22:20:37 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-18 22:20:37 +00:00
DATA_BLOB blob ;
2007-11-30 01:44:44 +01:00
struct wkssvc_NetrEnumerateComputerNames * r ;
2007-08-21 14:06:46 +00:00
call = & ndr_table_wkssvc . calls [ NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES ] ;
2007-11-30 01:44:44 +01:00
r = talloc ( NULL , struct wkssvc_NetrEnumerateComputerNames ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
return False ;
}
2006-09-18 22:20:37 +00:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
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 ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_IN_DEBUG ( wkssvc_NetrEnumerateComputerNames , r ) ;
ZERO_STRUCT ( r - > out ) ;
r - > out . ctr = talloc_zero ( r , struct wkssvc_ComputerNamesCtr * ) ;
if ( r - > out . ctr = = NULL ) {
talloc_free ( r ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
2007-11-30 01:44:44 +01: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 ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-10-10 07:55:46 +00:00
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
2007-11-30 01:44:44 +01:00
NDR_PRINT_OUT_DEBUG ( wkssvc_NetrEnumerateComputerNames , r ) ;
2006-09-19 22:39:15 +00:00
2007-08-21 14:06:46 +00:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 22:20:37 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
return False ;
}
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2006-09-18 22:20:37 +00:00
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 } ,
2007-11-30 01:44:44 +01:00
{ " WKSSVC_NETRWKSTAUSERGETINFO " , NDR_WKSSVC_NETRWKSTAUSERGETINFO , api_wkssvc_NetrWkstaUserGetInfo } ,
{ " WKSSVC_NETRWKSTAUSERSETINFO " , NDR_WKSSVC_NETRWKSTAUSERSETINFO , api_wkssvc_NetrWkstaUserSetInfo } ,
2007-08-19 22:10:11 +00:00
{ " WKSSVC_NETWKSTATRANSPORTENUM " , NDR_WKSSVC_NETWKSTATRANSPORTENUM , api_wkssvc_NetWkstaTransportEnum } ,
2007-11-30 01:44:44 +01:00
{ " 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 } ,
2007-08-19 22:10:11 +00:00
{ " WKSSVC_NETRJOINDOMAIN2 " , NDR_WKSSVC_NETRJOINDOMAIN2 , api_wkssvc_NetrJoinDomain2 } ,
{ " WKSSVC_NETRUNJOINDOMAIN2 " , NDR_WKSSVC_NETRUNJOINDOMAIN2 , api_wkssvc_NetrUnjoinDomain2 } ,
{ " WKSSVC_NETRRENAMEMACHINEINDOMAIN2 " , NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2 , api_wkssvc_NetrRenameMachineInDomain2 } ,
2007-11-30 01:44:44 +01:00
{ " WKSSVC_NETRVALIDATENAME2 " , NDR_WKSSVC_NETRVALIDATENAME2 , api_wkssvc_NetrValidateName2 } ,
{ " WKSSVC_NETRGETJOINABLEOUS2 " , NDR_WKSSVC_NETRGETJOINABLEOUS2 , api_wkssvc_NetrGetJoinableOus2 } ,
2007-08-19 22:10:11 +00:00
{ " WKSSVC_NETRADDALTERNATECOMPUTERNAME " , NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME , api_wkssvc_NetrAddAlternateComputerName } ,
{ " WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME " , NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME , api_wkssvc_NetrRemoveAlternateComputerName } ,
2007-11-30 01:44:44 +01:00
{ " 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 ) ) ;
}