ZwOpenThreadToken question

This is probably and old question.
I’m trying to use the ZwOpenThreadToken and ZwOpenProcessToken, but during the compile, I’m getting “undefined” error.
Where can I get these functions?

I’m using these to get the SID i the IRP_SET_INFORMATION.

Thanks
pada

Try ZwOpenThreadTokenEx/ZwOpenProcessTokenEx.

mm

Thanks mm. That worked.

By the way is this the correct statement that using ZwOpenProcessTokenEx and ZwOpenThreadTokenEx in the IRP_SET_SECURITY should give me the correct SID, because this IRP runs in the same thread context as caller?

pada

I would prefer to use SeCaptureSubjectContext as it deals with impersonation in the correct ways for you.

  • S

-----Original Message-----
From: xxxxx@hotmail.com
Sent: Tuesday, July 21, 2009 10:26
To: Windows File Systems Devs Interest List
Subject: RE:[ntfsd] ZwOpenThreadToken question

Thanks mm. That worked.

By the way is this the correct statement that using ZwOpenProcessTokenEx and ZwOpenThreadTokenEx in the IRP_SET_SECURITY should give me the correct SID, because this IRP runs in the same thread context as caller?

pada


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer