Hi,
I am writing a program to limit user access to certain data on harddisk according to user name. For example, a user named Head can have all access to all the data on harddiks, while a user named Lily can only have access to data on driver E:. My programe runs in kernel as a system service.
What I want to know is how I can get and recognize user name in kernel. Are there any routines that can get the current user’s name? Or can I recognize user by something else, such as SID or TOKEN?
Thanks!
> For example, a user named Head can have all access to all the
data on harddiks, while a user named Lily can only have access
to data on driver E:.
Why kernel driver for that ?
Right click on the drive, Properties, Security, and there you go 
L.
Use SIDs instead of names in kernel mode. Names belong to the management UI
only.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From:
To: “Windows File Systems Devs Interest List”
Sent: Tuesday, December 05, 2006 6:06 AM
Subject: [ntfsd] Can users be recognised by name in kernel?
> Hi,
>
> I am writing a program to limit user access to certain data on harddisk
according to user name. For example, a user named Head can have all access to
all the data on harddiks, while a user named Lily can only have access to data
on driver E:. My programe runs in kernel as a system service.
>
> What I want to know is how I can get and recognize user name in kernel. Are
there any routines that can get the current user’s name? Or can I recognize
user by something else, such as SID or TOKEN?
>
> Thanks!
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
in kernels u use SID, not user names. but from ur requirements it looks like
u could use inbuilt features of windows itself!
On 12/5/06, headium2006@163.com wrote:
>
> Hi,
>
> I am writing a program to limit user access to certain data on harddisk
> according to user name. For example, a user named Head can have all access
> to all the data on harddiks, while a user named Lily can only have access to
> data on driver E:. My programe runs in kernel as a system service.
>
> What I want to know is how I can get and recognize user name in kernel.
> Are there any routines that can get the current user’s name? Or can I
> recognize user by something else, such as SID or TOKEN?
>
> Thanks!
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
–
- amitr0
Thanks for all the replies!
