Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
Upcoming OSR Seminars | ||
---|---|---|
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead! | ||
Writing WDF Drivers | 7 Dec 2020 | LIVE ONLINE |
Internals & Software Drivers | 25 Jan 2021 | LIVE ONLINE |
Developing Minifilters | 8 March 2021 | LIVE ONLINE |
Comments
pSubjectSecurityContext = &IrpSp->Parameters.Create.SecurityContext->AccessState.SubjectSecurityContext;
SeLockSubjectContext(pSubjectSecurityContext);
ClientToken = SeQuerySubjectContextToken(pSubjectSecurityContext);
SeQueryInformationToken(ClientToken, TokenUser,...);
SeUnlockSubjectContext(pSubjectSecurityContext);
-bg
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
[email protected]
http://www.storagecraft.com
<[email protected]> wrote in message news:[email protected]
> Hi All,
>
> I have a Shared folder on my machine.If some remote user [who has access to
shared folder] opens the shared file,i get the calls for this file in the
context of System User.
>
> I have used ZwOpenProcessTokenEx & ZwQueryInformationToken in IRP_MJ_CREATE
to get SID, but it returns SID of system process & not that of the remote user
who is accessing this file.
>
> What should be done, to get SID of the remote user who is accessing my shared
files ?
>
>
> Thanks
> Mahesh
>
Thanks Bronislav & Maxim for your inputs.
Using ClientToken [if it is not NULL] i got the SID of remote user who is accessing the shared file.
Thanks
Mahesh
Hey Mahesh_Dhannawat, Can you please tell how you get the SID of remote users accessing the file?I am doing the same thing but only getting local system user SID.
@jay96612 You’re asking... just in case the guy is around, 13 years later? Well, that certainly makes sense.
Not.
Do. Not. Necropost.
Peter
Peter Viscarola
OSR
@OSRDrivers