Re: ATL Service and kernal object

From: Brian Muth (bmuth_at_mvps.org)
Date: 03/19/04


Date: Fri, 19 Mar 2004 08:23:32 -0800

The MFC client is probably running in the security context different from
the service. Therefore, you have to pay particular attention to the access
rights of the event's security descriptor

see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/synchronization_object_security_and_access_rights.asp
(watch for line breaks)

You might want to set the first parameter of CreateEvent explicitly, as in:

CDacl dacl;
dacl.AddAllowedAce (Sids::World (), GENERIC_READ | EVENT_MODIFY_STATE |
SYNCHRONIZE);
CSecurityDesc sd;
sd.SetDacl (dacl);
CSecurityAttributes sa;
sa.Set (sd);

...CreateEvent (sa, ...)

HTH

Brian



Relevant Pages

  • RE: Accessing remote perfmon/PDH data from a service, how to
    ... If the service is attempting to access a remote system with LocalSystem ... The security context for the ... The service account will need rights to access the target resource just as ...
    (microsoft.public.win2000.security)
  • RE: means can, not is
    ... context forwarded from IIS(the security context maybe a client ... automatically at the initializing time of the worker thread. ... This posting is provided "AS IS" with no warranties, and confers no rights. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: listing Object properties from SearchResult
    ... security context you bound with only has rights to see a subset of the ... > properties of all the object entries in a SearchResult but the code is ... > TIA ...
    (microsoft.public.dotnet.framework.aspnet.security)