Boost logo

Boost :

From: Carl Daniel (cpdaniel_at_[hidden])
Date: 2002-02-25 01:40:16


From: "mfdylan" <dylan_at_[hidden]>
> I just finally completed my code for properly determining the fully
> qualified owner and groupname for *any* file, and as far as I can
> tell, you actually need the filename in order to do it. It's over
> 200+ lines of code and includes:
>
> * getting security descriptor
> * getting 'owner' or 'group' SID from security descriptor
> * working out full path for filename
> * if in form 'x:\...' then check if drive type is local, if not:
> * try to resolve substituted drive letters to network drives
> * look up mapped drives to find UNC name, get server from that
> * look up the account and domain name on that server from the SID
> * if domain name is built-in domain, use server name instead
>
> This allows you to map \\XYZ\share to drive z: then substitute drive
> y: for z:\test then chdir to y: and determine that the owner
> for "file.txt" is XYZ\\joe_bloggs.

Just curious, did you handle subst drives for Win9x? IIRC, it requires some serious black magic to get that info on 9x
(don't know about WinMe), while it's easy to get on NT/2k/XP. Does anyone actually use Win9x? *shudder*

-cd


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk