Bug 482892
Summary: | Passsync service start and stop messages in Windows event viewer are not logged correctly | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Directory Server | Reporter: | Jenny Severance <jgalipea> | ||||||||||
Component: | winsync | Assignee: | Rich Megginson <rmeggins> | ||||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Chandrasekar Kannan <ckannan> | ||||||||||
Severity: | high | Docs Contact: | |||||||||||
Priority: | high | ||||||||||||
Version: | 8.1 | CC: | benl, nkinder | ||||||||||
Target Milestone: | --- | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | All | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | 8.1 | Doc Type: | Bug Fix | ||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2009-04-29 23:09:52 UTC | Type: | --- | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Bug Depends On: | |||||||||||||
Bug Blocks: | 249650, 493682 | ||||||||||||
Attachments: |
|
Description
Jenny Severance
2009-01-28 18:12:51 UTC
Created attachment 330266 [details]
windows application event viewer message
arg - looks like whoever coded this didn't finish the job :-( it is taking me forever to wade through this Windows event and resource code to figure out how this is supposed to work . . . Created attachment 331886 [details]
diffs
Reviewed by: nkinder (Thanks!) Fix Description: Looks like someone had started to tie in the message catalog/resources, but didn't get far enough. 1) I used rc to compile the .rc file into a .res file - this new .res file is being added to CVS (cvs add -kb) 2) I added dssynchmsg.res to the link line 3) I made sure the passsync.exe main called the Install() method which installs the message catalog where the Event Viewer can find it. I had to make that code smarter, so it would not attempt to create/install something that was already there. Platforms tested: Windows 2003 Server Flag Day: no Doc impact: no Created attachment 332137 [details]
cvs commit log
Upon restart of the Password Synchronization service, three events are logged in the event viewer. 1. The service was stopped. 2. The Password Synchronization Service service was installed. 3. The service was started. Should not see installed message again. Maybe the new passsync.log message "PassSync service initialized" is related to logging this installed message? Fix Description: Omit "The Password Synchronization Service service was installed." message at service startup. Checking in ntservice.cpp; /cvs/dirsec/winsync/passwordsync/passsync/ntservice.cpp,v <-- ntservice.cpp new revision: 1.7; previous revision: 1.6 done Index: ntservice.cpp =================================================================== RCS file: /cvs/dirsec/winsync/passwordsync/passsync/ntservice.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ntservice.cpp 16 Feb 2009 22:20:21 -0000 1.6 +++ ntservice.cpp 12 Mar 2009 14:39:40 -0000 1.7 @@ -199,6 +199,7 @@ // Get the executable file path TCHAR szFilePath[_MAX_PATH]; ::GetModuleFileName(NULL, szFilePath, sizeof(szFilePath)/sizeof(*szFilePath)); + int didinstall = FALSE; // install if not already installed if (!IsInstalled()) { @@ -229,6 +230,7 @@ // clean up ::CloseServiceHandle(hService); ::CloseServiceHandle(hSCM); + didinstall = TRUE; } // make registry entries to support logging messages @@ -263,10 +265,12 @@ 0, REG_DWORD, (CONST BYTE*)&dwData, - sizeof(DWORD)); + sizeof(DWORD)); ::RegCloseKey(hKey); - LogEvent(EVENTLOG_INFORMATION_TYPE, EVMSG_INSTALLED, m_szServiceName); + if (didinstall) { + LogEvent(EVENTLOG_INFORMATION_TYPE, EVMSG_INSTALLED, m_szServiceName); + } return TRUE; } fix verified Windows 2003 Enterprise Edition passsync v 1.1.0 newest build Created attachment 335457 [details]
patch2
Resolves: bug 482892 Bug Description: Passsync service start and stop messages in Windows event viewer are not logged correctly Reviewed by: nkinder (Thanks!) Fix Description: For some reason, the code was not detecting that the service had already been installed and was installing it again. We do not need to install the service in this code, that is done in the .msi file now. I just got rid of that old code. Platforms tested: Windows 2003 Server Flag Day: no Doc impact: no Checking in passwordsync/passsync/ntservice.cpp; /cvs/dirsec/winsync/passwordsync/passsync/ntservice.cpp,v <-- ntservice.cpp new revision: 1.8; previous revision: 1.7 done *** Bug 489881 has been marked as a duplicate of this bug. *** fix verified - latest passsync.msi build - version 1.1.0 An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2009-0455.html |