[Box Backup-dev] Windows ACLs

Ben Summers boxbackup-dev@fluffy.co.uk
Sun, 26 Feb 2006 22:43:32 +0000


On 26 Feb 2006, at 22:36, Chris Wilson wrote:

> Hi all,
>
> Does anyone have any suggestions as to how Windows ACLs, owner and  
> group should be stored by Box?
>
> I'm guessing that extended attributes would be the way to go, but  
> I'm not familiar with them and I don't know how to store them in a  
> way that makes sense and doesn't conflict with other potential  
> uses. Perhaps as attributes named 'win32.owner', 'win32.group',  
> 'win32.dacl.administrators',
> 'win32.dacl.everyone', ...?

Err... see BackupClientFileAttribute.cpp. Note how the first member  
of attr_StreamFormat is AttributeType. I suggest you add  
ATTRIBUTETYPE_WINDOWS and then create a attr_StreamFormat_Windows  
which contains whatever information you need.

Can't you use a Windows API to serialise and deserialise the ACLs?  
Just use that with the one word header. Using extended attributes  
would be a huge amount of work for little gain.

In 0.20 I want to change this to an arbitrary number of attribute  
blocks, each with size and type headers. This approach will make it  
easy to fit in with that later.

Ben