I've written a C# Windows Service which runs on servers 2000, 2003 etc which
manages our surrogate processes and shuts them down if they are rogue.
The problem when running on a 2003 server by default the SYSTEM account
under 2003 server does not have permissions to shutdown processes and no
error exceptions are fired.
I might use the WindowsPrincipal class and use IsInRole to determine if the
process is running as an administrator instead of writing my own custom
permission class which is alot of hastle to develop then it would need to be
deployed.
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
There is no such standard permission attribute, so you will have to write
your own. Note that I'm not clear why you need this, I guess you could
restrict the applications who are able to stop other processes based on
the
callers (the process or thread) identity.
"SeDebugPrivilege" is a windows security privilege, this one is required
to
enable debuging and reading/writing into some other processes address
space.
This is a user privilege and has nothing to do with CAS security.
Willy.
"Simon Hart" <srhartone@[no spam]yahoo.com> wrote in message
news:eC**************@TK2MSFTNGP11.phx.gbl...
|I want to request a permission using declarative permissions in my
assembly
| to grant permission to shut down processes. Namespace:
| System.Security.CodeAccessPermission. I don't want to have to write my
own.
|
| Don't know what "SeDebugPrivilege" is?
|
| "Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
| news:Op**************@TK2MSFTNGP12.phx.gbl...
| >
| > "Simon Hart" <srhartone@[no spam]yahoo.com> wrote in message
| > news:e4**************@TK2MSFTNGP11.phx.gbl...
| > | Does anyone know the standard code access permission to be able to
| > | manipulate a process using the Process class?
| > |
| > | Thanks
| > | Simon.
| > |
| > |
| >
| > Not sure what you mean with "code access permission", if you mean
| > "security
| > privileges" then you'll need "SeDebugPrivilege".
| >
| > Willy.
| >
| >
|
|