Re: Win32 service starting application (OpenProcessToken and ImpersonateLoggedOnUser)
From: vipin (vipin_at_nospam.com)
Date: 02/04/05
- Previous message: Eric Perlin [MS]: "Re: Win32 service starting application (OpenProcessToken and ImpersonateLoggedOnUser)"
- In reply to: Mark: "Re: Win32 service starting application (OpenProcessToken and ImpersonateLoggedOnUser)"
- Next in thread: Eric Perlin [MS]: "Re: Win32 service starting application (OpenProcessToken and ImpersonateLoggedOnUser)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 4 Feb 2005 00:10:23 -0800
No way unless you get the hToken, for that you have to prompt the user to
get the user credentials.
Thanks
Vipin
"Mark" <usenet@markNOSPAMPLEASEshaw.plus.com> wrote in message
news:4202ba4b$0$45189$ed2e19e4@ptn-nntp-reader04.plus.net...
>
> "Vince Morgan" <vir@optusnet.com.au> wrote in message
> news:420241fd$0$2424$afc38c87@news.optusnet.com.au...
>>
>> "Mark Shaw" wrote in message
>> > unsigned long hProcess = 0;
>> > ret = this->GetPIDofProcessName((char *)shellName, hProcess);
>> > if (ret != 0)
>> > return -1;
>> > LogString2("Service detected shell PID is %ld\n", hProcess);
>> >
>> > HANDLE hToken = NULL;
>>
>>
>> Changing the value of hProcess here has me a little curious
>>
>
> I cant call GetCurrentProcess() because the current process is the service
> which is operating under LocalSystem. The shell is operating as the local
> user, and its the PID of the shell I thought would get an acceptable
> token.
> Right?
>
>
>
- Previous message: Eric Perlin [MS]: "Re: Win32 service starting application (OpenProcessToken and ImpersonateLoggedOnUser)"
- In reply to: Mark: "Re: Win32 service starting application (OpenProcessToken and ImpersonateLoggedOnUser)"
- Next in thread: Eric Perlin [MS]: "Re: Win32 service starting application (OpenProcessToken and ImpersonateLoggedOnUser)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|