Re: Passing access token between processes
From: Jeffrey Hamblin (jhamblin_at_online.microsoft.com)
Date: 12/18/03
- Next message: Vishal Agarwal[MSFT]: "Re: Container Name value gets corrupted after call to createFilePKCS10."
- Previous message: Pieter Philippaerts: "Re: Sign w/ BSafe; Verify w/ MS Crypto; Error: Invalid Signature"
- In reply to: Robert Scarab: "Passing access token between processes"
- Next in thread: Robert Scarab: "Re: Passing access token between processes"
- Reply: Robert Scarab: "Re: Passing access token between processes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 18 Dec 2003 10:57:24 -0800
You are probably getting ACCESS_DENIED because the token handle is not
opened for TOKEN_IMPERSONATE. How do you get the original token?
For getting the handle to the target process with correct access bits, take
a look at DuplicateHandle in MSDN.
"Robert Scarab" <robertscarab@hotmail.com> wrote in message
news:016001c3c4d8$e5e95500$a501280a@phx.gbl...
> I have an access token in a process which represents a
> user security context of the current logged on user. I
> would like to pass this token to another process so that
> process can call 'ImpersonateLoggedonUser' and run in the
> security context of the logged on user.
>
> Currently, the process which receives the token is
> running with the security context of SYSTEM. When I try
> to use the token in the impersonate I get a return code
> 5 'access denied'. I'm assuming that the token must be
> duplicated before I pass it to another process with some
> authorities, but what?? Code sample would be helpful.
- Next message: Vishal Agarwal[MSFT]: "Re: Container Name value gets corrupted after call to createFilePKCS10."
- Previous message: Pieter Philippaerts: "Re: Sign w/ BSafe; Verify w/ MS Crypto; Error: Invalid Signature"
- In reply to: Robert Scarab: "Passing access token between processes"
- Next in thread: Robert Scarab: "Re: Passing access token between processes"
- Reply: Robert Scarab: "Re: Passing access token between processes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]