[Box Backup-dev] Windows ACLs

Chris Wilson boxbackup-dev at fluffy.co.uk
Mon Feb 27 22:46:37 GMT 2006


Hi Ben,

On Sun, 26 Feb 2006, Ben Summers wrote:

>>  Does anyone have any suggestions as to how Windows ACLs, owner and group 
>>  should be stored by Box?
>
> 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.

OK, thanks. I will need to write a number of arbitrary-sized objects in
the attribute, and I'm not comfortable with null-terminated strings like 
the symlink target in attr_StreamFormat. Ideally I'd like to use something 
like the Archive or Protocol interface to write arbitrary objects to a 
memory buffer, and then read out the whole memory buffer as an opaque 
block (and vice versa). However I can't see any combination of existing 
classes that would allow me to do that.

Creating a StreamableMemBlock, and then a MemBlockStream on top, would 
seem to work for reading out a data block into separate components, but 
not the reverse: MemBlockStream::Write always throws an exception, 
although the comments in the source seem to indicate that it was intended 
to have a write phase and a read phase.

Is there another way to achieve this? Is it functionality that was 
intended to be implemented at some point, but nobody got around to it yet? 
Should I try to implement it myself?

Cheers, Chris.
-- 
_ ___ __     _
  / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |




More information about the Boxbackup-dev mailing list