summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-04 10:53:59 +0100
committerGünther Deschner <gd@samba.org>2008-02-04 10:53:59 +0100
commit48d2990d8c9bfb0037ee2b5386271398ee1492be (patch)
tree44943cecabee4895292765155815483c3c24bf58 /source3/rpc_server
parent2432628b141607c6edc66974cfec178a4d842989 (diff)
downloadsamba-48d2990d8c9bfb0037ee2b5386271398ee1492be.tar.gz
samba-48d2990d8c9bfb0037ee2b5386271398ee1492be.tar.bz2
samba-48d2990d8c9bfb0037ee2b5386271398ee1492be.zip
Use pidl for _eventlog_ClearEventLogW().
Guenther (This used to be commit 70a4ba798cdd3b4daa01c2f6aa693de34288c8b9)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_eventlog.c22
-rw-r--r--source3/rpc_server/srv_eventlog_nt.c28
2 files changed, 9 insertions, 41 deletions
diff --git a/source3/rpc_server/srv_eventlog.c b/source3/rpc_server/srv_eventlog.c
index c64f97d9b5..38a9baa80d 100644
--- a/source3/rpc_server/srv_eventlog.c
+++ b/source3/rpc_server/srv_eventlog.c
@@ -107,27 +107,7 @@ static bool api_eventlog_read_eventlog(pipes_struct *p)
static bool api_eventlog_clear_eventlog(pipes_struct *p)
{
- EVENTLOG_Q_CLEAR_EVENTLOG q_u;
- EVENTLOG_R_CLEAR_EVENTLOG r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if (!(eventlog_io_q_clear_eventlog("", &q_u, data, 0))) {
- DEBUG(0, ("eventlog_io_q_clear_eventlog: unable to unmarshall EVENTLOG_Q_CLEAR_EVENTLOG.\n"));
- return False;
- }
-
- r_u.status = _eventlog_clear_eventlog(p, &q_u, &r_u);
-
- if (!(eventlog_io_r_clear_eventlog("", &r_u, rdata, 0))) {
- DEBUG(0, ("eventlog_io_q_clear_eventlog: unable to marshall EVENTLOG_Q_CLEAR_EVENTLOG.\n"));
- return False;
- }
-
- return True;
+ return proxy_eventlog_call(p, NDR_EVENTLOG_CLEAREVENTLOGW);
}
/*
diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c
index 423f3e55cb..9250c0fa4f 100644
--- a/source3/rpc_server/srv_eventlog_nt.c
+++ b/source3/rpc_server/srv_eventlog_nt.c
@@ -659,28 +659,22 @@ NTSTATUS _eventlog_open_eventlog( pipes_struct * p,
}
/********************************************************************
+ _eventlog_ClearEventLogW
This call still needs some work
********************************************************************/
-NTSTATUS _eventlog_clear_eventlog( pipes_struct * p,
- EVENTLOG_Q_CLEAR_EVENTLOG * q_u,
- EVENTLOG_R_CLEAR_EVENTLOG * r_u )
+NTSTATUS _eventlog_ClearEventLogW(pipes_struct *p,
+ struct eventlog_ClearEventLogW *r)
{
- EVENTLOG_INFO *info = find_eventlog_info_by_hnd( p, &q_u->handle );
- char *backup_file_name = NULL;
+ EVENTLOG_INFO *info = find_eventlog_info_by_hnd( p, r->in.handle );
+ const char *backup_file_name = NULL;
if ( !info )
return NT_STATUS_INVALID_HANDLE;
- if (q_u->backupfile.string) {
- size_t len = rpcstr_pull_talloc(p->mem_ctx,
- &backup_file_name,
- q_u->backupfile.string->buffer,
- q_u->backupfile.string->uni_str_len * 2,
- 0 );
- if (len == (size_t)-1 || !backup_file_name) {
- return NT_STATUS_INVALID_PARAMETER;
- }
+ if (r->in.backupfile && r->in.backupfile->string) {
+
+ backup_file_name = r->in.backupfile->string;
DEBUG(8,( "_eventlog_clear_eventlog: Using [%s] as the backup "
"file name for log [%s].",
@@ -852,12 +846,6 @@ NTSTATUS _eventlog_GetNumRecords(pipes_struct *p,
return NT_STATUS_OK;
}
-NTSTATUS _eventlog_ClearEventLogW(pipes_struct *p, struct eventlog_ClearEventLogW *r)
-{
- p->rng_fault_state = True;
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
NTSTATUS _eventlog_BackupEventLogW(pipes_struct *p, struct eventlog_BackupEventLogW *r)
{
p->rng_fault_state = True;