summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-06-28 12:51:28 +0200
committerGünther Deschner <gd@samba.org>2010-06-28 12:53:10 +0200
commitb6100fa72f2f7e42f49538117846c973e2154b00 (patch)
treec9fd402113dc99f38d145c58e459ec266334b34e /source3/rpc_server
parentc4d5cbbdc52504b950b082b8340e32735d48e92c (diff)
downloadsamba-b6100fa72f2f7e42f49538117846c973e2154b00.tar.gz
samba-b6100fa72f2f7e42f49538117846c973e2154b00.tar.bz2
samba-b6100fa72f2f7e42f49538117846c973e2154b00.zip
s3-eventlog: make sure _eventlog_OpenEventLogW fails when we cannot open the registry key.
Guenther
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_eventlog_nt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c
index 2d4c597358..701dcf08d3 100644
--- a/source3/rpc_server/srv_eventlog_nt.c
+++ b/source3/rpc_server/srv_eventlog_nt.c
@@ -398,7 +398,10 @@ NTSTATUS _eventlog_OpenEventLogW(pipes_struct *p,
DEBUG(10,("_eventlog_OpenEventLogW: Size [%d]\n", elog_size( info )));
- sync_eventlog_params( info );
+ if (!sync_eventlog_params(info)) {
+ elog_close(p, r->out.handle);
+ return NT_STATUS_EVENTLOG_FILE_CORRUPT;
+ }
prune_eventlog( ELOG_TDB_CTX(info->etdb) );
return NT_STATUS_OK;