// JP opened flex table

Click to See Complete Forum and Search --> : Createthread() using security attributes


MirfanFromLogics
March 29th, 2004, 04:13 AM
Hi All
How i can Createthread() using the security attributes that is its first parameter..
i want newlly created threads runs in specific user security context
which i mention in security attributes. If parent process is running in security context of User "A" but threads are running in security context of User "B". first is it possible or not. if yes Plz help me in this problem.

Thanx in advance.

Andreas Masur
March 29th, 2004, 06:11 AM
[Moved thread]

BorisKK
March 29th, 2004, 06:29 AM
The security attributes specified during thread creation control the access to the thread, not the access rights of the thread.

You need to use LogonUser, ImpersonateLoggedOnUser, and RevertToSelf API functions to make a thread run temporarily in the context of another user. Note that both LogonUser and ImpersonateLoggedOnUser require privileges (SeTcbName "Act as part of the
operating system" and SeImpersonatePrivilege "Impersonate a Client After Authentication", respectively), which are not granted by default to the normal user accounts.

//JP added flex table