[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] [PATCH] Backing up Windows ACLs
From: |
Andrew Ferguson |
Subject: |
Re: [rdiff-backup-users] [PATCH] Backing up Windows ACLs |
Date: |
Sun, 22 Jun 2008 11:15:35 -0400 |
On Jun 22, 2008, at 1:25 AM, Josh Nisly wrote:
Attached is a first-draft patch to add support for native Windows
permissions, including owner and ACLs.
First, let me say that Fred Gansevles is responsible for the most
interesting part of this - the code to load and save permissions
information to files. Thanks, Fred!
There are a couple of places where I've "cheated" with initializing
ACL loading to True instead of determining whether ACLs are
supported, but I wanted to get the patch out so that other people
could take a look at it and comment on it. At this point, it should
work for both local<->local and local<->remote, as long as the
remote end has these changes.
Probably the most controversial change is make Windows ACLs
completely separate in the code from POSIX ACLs, including saving
them to a separate file, etc. The reason that I did this is because
they are conceptually and practically two completely different
things. If you back up from Windows and restore to linux, you don't
want to try to apply the Windows ACLs to the linux filesystem, and
vice-versa. I see them as similar to OS X's carbon files, that is,
they are a os-specific file information.
Indeed, that makes perfect sense. No controversy here. :-)
An exciting thing about this approach is that we might be able to re-
use some of the work you and Fred have done here for Mac OS X ACLs.
The Mac ACLs are sort of a hybrid of Windows and POSIX ACLs --- you
use the POSIX-defined API to access ACL entries which look identical
to Windows and (at first study) look quite incompatible with the Linux
ones.
The one thing I don't like about this patch is that it is not
backwards compatible with existing rdiff-backup servers. This is
because an RPath object now contains a win_acls.ACL object, which
causes the remote end to throw when unpickling the object. I don't
know of an easy way around this. One way would be to serialize the
object to string, but I'm not sure I like that.
You have to serialize it to string to write it to the repository file
anyway, no? I'm just guessing here -- I haven't read the patch yet.
looking forward to reading it and many thanks to both of you,
Andrew