Setting security

delphi package - easy access to security apis
Post Reply
2BrightSparks
Posts: 28
Joined: Mon Jan 03, 2005 3:03 pm
Contact:

Setting security

Post by 2BrightSparks »

Hi, I'm getting the file/directory security info and storing it as text in a database. Because it's Unicode I'm using the account SID's instead of the names.

My problem is I can't work out how to "reconstruct" the security info for a file/directory using SID's. For example, how can I get an IAccount reference with an SID? I understand setting it for the current user (e.g. FileSecurity(WinFolder).Owner := CurrentUser) but I need to set it for another account when I only have the SID.

Thanks
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Simply use "Account(sid)".
Post Reply