2006-09-18 23:46:11 +04:00
/*
* Unix SMB / CIFS implementation .
* server auto - generated by pidl . DO NOT MODIFY !
*/
# include "includes.h"
# include "librpc/gen_ndr/srv_eventlog.h"
2007-10-19 04:40:25 +04:00
static bool api_eventlog_ClearEventLogW ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_ClearEventLogW * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_CLEAREVENTLOGW ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_ClearEventLogW ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_ClearEventLogW , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_ClearEventLogW ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_ClearEventLogW , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_BackupEventLogW ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_BackupEventLogW * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_BACKUPEVENTLOGW ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_BackupEventLogW ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_BackupEventLogW , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_BackupEventLogW ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_BackupEventLogW , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_CloseEventLog ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_CloseEventLog * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_CLOSEEVENTLOG ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_CloseEventLog ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_CloseEventLog , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . handle = r - > in . handle ;
r - > out . result = _eventlog_CloseEventLog ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_CloseEventLog , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_DeregisterEventSource ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_DeregisterEventSource * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_DEREGISTEREVENTSOURCE ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_DeregisterEventSource ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_DeregisterEventSource , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_DeregisterEventSource ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_DeregisterEventSource , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_GetNumRecords ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_GetNumRecords * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_GETNUMRECORDS ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_GetNumRecords ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_GetNumRecords , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . number = talloc_zero ( r , uint32_t ) ;
if ( r - > out . number = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_GetNumRecords ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_GetNumRecords , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_GetOldestRecord ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_GetOldestRecord * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_GETOLDESTRECORD ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_GetOldestRecord ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_GetOldestRecord , r ) ;
2008-01-09 14:28:44 +03:00
}
2008-02-04 12:44:00 +03:00
ZERO_STRUCT ( r - > out ) ;
r - > out . oldest_entry = talloc_zero ( r , uint32_t ) ;
if ( r - > out . oldest_entry = = NULL ) {
talloc_free ( r ) ;
return false ;
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_GetOldestRecord ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_GetOldestRecord , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_ChangeNotify ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_ChangeNotify * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_CHANGENOTIFY ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_ChangeNotify ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_ChangeNotify , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_ChangeNotify ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_ChangeNotify , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_OpenEventLogW ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_OpenEventLogW * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_OPENEVENTLOGW ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_OpenEventLogW ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_OpenEventLogW , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . handle = talloc_zero ( r , struct policy_handle ) ;
if ( r - > out . handle = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_OpenEventLogW ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_OpenEventLogW , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_RegisterEventSourceW ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_RegisterEventSourceW * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_REGISTEREVENTSOURCEW ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_RegisterEventSourceW ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_RegisterEventSourceW , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_RegisterEventSourceW ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_RegisterEventSourceW , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_OpenBackupEventLogW ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_OpenBackupEventLogW * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_OPENBACKUPEVENTLOGW ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_OpenBackupEventLogW ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_OpenBackupEventLogW , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_OpenBackupEventLogW ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_OpenBackupEventLogW , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_ReadEventLogW ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_ReadEventLogW * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_READEVENTLOGW ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_ReadEventLogW ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_ReadEventLogW , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
ZERO_STRUCT ( r - > out ) ;
r - > out . data = talloc_zero_array ( r , uint8_t , r - > in . number_of_bytes ) ;
if ( r - > out . data = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . sent_size = talloc_zero ( r , uint32_t ) ;
if ( r - > out . sent_size = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . real_size = talloc_zero ( r , uint32_t ) ;
if ( r - > out . real_size = = NULL ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_ReadEventLogW ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_ReadEventLogW , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_ReportEventW ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_ReportEventW * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_REPORTEVENTW ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_ReportEventW ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_ReportEventW , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_ReportEventW ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_ReportEventW , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_ClearEventLogA ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_ClearEventLogA * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_CLEAREVENTLOGA ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_ClearEventLogA ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_ClearEventLogA , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_ClearEventLogA ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_ClearEventLogA , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_BackupEventLogA ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_BackupEventLogA * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_BACKUPEVENTLOGA ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_BackupEventLogA ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_BackupEventLogA , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_BackupEventLogA ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_BackupEventLogA , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_OpenEventLogA ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_OpenEventLogA * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_OPENEVENTLOGA ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_OpenEventLogA ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_OpenEventLogA , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_OpenEventLogA ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_OpenEventLogA , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_RegisterEventSourceA ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_RegisterEventSourceA * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_REGISTEREVENTSOURCEA ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_RegisterEventSourceA ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_RegisterEventSourceA , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_RegisterEventSourceA ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_RegisterEventSourceA , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_OpenBackupEventLogA ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_OpenBackupEventLogA * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_OPENBACKUPEVENTLOGA ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_OpenBackupEventLogA ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_OpenBackupEventLogA , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_OpenBackupEventLogA ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_OpenBackupEventLogA , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_ReadEventLogA ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_ReadEventLogA * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_READEVENTLOGA ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_ReadEventLogA ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_ReadEventLogA , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_ReadEventLogA ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_ReadEventLogA , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_ReportEventA ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_ReportEventA * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_REPORTEVENTA ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_ReportEventA ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_ReportEventA , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_ReportEventA ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_ReportEventA , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_RegisterClusterSvc ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_RegisterClusterSvc * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_REGISTERCLUSTERSVC ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_RegisterClusterSvc ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_RegisterClusterSvc , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_RegisterClusterSvc ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_RegisterClusterSvc , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_DeregisterClusterSvc ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_DeregisterClusterSvc * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_DEREGISTERCLUSTERSVC ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_DeregisterClusterSvc ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_DeregisterClusterSvc , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_DeregisterClusterSvc ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_DeregisterClusterSvc , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_WriteClusterEvents ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_WriteClusterEvents * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_WRITECLUSTEREVENTS ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_WriteClusterEvents ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_WriteClusterEvents , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_WriteClusterEvents ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_WriteClusterEvents , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_GetLogIntormation ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_GetLogIntormation * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_GETLOGINTORMATION ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_GetLogIntormation ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_GetLogIntormation , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_GetLogIntormation ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_GetLogIntormation , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
2007-10-19 04:40:25 +04:00
static bool api_eventlog_FlushEventLog ( pipes_struct * p )
2006-09-18 23:46:11 +04:00
{
2007-08-21 18:06:46 +04:00
const struct ndr_interface_call * call ;
2006-09-18 23:46:11 +04:00
struct ndr_pull * pull ;
struct ndr_push * push ;
2007-11-09 16:38:47 +03:00
enum ndr_err_code ndr_err ;
2006-09-18 23:46:11 +04:00
DATA_BLOB blob ;
2007-08-21 18:06:46 +04:00
struct eventlog_FlushEventLog * r ;
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
call = & ndr_table_eventlog . calls [ NDR_EVENTLOG_FLUSHEVENTLOG ] ;
2008-01-09 14:28:44 +03:00
2008-02-11 11:15:30 +03:00
r = talloc ( talloc_tos ( ) , struct eventlog_FlushEventLog ) ;
2007-08-21 18:06:46 +04:00
if ( r = = NULL ) {
2008-01-09 14:28:44 +03:00
return false ;
2007-08-21 18:06:46 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
if ( ! prs_data_blob ( & p - > in_data . data , & blob , r ) ) {
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
pull = ndr_pull_init_blob ( & blob , r ) ;
2006-10-10 11:55:46 +04:00
if ( pull = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
pull - > flags | = LIBNDR_FLAG_REF_ALLOC ;
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_pull ( pull , NDR_IN , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_IN_DEBUG ( eventlog_FlushEventLog , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
r - > out . result = _eventlog_FlushEventLog ( p , r ) ;
2008-01-09 14:28:44 +03:00
2006-10-10 11:55:46 +04:00
if ( p - > rng_fault_state ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
/* Return true here, srv_pipe_hnd.c will take care */
return true ;
2006-10-10 11:55:46 +04:00
}
2008-01-09 14:28:44 +03:00
if ( DEBUGLEVEL > = 10 ) {
2007-08-21 18:06:46 +04:00
NDR_PRINT_OUT_DEBUG ( eventlog_FlushEventLog , r ) ;
2008-01-09 14:28:44 +03:00
}
2007-08-21 18:06:46 +04:00
push = ndr_push_init_ctx ( r ) ;
2006-09-18 23:46:11 +04:00
if ( push = = NULL ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-11-09 16:38:47 +03:00
ndr_err = call - > ndr_push ( push , NDR_OUT , r ) ;
if ( ! NDR_ERR_CODE_IS_SUCCESS ( ndr_err ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2006-09-18 23:46:11 +04:00
blob = ndr_push_blob ( push ) ;
2008-01-09 14:28:44 +03:00
if ( ! prs_copy_data_in ( & p - > out_data . rdata , ( const char * ) blob . data , ( uint32_t ) blob . length ) ) {
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return false ;
2006-09-18 23:46:11 +04:00
}
2008-01-09 14:28:44 +03:00
2007-08-21 18:06:46 +04:00
talloc_free ( r ) ;
2008-01-09 14:28:44 +03:00
return true ;
2006-09-18 23:46:11 +04:00
}
/* Tables */
static struct api_struct api_eventlog_cmds [ ] =
{
2007-08-20 02:10:11 +04:00
{ " EVENTLOG_CLEAREVENTLOGW " , NDR_EVENTLOG_CLEAREVENTLOGW , api_eventlog_ClearEventLogW } ,
{ " EVENTLOG_BACKUPEVENTLOGW " , NDR_EVENTLOG_BACKUPEVENTLOGW , api_eventlog_BackupEventLogW } ,
{ " EVENTLOG_CLOSEEVENTLOG " , NDR_EVENTLOG_CLOSEEVENTLOG , api_eventlog_CloseEventLog } ,
{ " EVENTLOG_DEREGISTEREVENTSOURCE " , NDR_EVENTLOG_DEREGISTEREVENTSOURCE , api_eventlog_DeregisterEventSource } ,
{ " EVENTLOG_GETNUMRECORDS " , NDR_EVENTLOG_GETNUMRECORDS , api_eventlog_GetNumRecords } ,
{ " EVENTLOG_GETOLDESTRECORD " , NDR_EVENTLOG_GETOLDESTRECORD , api_eventlog_GetOldestRecord } ,
{ " EVENTLOG_CHANGENOTIFY " , NDR_EVENTLOG_CHANGENOTIFY , api_eventlog_ChangeNotify } ,
{ " EVENTLOG_OPENEVENTLOGW " , NDR_EVENTLOG_OPENEVENTLOGW , api_eventlog_OpenEventLogW } ,
{ " EVENTLOG_REGISTEREVENTSOURCEW " , NDR_EVENTLOG_REGISTEREVENTSOURCEW , api_eventlog_RegisterEventSourceW } ,
{ " EVENTLOG_OPENBACKUPEVENTLOGW " , NDR_EVENTLOG_OPENBACKUPEVENTLOGW , api_eventlog_OpenBackupEventLogW } ,
{ " EVENTLOG_READEVENTLOGW " , NDR_EVENTLOG_READEVENTLOGW , api_eventlog_ReadEventLogW } ,
{ " EVENTLOG_REPORTEVENTW " , NDR_EVENTLOG_REPORTEVENTW , api_eventlog_ReportEventW } ,
{ " EVENTLOG_CLEAREVENTLOGA " , NDR_EVENTLOG_CLEAREVENTLOGA , api_eventlog_ClearEventLogA } ,
{ " EVENTLOG_BACKUPEVENTLOGA " , NDR_EVENTLOG_BACKUPEVENTLOGA , api_eventlog_BackupEventLogA } ,
{ " EVENTLOG_OPENEVENTLOGA " , NDR_EVENTLOG_OPENEVENTLOGA , api_eventlog_OpenEventLogA } ,
{ " EVENTLOG_REGISTEREVENTSOURCEA " , NDR_EVENTLOG_REGISTEREVENTSOURCEA , api_eventlog_RegisterEventSourceA } ,
{ " EVENTLOG_OPENBACKUPEVENTLOGA " , NDR_EVENTLOG_OPENBACKUPEVENTLOGA , api_eventlog_OpenBackupEventLogA } ,
{ " EVENTLOG_READEVENTLOGA " , NDR_EVENTLOG_READEVENTLOGA , api_eventlog_ReadEventLogA } ,
{ " EVENTLOG_REPORTEVENTA " , NDR_EVENTLOG_REPORTEVENTA , api_eventlog_ReportEventA } ,
{ " EVENTLOG_REGISTERCLUSTERSVC " , NDR_EVENTLOG_REGISTERCLUSTERSVC , api_eventlog_RegisterClusterSvc } ,
{ " EVENTLOG_DEREGISTERCLUSTERSVC " , NDR_EVENTLOG_DEREGISTERCLUSTERSVC , api_eventlog_DeregisterClusterSvc } ,
{ " EVENTLOG_WRITECLUSTEREVENTS " , NDR_EVENTLOG_WRITECLUSTEREVENTS , api_eventlog_WriteClusterEvents } ,
{ " EVENTLOG_GETLOGINTORMATION " , NDR_EVENTLOG_GETLOGINTORMATION , api_eventlog_GetLogIntormation } ,
{ " EVENTLOG_FLUSHEVENTLOG " , NDR_EVENTLOG_FLUSHEVENTLOG , api_eventlog_FlushEventLog } ,
2006-09-18 23:46:11 +04:00
} ;
void eventlog_get_pipe_fns ( struct api_struct * * fns , int * n_fns )
{
* fns = api_eventlog_cmds ;
* n_fns = sizeof ( api_eventlog_cmds ) / sizeof ( struct api_struct ) ;
}
NTSTATUS rpc_eventlog_init ( void )
{
return rpc_pipe_register_commands ( SMB_RPC_INTERFACE_VERSION , " eventlog " , " eventlog " , api_eventlog_cmds , sizeof ( api_eventlog_cmds ) / sizeof ( struct api_struct ) ) ;
}