S
Steven Kilby
Hi,
With .NET 2.0 a new Mutex constructor was added that takes a MutexSecurity
object as a parameter. The interesting thing is the following statement
from the MSDN documentation:
If the named mutex has already been created with access control security,
and the caller does not have MutexRights.FullControl, an exception is
thrown.
I wrote two test programs. The first runs as an Administrator and calls the
constructor with a MutexSecurity object that contains an Allow rule for
'Everyone' with MutexRights.Synchronize | MutexRights.Modify. The second
program runs as a normal user and also calls the constructor. Based on the
MSDN documentation I would expect an exception when the second program runs,
but it works fine. Things got more odd when I added a deny rule for
'Everyone' with MutexRights.FullControl. With that, I got the exception I
expected. That implies the default rule for a MutexSecurity object is
FullControl, but I know that isn't true.
Can anyone explain the behavior I am seeing?
Thanks!
Steven
With .NET 2.0 a new Mutex constructor was added that takes a MutexSecurity
object as a parameter. The interesting thing is the following statement
from the MSDN documentation:
If the named mutex has already been created with access control security,
and the caller does not have MutexRights.FullControl, an exception is
thrown.
I wrote two test programs. The first runs as an Administrator and calls the
constructor with a MutexSecurity object that contains an Allow rule for
'Everyone' with MutexRights.Synchronize | MutexRights.Modify. The second
program runs as a normal user and also calls the constructor. Based on the
MSDN documentation I would expect an exception when the second program runs,
but it works fine. Things got more odd when I added a deny rule for
'Everyone' with MutexRights.FullControl. With that, I got the exception I
expected. That implies the default rule for a MutexSecurity object is
FullControl, but I know that isn't true.
Can anyone explain the behavior I am seeing?
Thanks!
Steven