2006-09-13 16:28:25 +00:00
/*
* Unix SMB / CIFS implementation .
* server auto - generated by pidl . DO NOT MODIFY !
*/
# include "includes.h"
# include "librpc/gen_ndr/srv_dfs.h"
static BOOL api_dfs_GetManagerVersion ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_GetManagerVersion r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_GetManagerVersion " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_GetManagerVersion ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_GetManagerVersion , & r ) ;
2006-09-19 22:22:57 +00:00
ZERO_STRUCT ( r . out ) ;
2007-06-27 09:17:52 +00:00
r . out . version = talloc_zero ( mem_ctx , enum dfs_ManagerVersion ) ;
if ( r . out . version = = NULL ) {
2006-09-14 14:51:16 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
2007-01-18 10:18:59 +00:00
_dfs_GetManagerVersion ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_GetManagerVersion , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_GetManagerVersion ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_Add ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_Add r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_Add " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_Add ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_Add , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_Add ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_Add , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_Add ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_Remove ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_Remove r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_Remove " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_Remove ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_Remove , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_Remove ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_Remove , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_Remove ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_SetInfo ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_SetInfo r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_SetInfo " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_SetInfo ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_SetInfo , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_SetInfo ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_SetInfo , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_SetInfo ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_GetInfo ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_GetInfo r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_GetInfo " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_GetInfo ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_GetInfo , & r ) ;
2006-09-19 22:22:57 +00:00
ZERO_STRUCT ( r . out ) ;
2007-01-16 17:48:59 +00:00
r . out . info = talloc_zero ( mem_ctx , union dfs_Info ) ;
2006-09-14 14:51:16 +00:00
if ( r . out . info = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_GetInfo ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_GetInfo , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_GetInfo ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_Enum ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_Enum r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_Enum " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_Enum ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_Enum , & r ) ;
2006-09-19 22:22:57 +00:00
ZERO_STRUCT ( r . out ) ;
2006-09-13 16:28:25 +00:00
r . out . info = r . in . info ;
r . out . total = r . in . total ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_Enum ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_Enum , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_Enum ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_Rename ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_Rename r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_Rename " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_Rename ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_Rename , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_Rename ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_Rename , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_Rename ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_Move ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_Move r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_Move " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_Move ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_Move , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_Move ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_Move , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_Move ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_ManagerGetConfigInfo ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_ManagerGetConfigInfo r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_ManagerGetConfigInfo " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_ManagerGetConfigInfo ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_ManagerGetConfigInfo , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_ManagerGetConfigInfo ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_ManagerGetConfigInfo , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_ManagerGetConfigInfo ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_ManagerSendSiteInfo ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_ManagerSendSiteInfo r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_ManagerSendSiteInfo " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_ManagerSendSiteInfo ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_ManagerSendSiteInfo , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_ManagerSendSiteInfo ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_ManagerSendSiteInfo , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_ManagerSendSiteInfo ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_AddFtRoot ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_AddFtRoot r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_AddFtRoot " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_AddFtRoot ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_AddFtRoot , & r ) ;
2007-06-27 09:17:52 +00:00
ZERO_STRUCT ( r . out ) ;
r . out . unknown2 = r . in . unknown2 ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_AddFtRoot ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_AddFtRoot , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_AddFtRoot ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_RemoveFtRoot ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_RemoveFtRoot r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_RemoveFtRoot " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_RemoveFtRoot ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_RemoveFtRoot , & r ) ;
2007-06-27 09:17:52 +00:00
ZERO_STRUCT ( r . out ) ;
r . out . unknown = r . in . unknown ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_RemoveFtRoot ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_RemoveFtRoot , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_RemoveFtRoot ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_AddStdRoot ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_AddStdRoot r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_AddStdRoot " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_AddStdRoot ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_AddStdRoot , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_AddStdRoot ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_AddStdRoot , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_AddStdRoot ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_RemoveStdRoot ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_RemoveStdRoot r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_RemoveStdRoot " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_RemoveStdRoot ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_RemoveStdRoot , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_RemoveStdRoot ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_RemoveStdRoot , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_RemoveStdRoot ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_ManagerInitialize ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_ManagerInitialize r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_ManagerInitialize " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_ManagerInitialize ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_ManagerInitialize , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_ManagerInitialize ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_ManagerInitialize , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_ManagerInitialize ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_AddStdRootForced ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_AddStdRootForced r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_AddStdRootForced " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_AddStdRootForced ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_AddStdRootForced , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_AddStdRootForced ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_AddStdRootForced , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_AddStdRootForced ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_GetDcAddress ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_GetDcAddress r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_GetDcAddress " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_GetDcAddress ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_GetDcAddress , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_GetDcAddress ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_GetDcAddress , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_GetDcAddress ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_SetDcAddress ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_SetDcAddress r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_SetDcAddress " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_SetDcAddress ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_SetDcAddress , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_SetDcAddress ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_SetDcAddress , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_SetDcAddress ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_FlushFtTable ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_FlushFtTable r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_FlushFtTable " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_FlushFtTable ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_FlushFtTable , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_FlushFtTable ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_FlushFtTable , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_FlushFtTable ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_Add2 ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_Add2 r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_Add2 " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_Add2 ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_Add2 , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_Add2 ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_Add2 , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_Add2 ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_Remove2 ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_Remove2 r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_Remove2 " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_Remove2 ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_Remove2 , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_Remove2 ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_Remove2 , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_Remove2 ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_EnumEx ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_EnumEx r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_EnumEx " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_EnumEx ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_EnumEx , & r ) ;
2006-09-19 22:22:57 +00:00
ZERO_STRUCT ( r . out ) ;
2006-09-13 16:28:25 +00:00
r . out . info = r . in . info ;
r . out . total = r . in . total ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_EnumEx ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_EnumEx , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_EnumEx ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
static BOOL api_dfs_SetInfo2 ( pipes_struct * p )
{
struct ndr_pull * pull ;
struct ndr_push * push ;
NTSTATUS status ;
DATA_BLOB blob ;
struct dfs_SetInfo2 r ;
TALLOC_CTX * mem_ctx = talloc_init ( " api_dfs_SetInfo2 " ) ;
if ( ! prs_data_blob ( & p - > in_data . data , & blob , mem_ctx ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
pull = ndr_pull_init_blob ( & blob , mem_ctx ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
talloc_free ( mem_ctx ) ;
2006-09-13 16:28:25 +00:00
return False ;
2006-10-10 07:55:46 +00:00
}
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
status = ndr_pull_dfs_SetInfo2 ( pull , NDR_IN , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_IN_DEBUG ( dfs_SetInfo2 , & r ) ;
2007-01-18 10:18:59 +00:00
r . out . result = _dfs_SetInfo2 ( p , & r ) ;
2006-09-13 16:28:25 +00:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
talloc_free ( mem_ctx ) ;
/* Return True here, srv_pipe_hnd.c will take care */
return True ;
}
2006-09-19 22:39:15 +00:00
if ( DEBUGLEVEL > = 10 )
NDR_PRINT_OUT_DEBUG ( dfs_SetInfo2 , & r ) ;
2006-09-13 16:28:25 +00:00
push = ndr_push_init_ctx ( mem_ctx ) ;
if ( push = = NULL ) {
talloc_free ( mem_ctx ) ;
return False ;
}
status = ndr_push_dfs_SetInfo2 ( push , NDR_OUT , & r ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
talloc_free ( mem_ctx ) ;
return False ;
}
blob = ndr_push_blob ( push ) ;
2006-10-10 07:55:46 +00:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32 ) blob . length ) ) {
2006-09-13 16:28:25 +00:00
talloc_free ( mem_ctx ) ;
return False ;
}
talloc_free ( mem_ctx ) ;
return True ;
}
/* Tables */
static struct api_struct api_netdfs_cmds [ ] =
{
{ " DFS_GETMANAGERVERSION " , DCERPC_DFS_GETMANAGERVERSION , api_dfs_GetManagerVersion } ,
{ " DFS_ADD " , DCERPC_DFS_ADD , api_dfs_Add } ,
{ " DFS_REMOVE " , DCERPC_DFS_REMOVE , api_dfs_Remove } ,
{ " DFS_SETINFO " , DCERPC_DFS_SETINFO , api_dfs_SetInfo } ,
{ " DFS_GETINFO " , DCERPC_DFS_GETINFO , api_dfs_GetInfo } ,
{ " DFS_ENUM " , DCERPC_DFS_ENUM , api_dfs_Enum } ,
{ " DFS_RENAME " , DCERPC_DFS_RENAME , api_dfs_Rename } ,
{ " DFS_MOVE " , DCERPC_DFS_MOVE , api_dfs_Move } ,
{ " DFS_MANAGERGETCONFIGINFO " , DCERPC_DFS_MANAGERGETCONFIGINFO , api_dfs_ManagerGetConfigInfo } ,
{ " DFS_MANAGERSENDSITEINFO " , DCERPC_DFS_MANAGERSENDSITEINFO , api_dfs_ManagerSendSiteInfo } ,
{ " DFS_ADDFTROOT " , DCERPC_DFS_ADDFTROOT , api_dfs_AddFtRoot } ,
{ " DFS_REMOVEFTROOT " , DCERPC_DFS_REMOVEFTROOT , api_dfs_RemoveFtRoot } ,
{ " DFS_ADDSTDROOT " , DCERPC_DFS_ADDSTDROOT , api_dfs_AddStdRoot } ,
{ " DFS_REMOVESTDROOT " , DCERPC_DFS_REMOVESTDROOT , api_dfs_RemoveStdRoot } ,
{ " DFS_MANAGERINITIALIZE " , DCERPC_DFS_MANAGERINITIALIZE , api_dfs_ManagerInitialize } ,
{ " DFS_ADDSTDROOTFORCED " , DCERPC_DFS_ADDSTDROOTFORCED , api_dfs_AddStdRootForced } ,
{ " DFS_GETDCADDRESS " , DCERPC_DFS_GETDCADDRESS , api_dfs_GetDcAddress } ,
{ " DFS_SETDCADDRESS " , DCERPC_DFS_SETDCADDRESS , api_dfs_SetDcAddress } ,
{ " DFS_FLUSHFTTABLE " , DCERPC_DFS_FLUSHFTTABLE , api_dfs_FlushFtTable } ,
{ " DFS_ADD2 " , DCERPC_DFS_ADD2 , api_dfs_Add2 } ,
{ " DFS_REMOVE2 " , DCERPC_DFS_REMOVE2 , api_dfs_Remove2 } ,
{ " DFS_ENUMEX " , DCERPC_DFS_ENUMEX , api_dfs_EnumEx } ,
{ " DFS_SETINFO2 " , DCERPC_DFS_SETINFO2 , api_dfs_SetInfo2 } ,
} ;
void netdfs_get_pipe_fns ( struct api_struct * * fns , int * n_fns )
{
* fns = api_netdfs_cmds ;
* n_fns = sizeof ( api_netdfs_cmds ) / sizeof ( struct api_struct ) ;
}
NTSTATUS rpc_netdfs_init ( void )
{
return rpc_pipe_register_commands ( SMB_RPC_INTERFACE_VERSION , " netdfs " , " netdfs " , api_netdfs_cmds , sizeof ( api_netdfs_cmds ) / sizeof ( struct api_struct ) ) ;
}