2006-09-13 16:28:25 +00:00
/*
* Unix SMB / CIFS implementation .
* server auto - generated by pidl . DO NOT MODIFY !
*/
# include "includes.h"
2008-12-16 16:32:18 +01:00
# include "../librpc/gen_ndr/srv_dfs.h"
2006-09-13 16:28:25 +00:00
2007-10-18 17:40:25 -07:00
static bool api_dfs_GetManagerVersion ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_GetManagerVersion * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_GETMANAGERVERSION ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_GetManagerVersion ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_GetManagerVersion , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
ZERO_STRUCT ( r - > out ) ;
r - > out . version = talloc_zero ( r , enum dfs_ManagerVersion ) ;
if ( r - > out . version = = NULL ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-14 14:51:16 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
_dfs_GetManagerVersion ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_GetManagerVersion , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_Add ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_Add * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_ADD ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_Add ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_Add , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_Add ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_Add , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_Remove ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_Remove * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_REMOVE ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_Remove ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_Remove , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_Remove ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_Remove , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_SetInfo ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_SetInfo * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_SETINFO ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_SetInfo ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_SetInfo , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_SetInfo ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_SetInfo , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_GetInfo ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_GetInfo * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_GETINFO ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_GetInfo ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_GetInfo , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( r , union dfs_Info ) ;
if ( r - > out . info = = NULL ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-14 14:51:16 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_GetInfo ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_GetInfo , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_Enum ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_Enum * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_ENUM ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_Enum ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_Enum , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = r - > in . info ;
r - > out . total = r - > in . total ;
r - > out . result = _dfs_Enum ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_Enum , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_Rename ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_Rename * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_RENAME ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_Rename ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_Rename , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_Rename ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_Rename , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_Move ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_Move * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_MOVE ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_Move ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_Move , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_Move ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_Move , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_ManagerGetConfigInfo ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_ManagerGetConfigInfo * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_MANAGERGETCONFIGINFO ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_ManagerGetConfigInfo ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_ManagerGetConfigInfo , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_ManagerGetConfigInfo ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_ManagerGetConfigInfo , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_ManagerSendSiteInfo ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_ManagerSendSiteInfo * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_MANAGERSENDSITEINFO ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_ManagerSendSiteInfo ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_ManagerSendSiteInfo , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_ManagerSendSiteInfo ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_ManagerSendSiteInfo , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_AddFtRoot ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_AddFtRoot * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_ADDFTROOT ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_AddFtRoot ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_AddFtRoot , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
ZERO_STRUCT ( r - > out ) ;
r - > out . unknown2 = r - > in . unknown2 ;
r - > out . result = _dfs_AddFtRoot ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_AddFtRoot , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_RemoveFtRoot ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_RemoveFtRoot * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_REMOVEFTROOT ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_RemoveFtRoot ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_RemoveFtRoot , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
ZERO_STRUCT ( r - > out ) ;
r - > out . unknown = r - > in . unknown ;
r - > out . result = _dfs_RemoveFtRoot ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_RemoveFtRoot , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_AddStdRoot ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_AddStdRoot * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_ADDSTDROOT ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_AddStdRoot ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_AddStdRoot , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_AddStdRoot ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_AddStdRoot , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_RemoveStdRoot ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_RemoveStdRoot * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_REMOVESTDROOT ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_RemoveStdRoot ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_RemoveStdRoot , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_RemoveStdRoot ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_RemoveStdRoot , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_ManagerInitialize ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_ManagerInitialize * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_MANAGERINITIALIZE ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_ManagerInitialize ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_ManagerInitialize , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_ManagerInitialize ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_ManagerInitialize , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_AddStdRootForced ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_AddStdRootForced * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_ADDSTDROOTFORCED ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_AddStdRootForced ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_AddStdRootForced , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_AddStdRootForced ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_AddStdRootForced , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_GetDcAddress ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_GetDcAddress * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_GETDCADDRESS ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_GetDcAddress ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_GetDcAddress , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-01-17 13:00:12 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . server_fullname = r - > in . server_fullname ;
r - > out . is_root = r - > in . is_root ;
r - > out . ttl = r - > in . ttl ;
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_GetDcAddress ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_GetDcAddress , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_SetDcAddress ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_SetDcAddress * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_SETDCADDRESS ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_SetDcAddress ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_SetDcAddress , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_SetDcAddress ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_SetDcAddress , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_FlushFtTable ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_FlushFtTable * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_FLUSHFTTABLE ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_FlushFtTable ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_FlushFtTable , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_FlushFtTable ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_FlushFtTable , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_Add2 ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_Add2 * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_ADD2 ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_Add2 ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_Add2 , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_Add2 ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_Add2 , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_Remove2 ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_Remove2 * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_REMOVE2 ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_Remove2 ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_Remove2 , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_Remove2 ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_Remove2 , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_EnumEx ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_EnumEx * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_ENUMEX ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_EnumEx ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_EnumEx , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = r - > in . info ;
r - > out . total = r - > in . total ;
r - > out . result = _dfs_EnumEx ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_EnumEx , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
2007-10-18 17:40:25 -07:00
static bool api_dfs_SetInfo2 ( pipes_struct * p )
2006-09-13 16:28:25 +00:00
{
2007-08-21 14:06:46 +00:00
const struct ndr_interface_call * call ;
2006-09-13 16:28:25 +00:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 14:38:47 +01:00
enum ndr_err_code ndr_err ;
2006-09-13 16:28:25 +00:00
DATA_BLOB blob ;
2007-08-21 14:06:46 +00:00
struct dfs_SetInfo2 * r ;
2008-01-09 12:28:44 +01:00
2009-11-08 19:37:42 +01:00
call = & ndr_table_netdfs . calls [ NDR_DFS_SETINFO2 ] ;
2008-01-09 12:28:44 +01:00
2008-02-11 09:15:30 +01:00
r = talloc ( talloc_tos ( ) , struct dfs_SetInfo2 ) ;
2007-08-21 14:06:46 +00:00
if ( r = = NULL ) {
2008-01-09 12:28:44 +01:00
return false ;
2007-08-21 14:06:46 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2008-09-23 20:59:30 +02:00
pull = ndr_pull_init_blob ( & blob , r , NULL ) ;
2006-10-10 07:55:46 +00:00
if ( pull = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_IN_DEBUG ( dfs_SetInfo2 , r ) ;
2008-01-09 12:28:44 +01:00
}
2007-08-21 14:06:46 +00:00
r - > out . result = _dfs_SetInfo2 ( p , r ) ;
2008-01-09 12:28:44 +01:00
2006-10-10 07:55:46 +00:00
if ( p - > rng_fault_state ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 07:55:46 +00:00
}
2008-01-09 12:28:44 +01:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 14:06:46 +00:00
NDR_PRINT_OUT_DEBUG ( dfs_SetInfo2 , r ) ;
2008-01-09 12:28:44 +01:00
}
2008-10-12 19:05:46 +02:00
push = ndr_push_init_ctx ( r , NULL ) ;
2006-09-13 16:28:25 +00:00
if ( push = = NULL ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-11-09 14:38:47 +01:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2006-09-13 16:28:25 +00:00
blob = ndr_push_blob ( push ) ;
2008-01-09 12:28:44 +01:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return false ;
2006-09-13 16:28:25 +00:00
}
2008-01-09 12:28:44 +01:00
2007-08-21 14:06:46 +00:00
talloc_free ( r ) ;
2008-01-09 12:28:44 +01:00
return true ;
2006-09-13 16:28:25 +00:00
}
/* Tables */
static struct api_struct api_netdfs_cmds [ ] =
{
2007-08-19 22:10:11 +00:00
{ " DFS_GETMANAGERVERSION " , NDR_DFS_GETMANAGERVERSION , api_dfs_GetManagerVersion } ,
{ " DFS_ADD " , NDR_DFS_ADD , api_dfs_Add } ,
{ " DFS_REMOVE " , NDR_DFS_REMOVE , api_dfs_Remove } ,
{ " DFS_SETINFO " , NDR_DFS_SETINFO , api_dfs_SetInfo } ,
{ " DFS_GETINFO " , NDR_DFS_GETINFO , api_dfs_GetInfo } ,
{ " DFS_ENUM " , NDR_DFS_ENUM , api_dfs_Enum } ,
{ " DFS_RENAME " , NDR_DFS_RENAME , api_dfs_Rename } ,
{ " DFS_MOVE " , NDR_DFS_MOVE , api_dfs_Move } ,
{ " DFS_MANAGERGETCONFIGINFO " , NDR_DFS_MANAGERGETCONFIGINFO , api_dfs_ManagerGetConfigInfo } ,
{ " DFS_MANAGERSENDSITEINFO " , NDR_DFS_MANAGERSENDSITEINFO , api_dfs_ManagerSendSiteInfo } ,
{ " DFS_ADDFTROOT " , NDR_DFS_ADDFTROOT , api_dfs_AddFtRoot } ,
{ " DFS_REMOVEFTROOT " , NDR_DFS_REMOVEFTROOT , api_dfs_RemoveFtRoot } ,
{ " DFS_ADDSTDROOT " , NDR_DFS_ADDSTDROOT , api_dfs_AddStdRoot } ,
{ " DFS_REMOVESTDROOT " , NDR_DFS_REMOVESTDROOT , api_dfs_RemoveStdRoot } ,
{ " DFS_MANAGERINITIALIZE " , NDR_DFS_MANAGERINITIALIZE , api_dfs_ManagerInitialize } ,
{ " DFS_ADDSTDROOTFORCED " , NDR_DFS_ADDSTDROOTFORCED , api_dfs_AddStdRootForced } ,
{ " DFS_GETDCADDRESS " , NDR_DFS_GETDCADDRESS , api_dfs_GetDcAddress } ,
{ " DFS_SETDCADDRESS " , NDR_DFS_SETDCADDRESS , api_dfs_SetDcAddress } ,
{ " DFS_FLUSHFTTABLE " , NDR_DFS_FLUSHFTTABLE , api_dfs_FlushFtTable } ,
{ " DFS_ADD2 " , NDR_DFS_ADD2 , api_dfs_Add2 } ,
{ " DFS_REMOVE2 " , NDR_DFS_REMOVE2 , api_dfs_Remove2 } ,
{ " DFS_ENUMEX " , NDR_DFS_ENUMEX , api_dfs_EnumEx } ,
{ " DFS_SETINFO2 " , NDR_DFS_SETINFO2 , api_dfs_SetInfo2 } ,
2006-09-13 16:28:25 +00:00
} ;
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 ) ;
}
2009-11-08 19:38:01 +01:00
NTSTATUS rpc_netdfs_dispatch ( struct rpc_pipe_client * cli , TALLOC_CTX * mem_ctx , const struct ndr_interface_table * table , uint32_t opnum , void * _r )
2009-01-21 14:05:51 +01:00
{
if ( cli - > pipes_struct = = NULL ) {
return NT_STATUS_INVALID_PARAMETER ;
}
switch ( opnum )
{
case NDR_DFS_GETMANAGERVERSION : {
2009-01-22 01:19:38 +01:00
struct dfs_GetManagerVersion * r = ( struct dfs_GetManagerVersion * ) _r ;
2009-01-21 14:05:51 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . version = talloc_zero ( mem_ctx , enum dfs_ManagerVersion ) ;
if ( r - > out . version = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
_dfs_GetManagerVersion ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_ADD : {
2009-01-22 01:19:38 +01:00
struct dfs_Add * r = ( struct dfs_Add * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_Add ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_REMOVE : {
2009-01-22 01:19:38 +01:00
struct dfs_Remove * r = ( struct dfs_Remove * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_Remove ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_SETINFO : {
2009-01-22 01:19:38 +01:00
struct dfs_SetInfo * r = ( struct dfs_SetInfo * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_SetInfo ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_GETINFO : {
2009-01-22 01:19:38 +01:00
struct dfs_GetInfo * r = ( struct dfs_GetInfo * ) _r ;
2009-01-21 14:05:51 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = talloc_zero ( mem_ctx , union dfs_Info ) ;
if ( r - > out . info = = NULL ) {
return NT_STATUS_NO_MEMORY ;
}
r - > out . result = _dfs_GetInfo ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_ENUM : {
2009-01-22 01:19:38 +01:00
struct dfs_Enum * r = ( struct dfs_Enum * ) _r ;
2009-01-21 14:05:51 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = r - > in . info ;
r - > out . total = r - > in . total ;
r - > out . result = _dfs_Enum ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_RENAME : {
2009-01-22 01:19:38 +01:00
struct dfs_Rename * r = ( struct dfs_Rename * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_Rename ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_MOVE : {
2009-01-22 01:19:38 +01:00
struct dfs_Move * r = ( struct dfs_Move * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_Move ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_MANAGERGETCONFIGINFO : {
2009-01-22 01:19:38 +01:00
struct dfs_ManagerGetConfigInfo * r = ( struct dfs_ManagerGetConfigInfo * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_ManagerGetConfigInfo ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_MANAGERSENDSITEINFO : {
2009-01-22 01:19:38 +01:00
struct dfs_ManagerSendSiteInfo * r = ( struct dfs_ManagerSendSiteInfo * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_ManagerSendSiteInfo ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_ADDFTROOT : {
2009-01-22 01:19:38 +01:00
struct dfs_AddFtRoot * r = ( struct dfs_AddFtRoot * ) _r ;
2009-01-21 14:05:51 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . unknown2 = r - > in . unknown2 ;
r - > out . result = _dfs_AddFtRoot ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_REMOVEFTROOT : {
2009-01-22 01:19:38 +01:00
struct dfs_RemoveFtRoot * r = ( struct dfs_RemoveFtRoot * ) _r ;
2009-01-21 14:05:51 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . unknown = r - > in . unknown ;
r - > out . result = _dfs_RemoveFtRoot ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_ADDSTDROOT : {
2009-01-22 01:19:38 +01:00
struct dfs_AddStdRoot * r = ( struct dfs_AddStdRoot * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_AddStdRoot ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_REMOVESTDROOT : {
2009-01-22 01:19:38 +01:00
struct dfs_RemoveStdRoot * r = ( struct dfs_RemoveStdRoot * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_RemoveStdRoot ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_MANAGERINITIALIZE : {
2009-01-22 01:19:38 +01:00
struct dfs_ManagerInitialize * r = ( struct dfs_ManagerInitialize * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_ManagerInitialize ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_ADDSTDROOTFORCED : {
2009-01-22 01:19:38 +01:00
struct dfs_AddStdRootForced * r = ( struct dfs_AddStdRootForced * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_AddStdRootForced ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_GETDCADDRESS : {
2009-01-22 01:19:38 +01:00
struct dfs_GetDcAddress * r = ( struct dfs_GetDcAddress * ) _r ;
2009-01-21 14:05:51 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . server_fullname = r - > in . server_fullname ;
r - > out . is_root = r - > in . is_root ;
r - > out . ttl = r - > in . ttl ;
r - > out . result = _dfs_GetDcAddress ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_SETDCADDRESS : {
2009-01-22 01:19:38 +01:00
struct dfs_SetDcAddress * r = ( struct dfs_SetDcAddress * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_SetDcAddress ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_FLUSHFTTABLE : {
2009-01-22 01:19:38 +01:00
struct dfs_FlushFtTable * r = ( struct dfs_FlushFtTable * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_FlushFtTable ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_ADD2 : {
2009-01-22 01:19:38 +01:00
struct dfs_Add2 * r = ( struct dfs_Add2 * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_Add2 ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_REMOVE2 : {
2009-01-22 01:19:38 +01:00
struct dfs_Remove2 * r = ( struct dfs_Remove2 * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_Remove2 ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_ENUMEX : {
2009-01-22 01:19:38 +01:00
struct dfs_EnumEx * r = ( struct dfs_EnumEx * ) _r ;
2009-01-21 14:05:51 +01:00
ZERO_STRUCT ( r - > out ) ;
r - > out . info = r - > in . info ;
r - > out . total = r - > in . total ;
r - > out . result = _dfs_EnumEx ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
case NDR_DFS_SETINFO2 : {
2009-01-22 01:19:38 +01:00
struct dfs_SetInfo2 * r = ( struct dfs_SetInfo2 * ) _r ;
2009-01-21 14:05:51 +01:00
r - > out . result = _dfs_SetInfo2 ( cli - > pipes_struct , r ) ;
return NT_STATUS_OK ;
}
default :
return NT_STATUS_NOT_IMPLEMENTED ;
}
}
2006-09-13 16:28:25 +00:00
NTSTATUS rpc_netdfs_init ( void )
{
2009-11-08 19:37:33 +01:00
return rpc_srv_register ( SMB_RPC_INTERFACE_VERSION , " netdfs " , " netdfs " , & ndr_table_netdfs , api_netdfs_cmds , sizeof ( api_netdfs_cmds ) / sizeof ( struct api_struct ) ) ;
2006-09-13 16:28:25 +00:00
}