[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha7-996-gbcd042e
Günther Deschner
gd at samba.org
Fri Apr 10 11:15:49 GMT 2009
The branch, master has been updated
via bcd042e595d63eae8cfc9e9d51e9567a4f9ccc63 (commit)
via 9b585a1282a9211ae101072361aead86d123045e (commit)
via 2b0293d42b3daecbe41c760a1ea41235d24105d3 (commit)
via 7f74f27d6c60d46b51372a2d5c289788038daeb5 (commit)
from 7f10bf980edef3ace1522d0c9c082b35e225c950 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit bcd042e595d63eae8cfc9e9d51e9567a4f9ccc63
Author: Günther Deschner <gd at samba.org>
Date: Wed Apr 8 18:32:06 2009 +0200
s3-eventlog: implement _eventlog_FlushEventLog().
Guenther
commit 9b585a1282a9211ae101072361aead86d123045e
Author: Günther Deschner <gd at samba.org>
Date: Wed Apr 8 18:31:32 2009 +0200
s3-eventlog: implement _eventlog_GetLogInformation().
Guenther
commit 2b0293d42b3daecbe41c760a1ea41235d24105d3
Author: Günther Deschner <gd at samba.org>
Date: Wed Apr 8 20:34:24 2009 +0200
s3: re-run make samba3-idl.
Guenther
commit 7f74f27d6c60d46b51372a2d5c289788038daeb5
Author: Günther Deschner <gd at samba.org>
Date: Wed Apr 8 20:33:58 2009 +0200
eventlog: make EVENTLOG_FULL_INFORMATION a public struct.
Guenther
-----------------------------------------------------------------------
Summary of changes:
librpc/gen_ndr/eventlog.h | 2 +-
librpc/gen_ndr/ndr_eventlog.c | 30 ++++++++++++++
librpc/gen_ndr/ndr_eventlog.h | 3 +
librpc/idl/eventlog.idl | 2 +-
source3/rpc_server/srv_eventlog_nt.c | 71 ++++++++++++++++++++++++++++------
5 files changed, 94 insertions(+), 14 deletions(-)
Changeset truncated at 500 lines:
diff --git a/librpc/gen_ndr/eventlog.h b/librpc/gen_ndr/eventlog.h
index b6e792f..3895017 100644
--- a/librpc/gen_ndr/eventlog.h
+++ b/librpc/gen_ndr/eventlog.h
@@ -149,7 +149,7 @@ struct EVENTLOG_EVT_FILE {
struct EVENTLOG_FULL_INFORMATION {
uint32_t full;
-};
+}/* [public] */;
struct eventlog_ClearEventLogW {
diff --git a/librpc/gen_ndr/ndr_eventlog.c b/librpc/gen_ndr/ndr_eventlog.c
index 3f19902..33d27db 100644
--- a/librpc/gen_ndr/ndr_eventlog.c
+++ b/librpc/gen_ndr/ndr_eventlog.c
@@ -682,6 +682,36 @@ _PUBLIC_ void ndr_print_EVENTLOG_EVT_FILE(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
+_PUBLIC_ enum ndr_err_code ndr_push_EVENTLOG_FULL_INFORMATION(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOG_FULL_INFORMATION *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->full));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOG_FULL_INFORMATION(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOG_FULL_INFORMATION *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->full));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_EVENTLOG_FULL_INFORMATION(struct ndr_print *ndr, const char *name, const struct EVENTLOG_FULL_INFORMATION *r)
+{
+ ndr_print_struct(ndr, name, "EVENTLOG_FULL_INFORMATION");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "full", r->full);
+ ndr->depth--;
+}
+
static enum ndr_err_code ndr_push_eventlog_ClearEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogW *r)
{
if (flags & NDR_IN) {
diff --git a/librpc/gen_ndr/ndr_eventlog.h b/librpc/gen_ndr/ndr_eventlog.h
index 39f5f1b..6f0d2e0 100644
--- a/librpc/gen_ndr/ndr_eventlog.h
+++ b/librpc/gen_ndr/ndr_eventlog.h
@@ -84,6 +84,9 @@ void ndr_print_EVENTLOGEOF(struct ndr_print *ndr, const char *name, const struct
enum ndr_err_code ndr_push_EVENTLOG_EVT_FILE(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOG_EVT_FILE *r);
enum ndr_err_code ndr_pull_EVENTLOG_EVT_FILE(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOG_EVT_FILE *r);
void ndr_print_EVENTLOG_EVT_FILE(struct ndr_print *ndr, const char *name, const struct EVENTLOG_EVT_FILE *r);
+enum ndr_err_code ndr_push_EVENTLOG_FULL_INFORMATION(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOG_FULL_INFORMATION *r);
+enum ndr_err_code ndr_pull_EVENTLOG_FULL_INFORMATION(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOG_FULL_INFORMATION *r);
+void ndr_print_EVENTLOG_FULL_INFORMATION(struct ndr_print *ndr, const char *name, const struct EVENTLOG_FULL_INFORMATION *r);
void ndr_print_eventlog_ClearEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogW *r);
void ndr_print_eventlog_BackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogW *r);
void ndr_print_eventlog_CloseEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_CloseEventLog *r);
diff --git a/librpc/idl/eventlog.idl b/librpc/idl/eventlog.idl
index 6b46ace..e269467 100644
--- a/librpc/idl/eventlog.idl
+++ b/librpc/idl/eventlog.idl
@@ -284,7 +284,7 @@ import "lsa.idl", "security.idl";
/*****************/
/* Function 0x16 */
- typedef struct {
+ typedef [public] struct {
boolean32 full;
} EVENTLOG_FULL_INFORMATION;
diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c
index cf07d97..7143ad6 100644
--- a/source3/rpc_server/srv_eventlog_nt.c
+++ b/source3/rpc_server/srv_eventlog_nt.c
@@ -616,6 +616,65 @@ NTSTATUS _eventlog_BackupEventLogW(pipes_struct *p, struct eventlog_BackupEventL
return NT_STATUS_NOT_IMPLEMENTED;
}
+/********************************************************************
+_eventlog_GetLogInformation
+ ********************************************************************/
+
+NTSTATUS _eventlog_GetLogInformation(pipes_struct *p,
+ struct eventlog_GetLogInformation *r)
+{
+ EVENTLOG_INFO *info = find_eventlog_info_by_hnd(p, r->in.handle);
+ struct EVENTLOG_FULL_INFORMATION f;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+
+ if (!info) {
+ return NT_STATUS_INVALID_HANDLE;
+ }
+
+ if (r->in.level != 0) {
+ return NT_STATUS_INVALID_LEVEL;
+ }
+
+ *r->out.bytes_needed = 4;
+
+ if (r->in.buf_size < 4) {
+ return NT_STATUS_BUFFER_TOO_SMALL;
+ }
+
+ /* FIXME: this should be retrieved from the handle */
+ f.full = false;
+
+ ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, NULL, &f,
+ (ndr_push_flags_fn_t)ndr_push_EVENTLOG_FULL_INFORMATION);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ return ndr_map_error2ntstatus(ndr_err);
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_DEBUG(EVENTLOG_FULL_INFORMATION, &f);
+ }
+
+ memcpy(r->out.buffer, blob.data, 4);
+
+ return NT_STATUS_OK;
+}
+
+/********************************************************************
+_eventlog_FlushEventLog
+ ********************************************************************/
+
+NTSTATUS _eventlog_FlushEventLog(pipes_struct *p,
+ struct eventlog_FlushEventLog *r)
+{
+ EVENTLOG_INFO *info = find_eventlog_info_by_hnd(p, r->in.handle);
+ if (!info) {
+ return NT_STATUS_INVALID_HANDLE;
+ }
+
+ return NT_STATUS_ACCESS_DENIED;
+}
+
NTSTATUS _eventlog_DeregisterEventSource(pipes_struct *p, struct eventlog_DeregisterEventSource *r)
{
p->rng_fault_state = True;
@@ -706,18 +765,6 @@ NTSTATUS _eventlog_WriteClusterEvents(pipes_struct *p, struct eventlog_WriteClus
return NT_STATUS_NOT_IMPLEMENTED;
}
-NTSTATUS _eventlog_GetLogInformation(pipes_struct *p, struct eventlog_GetLogInformation *r)
-{
- p->rng_fault_state = True;
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
-NTSTATUS _eventlog_FlushEventLog(pipes_struct *p, struct eventlog_FlushEventLog *r)
-{
- p->rng_fault_state = True;
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
NTSTATUS _eventlog_ReportEventAndSourceW(pipes_struct *p, struct eventlog_ReportEventAndSourceW *r)
{
p->rng_fault_state = True;
--
Samba Shared Repository
More information about the samba-cvs
mailing list