2006-09-20 20:32:29 +04:00
/*
* Unix SMB / CIFS implementation .
* server auto - generated by pidl . DO NOT MODIFY !
*/
# include "includes.h"
2008-12-16 18:32:18 +03:00
# include "../librpc/gen_ndr/srv_srvsvc.h"
2006-09-20 20:32:29 +04:00
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetCharDevEnum ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetCharDevEnum * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETCHARDEVENUM ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetCharDevEnum ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetCharDevEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
2008-10-30 20:23:13 +03:00
r - > out . info_ctr = r - > in . info_ctr ;
2008-11-20 00:00:43 +03:00
r - > out . resume_handle = r - > in . resume_handle ;
2007-08-21 18:06:46 +04:00
r - > out . totalentries = talloc_zero ( r , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetCharDevEnum ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetCharDevEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetCharDevGetInfo ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetCharDevGetInfo * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETCHARDEVGETINFO ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetCharDevGetInfo ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetCharDevGetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( r , union srvsvc_NetCharDevInfo ) ;
if ( r - > out . info = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetCharDevGetInfo ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetCharDevGetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetCharDevControl ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetCharDevControl * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETCHARDEVCONTROL ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetCharDevControl ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetCharDevControl , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetCharDevControl ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetCharDevControl , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetCharDevQEnum ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetCharDevQEnum * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETCHARDEVQENUM ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetCharDevQEnum ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetCharDevQEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
2008-10-30 20:23:13 +03:00
r - > out . info_ctr = r - > in . info_ctr ;
2008-11-20 00:00:43 +03:00
r - > out . resume_handle = r - > in . resume_handle ;
2007-08-21 18:06:46 +04:00
r - > out . totalentries = talloc_zero ( r , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetCharDevQEnum ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetCharDevQEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetCharDevQGetInfo ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetCharDevQGetInfo * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETCHARDEVQGETINFO ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetCharDevQGetInfo ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetCharDevQGetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( r , union srvsvc_NetCharDevQInfo ) ;
if ( r - > out . info = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetCharDevQGetInfo ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetCharDevQGetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetCharDevQSetInfo ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetCharDevQSetInfo * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETCHARDEVQSETINFO ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetCharDevQSetInfo ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetCharDevQSetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . parm_error = r - > in . parm_error ;
r - > out . result = _srvsvc_NetCharDevQSetInfo ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetCharDevQSetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetCharDevQPurge ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetCharDevQPurge * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETCHARDEVQPURGE ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetCharDevQPurge ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetCharDevQPurge , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetCharDevQPurge ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetCharDevQPurge , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetCharDevQPurgeSelf ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetCharDevQPurgeSelf * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETCHARDEVQPURGESELF ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetCharDevQPurgeSelf ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetCharDevQPurgeSelf , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetCharDevQPurgeSelf ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetCharDevQPurgeSelf , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetConnEnum ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetConnEnum * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETCONNENUM ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetConnEnum ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetConnEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
2008-03-10 19:35:34 +03:00
r - > out . info_ctr = r - > in . info_ctr ;
2008-11-20 00:00:43 +03:00
r - > out . resume_handle = r - > in . resume_handle ;
2007-08-21 18:06:46 +04:00
r - > out . totalentries = talloc_zero ( r , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetConnEnum ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetConnEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetFileEnum ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetFileEnum * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETFILEENUM ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetFileEnum ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetFileEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
2008-03-10 19:07:37 +03:00
r - > out . info_ctr = r - > in . info_ctr ;
2008-11-20 00:00:43 +03:00
r - > out . resume_handle = r - > in . resume_handle ;
2007-08-21 18:06:46 +04:00
r - > out . totalentries = talloc_zero ( r , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetFileEnum ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetFileEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetFileGetInfo ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetFileGetInfo * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETFILEGETINFO ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetFileGetInfo ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetFileGetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( r , union srvsvc_NetFileInfo ) ;
if ( r - > out . info = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetFileGetInfo ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetFileGetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetFileClose ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetFileClose * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETFILECLOSE ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetFileClose ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetFileClose , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetFileClose ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetFileClose , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetSessEnum ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetSessEnum * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSESSENUM ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetSessEnum ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetSessEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
2008-03-09 22:11:07 +03:00
r - > out . info_ctr = r - > in . info_ctr ;
2008-11-20 00:00:43 +03:00
r - > out . resume_handle = r - > in . resume_handle ;
2007-08-21 18:06:46 +04:00
r - > out . totalentries = talloc_zero ( r , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetSessEnum ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetSessEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetSessDel ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetSessDel * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSESSDEL ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetSessDel ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetSessDel , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetSessDel ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetSessDel , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetShareAdd ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetShareAdd * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSHAREADD ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetShareAdd ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetShareAdd , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . parm_error = r - > in . parm_error ;
r - > out . result = _srvsvc_NetShareAdd ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetShareAdd , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetShareEnumAll ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetShareEnumAll * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSHAREENUMALL ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetShareEnumAll ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetShareEnumAll , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
2008-03-07 04:59:01 +03:00
r - > out . info_ctr = r - > in . info_ctr ;
2008-11-20 00:00:43 +03:00
r - > out . resume_handle = r - > in . resume_handle ;
2007-08-21 18:06:46 +04:00
r - > out . totalentries = talloc_zero ( r , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetShareEnumAll ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetShareEnumAll , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetShareGetInfo ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetShareGetInfo * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSHAREGETINFO ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetShareGetInfo ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetShareGetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( r , union srvsvc_NetShareInfo ) ;
if ( r - > out . info = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetShareGetInfo ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetShareGetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetShareSetInfo ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetShareSetInfo * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSHARESETINFO ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetShareSetInfo ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetShareSetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . parm_error = r - > in . parm_error ;
r - > out . result = _srvsvc_NetShareSetInfo ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetShareSetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetShareDel ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetShareDel * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSHAREDEL ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetShareDel ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetShareDel , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetShareDel ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetShareDel , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetShareDelSticky ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetShareDelSticky * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSHAREDELSTICKY ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetShareDelSticky ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetShareDelSticky , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetShareDelSticky ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetShareDelSticky , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetShareCheck ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetShareCheck * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSHARECHECK ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetShareCheck ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetShareCheck , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . type = talloc_zero ( r , enum srvsvc_ShareType ) ;
if ( r - > out . type = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetShareCheck ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetShareCheck , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetSrvGetInfo ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetSrvGetInfo * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSRVGETINFO ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetSrvGetInfo ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetSrvGetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( r , union srvsvc_NetSrvInfo ) ;
if ( r - > out . info = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetSrvGetInfo ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetSrvGetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetSrvSetInfo ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetSrvSetInfo * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSRVSETINFO ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetSrvSetInfo ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetSrvSetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . parm_error = r - > in . parm_error ;
r - > out . result = _srvsvc_NetSrvSetInfo ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetSrvSetInfo , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetDiskEnum ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetDiskEnum * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETDISKENUM ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetDiskEnum ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetDiskEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = r - > in . info ;
2008-11-20 00:00:43 +03:00
r - > out . resume_handle = r - > in . resume_handle ;
2007-08-21 18:06:46 +04:00
r - > out . totalentries = talloc_zero ( r , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetDiskEnum ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetDiskEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetServerStatisticsGet ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetServerStatisticsGet * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSERVERSTATISTICSGET ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetServerStatisticsGet ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetServerStatisticsGet , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
2008-10-30 20:23:13 +03:00
r - > out . stats = talloc_zero ( r , struct srvsvc_Statistics * ) ;
2007-08-21 18:06:46 +04:00
if ( r - > out . stats = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetServerStatisticsGet ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetServerStatisticsGet , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetTransportAdd ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetTransportAdd * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETTRANSPORTADD ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetTransportAdd ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetTransportAdd , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetTransportAdd ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetTransportAdd , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetTransportEnum ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetTransportEnum * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETTRANSPORTENUM ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetTransportEnum ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetTransportEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . transports = r - > in . transports ;
2008-11-20 00:00:43 +03:00
r - > out . resume_handle = r - > in . resume_handle ;
2007-08-21 18:06:46 +04:00
r - > out . totalentries = talloc_zero ( r , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetTransportEnum ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetTransportEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetTransportDel ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetTransportDel * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETTRANSPORTDEL ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetTransportDel ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetTransportDel , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetTransportDel ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetTransportDel , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetRemoteTOD ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetRemoteTOD * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETREMOTETOD ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetRemoteTOD ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetRemoteTOD , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
2008-03-05 12:32:55 +03:00
r - > out . info = talloc_zero ( r , struct srvsvc_NetRemoteTODInfo * ) ;
2007-08-21 18:06:46 +04:00
if ( r - > out . info = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetRemoteTOD ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetRemoteTOD , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetSetServiceBits ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetSetServiceBits * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSETSERVICEBITS ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetSetServiceBits ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetSetServiceBits , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetSetServiceBits ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetSetServiceBits , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetPathType ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetPathType * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETPATHTYPE ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetPathType ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetPathType , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . pathtype = talloc_zero ( r , uint32_t ) ;
if ( r - > out . pathtype = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetPathType ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetPathType , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetPathCanonicalize ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetPathCanonicalize * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETPATHCANONICALIZE ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetPathCanonicalize ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetPathCanonicalize , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
2008-11-20 00:00:43 +03:00
r - > out . pathtype = r - > in . pathtype ;
2007-08-21 18:06:46 +04:00
r - > out . can_path = talloc_zero_array ( r , uint8_t , r - > in . maxbuf ) ;
if ( r - > out . can_path = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetPathCanonicalize ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetPathCanonicalize , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetPathCompare ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetPathCompare * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETPATHCOMPARE ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetPathCompare ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetPathCompare , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetPathCompare ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetPathCompare , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetNameValidate ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetNameValidate * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETNAMEVALIDATE ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetNameValidate ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetNameValidate , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetNameValidate ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetNameValidate , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NETRPRNAMECANONICALIZE ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NETRPRNAMECANONICALIZE * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETRPRNAMECANONICALIZE ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NETRPRNAMECANONICALIZE ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NETRPRNAMECANONICALIZE , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NETRPRNAMECANONICALIZE ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NETRPRNAMECANONICALIZE , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetPRNameCompare ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetPRNameCompare * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETPRNAMECOMPARE ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetPRNameCompare ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetPRNameCompare , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetPRNameCompare ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetPRNameCompare , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetShareEnum ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetShareEnum * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSHAREENUM ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetShareEnum ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetShareEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
2008-03-07 04:59:01 +03:00
r - > out . info_ctr = r - > in . info_ctr ;
2008-11-20 00:00:43 +03:00
r - > out . resume_handle = r - > in . resume_handle ;
2007-08-21 18:06:46 +04:00
r - > out . totalentries = talloc_zero ( r , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetShareEnum ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetShareEnum , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetShareDelStart ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetShareDelStart * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSHAREDELSTART ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetShareDelStart ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetShareDelStart , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . hnd = talloc_zero ( r , struct policy_handle ) ;
if ( r - > out . hnd = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetShareDelStart ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetShareDelStart , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetShareDelCommit ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetShareDelCommit * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSHAREDELCOMMIT ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetShareDelCommit ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetShareDelCommit , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . hnd = r - > in . hnd ;
r - > out . result = _srvsvc_NetShareDelCommit ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetShareDelCommit , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetGetFileSecurity ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetGetFileSecurity * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETGETFILESECURITY ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetGetFileSecurity ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetGetFileSecurity , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
2008-03-08 02:28:38 +03:00
r - > out . sd_buf = talloc_zero ( r , struct sec_desc_buf * ) ;
2007-08-21 18:06:46 +04:00
if ( r - > out . sd_buf = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetGetFileSecurity ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetGetFileSecurity , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetSetFileSecurity ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetSetFileSecurity * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSETFILESECURITY ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetSetFileSecurity ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetSetFileSecurity , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetSetFileSecurity ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetSetFileSecurity , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetServerTransportAddEx ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetServerTransportAddEx * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSERVERTRANSPORTADDEX ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetServerTransportAddEx ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetServerTransportAddEx , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetServerTransportAddEx ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetServerTransportAddEx , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NetServerSetServiceBitsEx ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NetServerSetServiceBitsEx * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETSERVERSETSERVICEBITSEX ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NetServerSetServiceBitsEx ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NetServerSetServiceBitsEx , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NetServerSetServiceBitsEx ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NetServerSetServiceBitsEx , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NETRDFSGETVERSION ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NETRDFSGETVERSION * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETRDFSGETVERSION ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NETRDFSGETVERSION ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NETRDFSGETVERSION , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NETRDFSGETVERSION ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NETRDFSGETVERSION , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NETRDFSCREATELOCALPARTITION ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NETRDFSCREATELOCALPARTITION * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETRDFSCREATELOCALPARTITION ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NETRDFSCREATELOCALPARTITION ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NETRDFSCREATELOCALPARTITION , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NETRDFSCREATELOCALPARTITION ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NETRDFSCREATELOCALPARTITION , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NETRDFSDELETELOCALPARTITION ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NETRDFSDELETELOCALPARTITION * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETRDFSDELETELOCALPARTITION ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NETRDFSDELETELOCALPARTITION ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NETRDFSDELETELOCALPARTITION , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NETRDFSDELETELOCALPARTITION ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NETRDFSDELETELOCALPARTITION , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NETRDFSSETLOCALVOLUMESTATE ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NETRDFSSETLOCALVOLUMESTATE * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NETRDFSSETLOCALVOLUMESTATE ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NETRDFSSETLOCALVOLUMESTATE , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NETRDFSSETLOCALVOLUMESTATE ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NETRDFSSETLOCALVOLUMESTATE , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NETRDFSSETSERVERINFO ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NETRDFSSETSERVERINFO * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETRDFSSETSERVERINFO ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NETRDFSSETSERVERINFO ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NETRDFSSETSERVERINFO , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NETRDFSSETSERVERINFO ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NETRDFSSETSERVERINFO , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NETRDFSCREATEEXITPOINT ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NETRDFSCREATEEXITPOINT * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETRDFSCREATEEXITPOINT ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NETRDFSCREATEEXITPOINT ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NETRDFSCREATEEXITPOINT , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NETRDFSCREATEEXITPOINT ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NETRDFSCREATEEXITPOINT , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NETRDFSDELETEEXITPOINT ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NETRDFSDELETEEXITPOINT * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETRDFSDELETEEXITPOINT ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NETRDFSDELETEEXITPOINT ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NETRDFSDELETEEXITPOINT , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NETRDFSDELETEEXITPOINT ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NETRDFSDELETEEXITPOINT , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NETRDFSMODIFYPREFIX ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NETRDFSMODIFYPREFIX * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETRDFSMODIFYPREFIX ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NETRDFSMODIFYPREFIX ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NETRDFSMODIFYPREFIX , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NETRDFSMODIFYPREFIX ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NETRDFSMODIFYPREFIX , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NETRDFSFIXLOCALVOLUME ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NETRDFSFIXLOCALVOLUME * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETRDFSFIXLOCALVOLUME ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NETRDFSFIXLOCALVOLUME ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NETRDFSFIXLOCALVOLUME , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NETRDFSFIXLOCALVOLUME ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NETRDFSFIXLOCALVOLUME , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NETRDFSMANAGERREPORTSITEINFO ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NETRDFSMANAGERREPORTSITEINFO * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NETRDFSMANAGERREPORTSITEINFO ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NETRDFSMANAGERREPORTSITEINFO , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NETRDFSMANAGERREPORTSITEINFO ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NETRDFSMANAGERREPORTSITEINFO , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_srvsvc_NETRSERVERTRANSPORTDELEX ( pipes_struct * p )
2006-09-20 20:32:29 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-20 20:32:29 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-20 20:32:29 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct srvsvc_NETRSERVERTRANSPORTDELEX * r ;
2008-01-09 14:28:44 +03:00
2009-11-08 21:37:42 +03:00
call = & ndr_table_srvsvc . calls [ NDR_SRVSVC_NETRSERVERTRANSPORTDELEX ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct srvsvc_NETRSERVERTRANSPORTDELEX ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2008-09-23 22:59:30 +04:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( srvsvc_NETRSERVERTRANSPORTDELEX , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _srvsvc_NETRSERVERTRANSPORTDELEX ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( srvsvc_NETRSERVERTRANSPORTDELEX , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-10-12 21:05:46 +04:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-20 20:32:29 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-20 20:32:29 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-20 20:32:29 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-20 20:32:29 +04:00
}
/* Tables */
static struct api_struct api_srvsvc_cmds [ ] =
{
2007-08-20 02:10:11 +04:00
{ " SRVSVC_NETCHARDEVENUM " , NDR_SRVSVC_NETCHARDEVENUM , api_srvsvc_NetCharDevEnum } ,
{ " SRVSVC_NETCHARDEVGETINFO " , NDR_SRVSVC_NETCHARDEVGETINFO , api_srvsvc_NetCharDevGetInfo } ,
{ " SRVSVC_NETCHARDEVCONTROL " , NDR_SRVSVC_NETCHARDEVCONTROL , api_srvsvc_NetCharDevControl } ,
{ " SRVSVC_NETCHARDEVQENUM " , NDR_SRVSVC_NETCHARDEVQENUM , api_srvsvc_NetCharDevQEnum } ,
{ " SRVSVC_NETCHARDEVQGETINFO " , NDR_SRVSVC_NETCHARDEVQGETINFO , api_srvsvc_NetCharDevQGetInfo } ,
{ " SRVSVC_NETCHARDEVQSETINFO " , NDR_SRVSVC_NETCHARDEVQSETINFO , api_srvsvc_NetCharDevQSetInfo } ,
{ " SRVSVC_NETCHARDEVQPURGE " , NDR_SRVSVC_NETCHARDEVQPURGE , api_srvsvc_NetCharDevQPurge } ,
{ " SRVSVC_NETCHARDEVQPURGESELF " , NDR_SRVSVC_NETCHARDEVQPURGESELF , api_srvsvc_NetCharDevQPurgeSelf } ,
{ " SRVSVC_NETCONNENUM " , NDR_SRVSVC_NETCONNENUM , api_srvsvc_NetConnEnum } ,
{ " SRVSVC_NETFILEENUM " , NDR_SRVSVC_NETFILEENUM , api_srvsvc_NetFileEnum } ,
{ " SRVSVC_NETFILEGETINFO " , NDR_SRVSVC_NETFILEGETINFO , api_srvsvc_NetFileGetInfo } ,
{ " SRVSVC_NETFILECLOSE " , NDR_SRVSVC_NETFILECLOSE , api_srvsvc_NetFileClose } ,
{ " SRVSVC_NETSESSENUM " , NDR_SRVSVC_NETSESSENUM , api_srvsvc_NetSessEnum } ,
{ " SRVSVC_NETSESSDEL " , NDR_SRVSVC_NETSESSDEL , api_srvsvc_NetSessDel } ,
{ " SRVSVC_NETSHAREADD " , NDR_SRVSVC_NETSHAREADD , api_srvsvc_NetShareAdd } ,
{ " SRVSVC_NETSHAREENUMALL " , NDR_SRVSVC_NETSHAREENUMALL , api_srvsvc_NetShareEnumAll } ,
{ " SRVSVC_NETSHAREGETINFO " , NDR_SRVSVC_NETSHAREGETINFO , api_srvsvc_NetShareGetInfo } ,
{ " SRVSVC_NETSHARESETINFO " , NDR_SRVSVC_NETSHARESETINFO , api_srvsvc_NetShareSetInfo } ,
{ " SRVSVC_NETSHAREDEL " , NDR_SRVSVC_NETSHAREDEL , api_srvsvc_NetShareDel } ,
{ " SRVSVC_NETSHAREDELSTICKY " , NDR_SRVSVC_NETSHAREDELSTICKY , api_srvsvc_NetShareDelSticky } ,
{ " SRVSVC_NETSHARECHECK " , NDR_SRVSVC_NETSHARECHECK , api_srvsvc_NetShareCheck } ,
{ " SRVSVC_NETSRVGETINFO " , NDR_SRVSVC_NETSRVGETINFO , api_srvsvc_NetSrvGetInfo } ,
{ " SRVSVC_NETSRVSETINFO " , NDR_SRVSVC_NETSRVSETINFO , api_srvsvc_NetSrvSetInfo } ,
{ " SRVSVC_NETDISKENUM " , NDR_SRVSVC_NETDISKENUM , api_srvsvc_NetDiskEnum } ,
{ " SRVSVC_NETSERVERSTATISTICSGET " , NDR_SRVSVC_NETSERVERSTATISTICSGET , api_srvsvc_NetServerStatisticsGet } ,
{ " SRVSVC_NETTRANSPORTADD " , NDR_SRVSVC_NETTRANSPORTADD , api_srvsvc_NetTransportAdd } ,
{ " SRVSVC_NETTRANSPORTENUM " , NDR_SRVSVC_NETTRANSPORTENUM , api_srvsvc_NetTransportEnum } ,
{ " SRVSVC_NETTRANSPORTDEL " , NDR_SRVSVC_NETTRANSPORTDEL , api_srvsvc_NetTransportDel } ,
{ " SRVSVC_NETREMOTETOD " , NDR_SRVSVC_NETREMOTETOD , api_srvsvc_NetRemoteTOD } ,
{ " SRVSVC_NETSETSERVICEBITS " , NDR_SRVSVC_NETSETSERVICEBITS , api_srvsvc_NetSetServiceBits } ,
{ " SRVSVC_NETPATHTYPE " , NDR_SRVSVC_NETPATHTYPE , api_srvsvc_NetPathType } ,
{ " SRVSVC_NETPATHCANONICALIZE " , NDR_SRVSVC_NETPATHCANONICALIZE , api_srvsvc_NetPathCanonicalize } ,
{ " SRVSVC_NETPATHCOMPARE " , NDR_SRVSVC_NETPATHCOMPARE , api_srvsvc_NetPathCompare } ,
{ " SRVSVC_NETNAMEVALIDATE " , NDR_SRVSVC_NETNAMEVALIDATE , api_srvsvc_NetNameValidate } ,
{ " SRVSVC_NETRPRNAMECANONICALIZE " , NDR_SRVSVC_NETRPRNAMECANONICALIZE , api_srvsvc_NETRPRNAMECANONICALIZE } ,
{ " SRVSVC_NETPRNAMECOMPARE " , NDR_SRVSVC_NETPRNAMECOMPARE , api_srvsvc_NetPRNameCompare } ,
{ " SRVSVC_NETSHAREENUM " , NDR_SRVSVC_NETSHAREENUM , api_srvsvc_NetShareEnum } ,
{ " SRVSVC_NETSHAREDELSTART " , NDR_SRVSVC_NETSHAREDELSTART , api_srvsvc_NetShareDelStart } ,
{ " SRVSVC_NETSHAREDELCOMMIT " , NDR_SRVSVC_NETSHAREDELCOMMIT , api_srvsvc_NetShareDelCommit } ,
{ " SRVSVC_NETGETFILESECURITY " , NDR_SRVSVC_NETGETFILESECURITY , api_srvsvc_NetGetFileSecurity } ,
{ " SRVSVC_NETSETFILESECURITY " , NDR_SRVSVC_NETSETFILESECURITY , api_srvsvc_NetSetFileSecurity } ,
{ " SRVSVC_NETSERVERTRANSPORTADDEX " , NDR_SRVSVC_NETSERVERTRANSPORTADDEX , api_srvsvc_NetServerTransportAddEx } ,
{ " SRVSVC_NETSERVERSETSERVICEBITSEX " , NDR_SRVSVC_NETSERVERSETSERVICEBITSEX , api_srvsvc_NetServerSetServiceBitsEx } ,
{ " SRVSVC_NETRDFSGETVERSION " , NDR_SRVSVC_NETRDFSGETVERSION , api_srvsvc_NETRDFSGETVERSION } ,
{ " SRVSVC_NETRDFSCREATELOCALPARTITION " , NDR_SRVSVC_NETRDFSCREATELOCALPARTITION , api_srvsvc_NETRDFSCREATELOCALPARTITION } ,
{ " SRVSVC_NETRDFSDELETELOCALPARTITION " , NDR_SRVSVC_NETRDFSDELETELOCALPARTITION , api_srvsvc_NETRDFSDELETELOCALPARTITION } ,
{ " SRVSVC_NETRDFSSETLOCALVOLUMESTATE " , NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE , api_srvsvc_NETRDFSSETLOCALVOLUMESTATE } ,
{ " SRVSVC_NETRDFSSETSERVERINFO " , NDR_SRVSVC_NETRDFSSETSERVERINFO , api_srvsvc_NETRDFSSETSERVERINFO } ,
{ " SRVSVC_NETRDFSCREATEEXITPOINT " , NDR_SRVSVC_NETRDFSCREATEEXITPOINT , api_srvsvc_NETRDFSCREATEEXITPOINT } ,
{ " SRVSVC_NETRDFSDELETEEXITPOINT " , NDR_SRVSVC_NETRDFSDELETEEXITPOINT , api_srvsvc_NETRDFSDELETEEXITPOINT } ,
{ " SRVSVC_NETRDFSMODIFYPREFIX " , NDR_SRVSVC_NETRDFSMODIFYPREFIX , api_srvsvc_NETRDFSMODIFYPREFIX } ,
{ " SRVSVC_NETRDFSFIXLOCALVOLUME " , NDR_SRVSVC_NETRDFSFIXLOCALVOLUME , api_srvsvc_NETRDFSFIXLOCALVOLUME } ,
{ " SRVSVC_NETRDFSMANAGERREPORTSITEINFO " , NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO , api_srvsvc_NETRDFSMANAGERREPORTSITEINFO } ,
{ " SRVSVC_NETRSERVERTRANSPORTDELEX " , NDR_SRVSVC_NETRSERVERTRANSPORTDELEX , api_srvsvc_NETRSERVERTRANSPORTDELEX } ,
2006-09-20 20:32:29 +04:00
} ;
void srvsvc_get_pipe_fns ( struct api_struct * * fns , int * n_fns )
{
* fns = api_srvsvc_cmds ;
* n_fns = sizeof ( api_srvsvc_cmds ) / sizeof ( struct api_struct ) ;
}
2009-11-08 21:38:01 +03:00
NTSTATUS rpc_srvsvc_dispatch ( struct rpc_pipe_client * cli , TALLOC_CTX * mem_ctx , const struct ndr_interface_table * table , uint32_t opnum , void * _r )
2009-01-21 16:05:51 +03:00
{
if ( cli - > pipes_struct = = NULL ) {
return NT_STATUS_INVALID_PARAMETER ;
}
switch ( opnum )
{
case NDR_SRVSVC_NETCHARDEVENUM : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetCharDevEnum * r = ( struct srvsvc_NetCharDevEnum * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info_ctr = r - > in . info_ctr ;
r - > out . resume_handle = r - > in . resume_handle ;
r - > out . totalentries = talloc_zero ( mem_ctx , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetCharDevEnum ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETCHARDEVGETINFO : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetCharDevGetInfo * r = ( struct srvsvc_NetCharDevGetInfo * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( mem_ctx , union srvsvc_NetCharDevInfo ) ;
if ( r - > out . info = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetCharDevGetInfo ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETCHARDEVCONTROL : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetCharDevControl * r = ( struct srvsvc_NetCharDevControl * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetCharDevControl ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETCHARDEVQENUM : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetCharDevQEnum * r = ( struct srvsvc_NetCharDevQEnum * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info_ctr = r - > in . info_ctr ;
r - > out . resume_handle = r - > in . resume_handle ;
r - > out . totalentries = talloc_zero ( mem_ctx , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetCharDevQEnum ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETCHARDEVQGETINFO : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetCharDevQGetInfo * r = ( struct srvsvc_NetCharDevQGetInfo * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( mem_ctx , union srvsvc_NetCharDevQInfo ) ;
if ( r - > out . info = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetCharDevQGetInfo ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETCHARDEVQSETINFO : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetCharDevQSetInfo * r = ( struct srvsvc_NetCharDevQSetInfo * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . parm_error = r - > in . parm_error ;
r - > out . result = _srvsvc_NetCharDevQSetInfo ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETCHARDEVQPURGE : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetCharDevQPurge * r = ( struct srvsvc_NetCharDevQPurge * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetCharDevQPurge ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETCHARDEVQPURGESELF : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetCharDevQPurgeSelf * r = ( struct srvsvc_NetCharDevQPurgeSelf * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetCharDevQPurgeSelf ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETCONNENUM : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetConnEnum * r = ( struct srvsvc_NetConnEnum * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info_ctr = r - > in . info_ctr ;
r - > out . resume_handle = r - > in . resume_handle ;
r - > out . totalentries = talloc_zero ( mem_ctx , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetConnEnum ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETFILEENUM : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetFileEnum * r = ( struct srvsvc_NetFileEnum * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info_ctr = r - > in . info_ctr ;
r - > out . resume_handle = r - > in . resume_handle ;
r - > out . totalentries = talloc_zero ( mem_ctx , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetFileEnum ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETFILEGETINFO : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetFileGetInfo * r = ( struct srvsvc_NetFileGetInfo * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( mem_ctx , union srvsvc_NetFileInfo ) ;
if ( r - > out . info = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetFileGetInfo ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETFILECLOSE : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetFileClose * r = ( struct srvsvc_NetFileClose * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetFileClose ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSESSENUM : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetSessEnum * r = ( struct srvsvc_NetSessEnum * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info_ctr = r - > in . info_ctr ;
r - > out . resume_handle = r - > in . resume_handle ;
r - > out . totalentries = talloc_zero ( mem_ctx , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetSessEnum ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSESSDEL : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetSessDel * r = ( struct srvsvc_NetSessDel * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetSessDel ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSHAREADD : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetShareAdd * r = ( struct srvsvc_NetShareAdd * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . parm_error = r - > in . parm_error ;
r - > out . result = _srvsvc_NetShareAdd ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSHAREENUMALL : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetShareEnumAll * r = ( struct srvsvc_NetShareEnumAll * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info_ctr = r - > in . info_ctr ;
r - > out . resume_handle = r - > in . resume_handle ;
r - > out . totalentries = talloc_zero ( mem_ctx , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetShareEnumAll ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSHAREGETINFO : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetShareGetInfo * r = ( struct srvsvc_NetShareGetInfo * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( mem_ctx , union srvsvc_NetShareInfo ) ;
if ( r - > out . info = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetShareGetInfo ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSHARESETINFO : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetShareSetInfo * r = ( struct srvsvc_NetShareSetInfo * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . parm_error = r - > in . parm_error ;
r - > out . result = _srvsvc_NetShareSetInfo ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSHAREDEL : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetShareDel * r = ( struct srvsvc_NetShareDel * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetShareDel ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSHAREDELSTICKY : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetShareDelSticky * r = ( struct srvsvc_NetShareDelSticky * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetShareDelSticky ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSHARECHECK : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetShareCheck * r = ( struct srvsvc_NetShareCheck * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . type = talloc_zero ( mem_ctx , enum srvsvc_ShareType ) ;
if ( r - > out . type = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetShareCheck ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSRVGETINFO : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetSrvGetInfo * r = ( struct srvsvc_NetSrvGetInfo * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( mem_ctx , union srvsvc_NetSrvInfo ) ;
if ( r - > out . info = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetSrvGetInfo ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSRVSETINFO : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetSrvSetInfo * r = ( struct srvsvc_NetSrvSetInfo * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . parm_error = r - > in . parm_error ;
r - > out . result = _srvsvc_NetSrvSetInfo ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETDISKENUM : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetDiskEnum * r = ( struct srvsvc_NetDiskEnum * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = r - > in . info ;
r - > out . resume_handle = r - > in . resume_handle ;
r - > out . totalentries = talloc_zero ( mem_ctx , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetDiskEnum ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSERVERSTATISTICSGET : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetServerStatisticsGet * r = ( struct srvsvc_NetServerStatisticsGet * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . stats = talloc_zero ( mem_ctx , struct srvsvc_Statistics * ) ;
if ( r - > out . stats = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetServerStatisticsGet ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETTRANSPORTADD : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetTransportAdd * r = ( struct srvsvc_NetTransportAdd * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetTransportAdd ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETTRANSPORTENUM : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetTransportEnum * r = ( struct srvsvc_NetTransportEnum * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . transports = r - > in . transports ;
r - > out . resume_handle = r - > in . resume_handle ;
r - > out . totalentries = talloc_zero ( mem_ctx , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetTransportEnum ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETTRANSPORTDEL : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetTransportDel * r = ( struct srvsvc_NetTransportDel * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetTransportDel ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETREMOTETOD : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetRemoteTOD * r = ( struct srvsvc_NetRemoteTOD * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( mem_ctx , struct srvsvc_NetRemoteTODInfo * ) ;
if ( r - > out . info = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetRemoteTOD ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSETSERVICEBITS : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetSetServiceBits * r = ( struct srvsvc_NetSetServiceBits * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetSetServiceBits ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETPATHTYPE : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetPathType * r = ( struct srvsvc_NetPathType * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . pathtype = talloc_zero ( mem_ctx , uint32_t ) ;
if ( r - > out . pathtype = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetPathType ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETPATHCANONICALIZE : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetPathCanonicalize * r = ( struct srvsvc_NetPathCanonicalize * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . pathtype = r - > in . pathtype ;
r - > out . can_path = talloc_zero_array ( mem_ctx , uint8_t , r - > in . maxbuf ) ;
if ( r - > out . can_path = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetPathCanonicalize ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETPATHCOMPARE : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetPathCompare * r = ( struct srvsvc_NetPathCompare * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetPathCompare ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETNAMEVALIDATE : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetNameValidate * r = ( struct srvsvc_NetNameValidate * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetNameValidate ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETRPRNAMECANONICALIZE : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NETRPRNAMECANONICALIZE * r = ( struct srvsvc_NETRPRNAMECANONICALIZE * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NETRPRNAMECANONICALIZE ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETPRNAMECOMPARE : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetPRNameCompare * r = ( struct srvsvc_NetPRNameCompare * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetPRNameCompare ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSHAREENUM : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetShareEnum * r = ( struct srvsvc_NetShareEnum * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info_ctr = r - > in . info_ctr ;
r - > out . resume_handle = r - > in . resume_handle ;
r - > out . totalentries = talloc_zero ( mem_ctx , uint32_t ) ;
if ( r - > out . totalentries = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetShareEnum ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSHAREDELSTART : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetShareDelStart * r = ( struct srvsvc_NetShareDelStart * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . hnd = talloc_zero ( mem_ctx , struct policy_handle ) ;
if ( r - > out . hnd = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetShareDelStart ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSHAREDELCOMMIT : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetShareDelCommit * r = ( struct srvsvc_NetShareDelCommit * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . hnd = r - > in . hnd ;
r - > out . result = _srvsvc_NetShareDelCommit ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETGETFILESECURITY : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetGetFileSecurity * r = ( struct srvsvc_NetGetFileSecurity * ) _r ;
2009-01-21 16:05:51 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . sd_buf = talloc_zero ( mem_ctx , struct sec_desc_buf * ) ;
if ( r - > out . sd_buf = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _srvsvc_NetGetFileSecurity ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSETFILESECURITY : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetSetFileSecurity * r = ( struct srvsvc_NetSetFileSecurity * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetSetFileSecurity ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSERVERTRANSPORTADDEX : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetServerTransportAddEx * r = ( struct srvsvc_NetServerTransportAddEx * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetServerTransportAddEx ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETSERVERSETSERVICEBITSEX : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NetServerSetServiceBitsEx * r = ( struct srvsvc_NetServerSetServiceBitsEx * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NetServerSetServiceBitsEx ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETRDFSGETVERSION : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NETRDFSGETVERSION * r = ( struct srvsvc_NETRDFSGETVERSION * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NETRDFSGETVERSION ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETRDFSCREATELOCALPARTITION : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NETRDFSCREATELOCALPARTITION * r = ( struct srvsvc_NETRDFSCREATELOCALPARTITION * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NETRDFSCREATELOCALPARTITION ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETRDFSDELETELOCALPARTITION : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NETRDFSDELETELOCALPARTITION * r = ( struct srvsvc_NETRDFSDELETELOCALPARTITION * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NETRDFSDELETELOCALPARTITION ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NETRDFSSETLOCALVOLUMESTATE * r = ( struct srvsvc_NETRDFSSETLOCALVOLUMESTATE * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NETRDFSSETLOCALVOLUMESTATE ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETRDFSSETSERVERINFO : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NETRDFSSETSERVERINFO * r = ( struct srvsvc_NETRDFSSETSERVERINFO * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NETRDFSSETSERVERINFO ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETRDFSCREATEEXITPOINT : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NETRDFSCREATEEXITPOINT * r = ( struct srvsvc_NETRDFSCREATEEXITPOINT * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NETRDFSCREATEEXITPOINT ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETRDFSDELETEEXITPOINT : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NETRDFSDELETEEXITPOINT * r = ( struct srvsvc_NETRDFSDELETEEXITPOINT * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NETRDFSDELETEEXITPOINT ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETRDFSMODIFYPREFIX : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NETRDFSMODIFYPREFIX * r = ( struct srvsvc_NETRDFSMODIFYPREFIX * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NETRDFSMODIFYPREFIX ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETRDFSFIXLOCALVOLUME : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NETRDFSFIXLOCALVOLUME * r = ( struct srvsvc_NETRDFSFIXLOCALVOLUME * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NETRDFSFIXLOCALVOLUME ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NETRDFSMANAGERREPORTSITEINFO * r = ( struct srvsvc_NETRDFSMANAGERREPORTSITEINFO * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NETRDFSMANAGERREPORTSITEINFO ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_SRVSVC_NETRSERVERTRANSPORTDELEX : {
2009-01-22 03:19:38 +03:00
struct srvsvc_NETRSERVERTRANSPORTDELEX * r = ( struct srvsvc_NETRSERVERTRANSPORTDELEX * ) _r ;
2009-01-21 16:05:51 +03:00
r - > out . result = _srvsvc_NETRSERVERTRANSPORTDELEX ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
default :
return NT_STATUS_NOT_IMPLEMENTED ;
}
}
2006-09-20 20:32:29 +04:00
NTSTATUS rpc_srvsvc_init ( void )
{
2009-11-08 21:37:33 +03:00
return rpc_srv_register ( SMB_RPC_INTERFACE_VERSION , " srvsvc " , " srvsvc " , & ndr_table_srvsvc , api_srvsvc_cmds , sizeof ( api_srvsvc_cmds ) / sizeof ( struct api_struct ) ) ;
2006-09-20 20:32:29 +04:00
}