[python-win32] Impersonation and Threads

Matt Herbert (matherbe) matherbe at cisco.com
Wed Jan 9 00:05:44 CET 2008


> -----Original Message-----
> Tim Roberts wrote:
> 
> Matt Herbert (matherbe) wrote:
> > Is there a way to make impersonation follow threads?
> 
> What operating system are you running?  On XP SP2 and later, a new 
> thread should inherit the impersonation token of the calling thread, 
> unless the caller passes a specific security descriptor into 
> CreateThread.  (I don't know what the Python thread module 
> does.)  On XP 
> SP1 and before, you'd see the behavior you describe.

I am running XP SP2. On my systems, the new thread definitely is not
inheriting the impersonation token of the calling thread. For what it's
worth, this is with Active State Python 2.5.

Either way though, I need something that will work on XP, 2k, and 2k3.

Thanks
-Matt


More information about the python-win32 mailing list