Re: Dar and OS X xattrs: Willing to help
Denis Corbin <[email protected]> Sun, 25 Sep 2005 15:55:59 +0200
| Newsgroups | gmane.comp.sysutils.backup.dar.general |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dave Vasilevsky wrote: | | On Sep 24, 2005, at 3:09 PM, Denis Corbin wrote: [...] | | That's great, it makes life much easier. I modified the version of dar | in CVS so it supports the OS X-style *xattr calls, patch is at | http://vasi.webhop.org/files/ports/dar-osx.patch I got the patch. That's perfect! Thank you. Seen the patch, which is simple and efficient, there is no reason to think it might perturbe the existing behavior. You patch is now integrate in CVS trunk, with some little more additions (documentation). | |> This API does not covers the problem of the forks that do not exist |> under Unix, does it? | | | Yes it does! Apple does some magic so you can read the resource fork | from the xattr "com.apple.ResourceFork". So if we save (and restore) the | EAs, we automatically respect the resource fork. That really really Great!!! :-) This, with only very minor changes! Wonderful! [...] | | | This still leaves the problem of ACLs, since the xattr API on OS X | doesn't make visible the xattr(s) that store ACLs. yep, | | We could do acl_get_file() and then acl_to_text() to get a text | representation of the ACL for each file. Then it could be stored in the | slice as a fake xattr, under a key like "fr.free.linux.dar.macosx.acl". | Restoration would be just the reverse of saving, using acl_set_file() | and acl_from_text(). The 'xar' archiver just uses the acl_to_text method | I described above. I agree with this way of doing, but to avoid loop problem or limitations (like a read-only filesystem), the convertion from ACL to text must be done in memory, no temporary file must be used. By "loop problem" I mean that if we convert an ACL to a file, dar must avoid saving it, and also it must avoid trying to save its own ACL too... the other problem with temporary files are permissions: it is easy to have the write to create a file but lack privilege to read or remove it (espetially when using ACL on directories!), so this is a very strong condition: no temporary file must be used, sorry. :-/ | | We could attempt instead to translate Linux and Mac OS X ACLs, I'm not | sure how easy or hard that would be. I talked to some of the folks in | #opendarwin, apparently they don't really translate too directly. yep, | | Dave Thanks for your work, Denis. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFDNqxupC5CI8gYGlIRApI5AKCk9V6ICYC57h5D6czODm4tEmEGnQCeM5vK qu8O4p8FELF99GG7KCX3t3Q= =3ez+ -----END PGP SIGNATURE----- ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php