Re: OpenProcessToken access denied
From: Jeffrey Hamblin (jhamblin_at_online.microsoft.com)
Date: 12/03/03
- Next message: Harini Raghavan \(MSFT\): "Re: Well Known SIDs"
- Previous message: David Cross [MS]: "Re: Smartcard Issue in 2003?"
- In reply to: Brian: "OpenProcessToken access denied"
- Next in thread: Brian: "Re: OpenProcessToken access denied"
- Reply: Brian: "Re: OpenProcessToken access denied"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 3 Dec 2003 14:17:48 -0800
Brian,
This could be caused by several things.
First, what access are you requesting in your call to OpenProcessToken? If
you only want to query the TokenUser then you only need TOKEN_QUERY.
Second, are you able to open the process for PROCESS_QUERY_INFORMATION?
That is required to get at the process token.
mkas.exe might be putting a stricter DACL on its process token or the
process object itself.
I don't know for certain what Process Explorer is doing. Perhaps it is
using the TakeOwnership privilege to get access to the object (requesting
WRITE_OWNER, changing the DACL to grant itself access, then changing it
back) after the normal access check fails. If you are admin then you have
this privilege in your token by default.
You will have to look at the security descriptors on the process and its
token to be certain. HTH,
Jeff
"Brian" <anonymous@discussions.microsoft.com> wrote in message
news:00f901c3b9ca$a9131bc0$a401280a@phx.gbl...
> Here's my problem:
>
> I'm trying to get the users of a running process on a
> Win2k server for a monitoring application. Basically,
> there are about 40-50 of this process (mkas.exe) running
> on the server at any given time. Each one runs under the
> domain account of the client computer. I can verify this
> by using Sysinternals Process Explorer.
>
> The problem is, when I try to get the user by using
> OpenProcessToken, I get error 127 - Access Denied. This
> only seems to happen on the mkas.exe process. The
> application looks up the users of a process just fine
> when the process's user isn't a domain account (ie - it's
> running under a local account).
>
> So my question is, what's going on? I know it can't be
> the permissions on the server's logged-in account, since
> the Sysinternals Process Explorer can bring up the users
> just fine. What could it be doing that I'm not?
>
> Thanks in advance,
> Brian
- Next message: Harini Raghavan \(MSFT\): "Re: Well Known SIDs"
- Previous message: David Cross [MS]: "Re: Smartcard Issue in 2003?"
- In reply to: Brian: "OpenProcessToken access denied"
- Next in thread: Brian: "Re: OpenProcessToken access denied"
- Reply: Brian: "Re: OpenProcessToken access denied"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|