Bug 168855 - [Vista] Parser cannot read Windows Security log without extra security controls
Summary: [Vista] Parser cannot read Windows Security log without extra security controls
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP.monitoring (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 2000
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Cindy Jin CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2006-12-21 11:02 EST by Eugene Chan CLA
Modified: 2010-06-03 15:08 EDT (History)
2 users (show)

See Also:


Attachments
manifest file (725 bytes, application/octet-stream)
2007-04-26 22:45 EDT, Cindy Jin CLA
no flags Details
manifest file and project fiel (1.74 KB, application/zip)
2007-04-26 22:50 EDT, Cindy Jin CLA
no flags Details
patch ParserWrapper (1.50 KB, text/plain)
2007-05-01 18:46 EDT, Cindy Jin CLA
no flags Details
EventLogReader2.cpp (21.08 KB, text/plain)
2007-05-02 10:39 EDT, Cindy Jin CLA
no flags Details
EventLogReader2.cpp print dot at the command screen (21.31 KB, text/plain)
2007-05-02 23:56 EDT, Cindy Jin CLA
no flags Details
porject files using static link option (4.50 KB, application/x-zip-compressed)
2007-05-03 12:51 EDT, Cindy Jin CLA
no flags Details
manifest file (489 bytes, application/octet-stream)
2007-05-07 19:11 EDT, Cindy Jin CLA
no flags Details
project file (4.51 KB, application/zip)
2007-05-07 19:16 EDT, Cindy Jin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Chan CLA 2006-12-21 11:02:18 EST
Problem is found on Windows Security log parsing on Vista platform. Error is thrown when try to run standalone or Eclipse import of Windows Security log. 
To workaround the problem, Eclipse or standalone process must be started/run as administrator.
Comment 1 Liz Dancy CLA 2007-01-09 17:15:40 EST
While I run the standalone process on the Vista platform without run as administrator, I get error message
"<ACADErrorHeader>
Failed to open event log". 

While I use Eclipse to import of Windows Security Log, a error log dialog is poped up, error message is"
An error occurred while attempting to import the log file Microsoft Windows Security log .
java.lang.Exception: IWAT0239E Converter command failed: java.lang.Exception: IWAT0238E Converter process ended with exit value 43"

Exception stack trace :

org.eclipse.hyades.logging.parsers.LogParserException: IWAT0412E Errors occurred parsing the log file null.
at org.eclipse.hyades.logging.parsers.importer.ParserWrapper.parse(ParserWrapper.java:144)
at org.eclipse.hyades.logging.parsers.internal.importer.LocalLogImportLoader.startParsing(LocalLogImportLoader.java:95)
at org.eclipse.tptp.monitoring.logui.internal.wizards.ImportLogWizard$LocalLogImportJob.runOnLocalHost(ImportLogWizard.java:1504)
at org.eclipse.tptp.monitoring.logui.internal.wizards.ImportLogWizard$LocalLogImportJob.run(ImportLogWizard.java:1471)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)


Comment 2 Cindy Jin CLA 2007-01-09 17:29:43 EST
Sorry I used the lab machine to add the comment 1 which by default logged in by Liz.
Comment 3 Cindy Jin CLA 2007-01-11 17:01:05 EST
In Vista although the user is logged on as an administrator, an application is run as a standard user by default. However, in order to open and read Windows security log, user needs Local System, Administrator account privilege. Or if user is granted one of the following privileges, he/she can open and read security log:
SE_SECURITY_NAME privilege (the "manage auditing and security log" user right).
The SE_AUDIT_NAME privilege. For more information, see Authorization Data Types and Constants.
http://msdn2.microsoft.com/en-us/library/aa363658.aspx
http://msdn2.microsoft.com/fr-fr/library/4xz6w79h(VS.71).aspx

Therefore, the EventLogReader.exe which reads the security log and write to a text file has to be started as the administrator. 

The workarounds for this problem :
. Local Log import: start the Eclipse as administrator
. Remote Log import: srart AC as administrator
. Starndalone GLA:
 1. go to "GLA_HOME"\config\Windows\security, select EventLogReader.exe->right click -> select Properties->select Compatibility-> check "Run this program as an administrator" ->ok
 2. modify the "GLA_HOME"\config\Windows\security\regex_example.adapter" 
 change:
<pu:Property propertyName="converter" propertyValue="&quot;eventlogreader.exe&quot; security .\error.log"/>
        <sensor:SingleFileSensor converter="&quot;eventlogreader.exe&quot; security .\error.log" directory="." fileName="error.log"/>
 to 
<pu:Property propertyName="converter" propertyValue="cmd.exe /c eventlogreader.exe security .\error.log"/>
        <sensor:SingleFileSensor converter="cmd.exe /c eventlogreader.exe security .\error.log" directory="." fileName="error.log"/>





Comment 4 Dave Smith CLA 2007-01-12 10:38:05 EST
Changing summary to be more descriptive.
Comment 5 Dave Smith CLA 2007-01-12 10:39:34 EST
Changing summary again.
Comment 6 Dave Smith CLA 2007-01-15 15:24:18 EST
Deferring this to 4.4 for further investigation into ways to resolve this issue programmatically.  Bugzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=170530 was opened to add items to the 4.2 and 4.3 release notes for this issue.
Comment 7 Dave Smith CLA 2007-02-06 02:08:00 EST
Assigning to Cindy and targetting to fix this in i2
Comment 8 Cindy Jin CLA 2007-04-26 22:45:40 EDT
Created attachment 65141 [details]
manifest file
Comment 9 Cindy Jin CLA 2007-04-26 22:50:33 EDT
Created attachment 65142 [details]
manifest file and project fiel

unzip these two files to org.eclipse.hyades.logging.parsers\src.native\EventLogReader2
Comment 10 Dave Smith CLA 2007-04-27 02:54:54 EDT
I committed the attached files to TPTP Head CVS which will cause EventLogReader2.exe to be built with the required security settings so the adminstrator user can run the program without changing any properties or settings of the executable.
Comment 11 Cindy Jin CLA 2007-05-01 15:39:58 EDT
The EventLogReader2.exe file which is compiled with the manifest file, can't be executed on the vista machine without visual studio 2005 installed. Also this manifest only solves the problem for not need to run as administrator for standalone process. If use Eclipse to import windows logs on vista and don't start Eclipse as administrator , it failed with error message:
"An error occurred while attempting to import the log file org.eclipse.hyades.logging.parsers.WindowsApplicationLogParser.
IWAT0412E Errors occurred parsing the log file null.
  java.lang.Exception: IWAT0239E Converter command failed: java.io.IOException: CreateProcess:  error=740";
It is a bug for java, as http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6410605.
The workaround is to execute the native process command with"cmd.exe /c eventlogread2.exe ......"
Comment 12 Cindy Jin CLA 2007-05-01 18:46:41 EDT
Created attachment 65547 [details]
patch ParserWrapper
Comment 13 Dave Smith CLA 2007-05-02 02:43:32 EDT
Patch for ParserWrapper committed to TPTP Head CVS.
Comment 14 Cindy Jin CLA 2007-05-02 10:39:15 EDT
Created attachment 65613 [details]
EventLogReader2.cpp

remove the printf
Comment 15 Cindy Jin CLA 2007-05-02 23:56:26 EDT
Created attachment 65727 [details]
EventLogReader2.cpp print dot at the command screen
Comment 16 Dave Smith CLA 2007-05-03 12:20:06 EDT
Committed change to EventLogReader2.cpp to TPTP Head CVS.
Comment 17 Cindy Jin CLA 2007-05-03 12:51:19 EDT
Created attachment 65800 [details]
porject files using static link option
Comment 18 Dave Smith CLA 2007-05-03 13:27:14 EDT
I committed the changes to the build files to statically link the required DLL's.  All problems should be fixed now.  Resolving the defect as FIXED.
Comment 19 Cindy Jin CLA 2007-05-07 19:07:24 EDT
the EventLogReader2.exe.manifest file needs to be updated to remove the information about Microsoft.VC80.CRT dlls.Otherwise, the same error happens on the platform without VC 2005 installed.
Comment 20 Cindy Jin CLA 2007-05-07 19:11:40 EDT
Created attachment 66227 [details]
manifest file
Comment 21 Cindy Jin CLA 2007-05-07 19:16:13 EDT
Created attachment 66228 [details]
project file
Comment 22 Dave Smith CLA 2007-05-08 00:42:21 EDT
Committed the latest fixes to the build files to TPTP Head CVS
Comment 23 Eugene Chan CLA 2009-02-24 17:09:21 EST
CLOSE BUG