Re: Metadata support
Re: Metadata support
- Subject: Re: Metadata support
- From: Q <email@hidden>
- Date: Thu, 29 Jun 2006 16:35:56 +1000
On 29/06/2006, at 2:49 PM, Jordan K. Hubbard wrote:
Actually attempting to test this just now (under 10.4.6)
consistently leads to a rsync EXC_BAD_ACCESS crash in
acl_from_text and copyfile. Basically this seems to occur anytime
I try to rsync a file with both and ACL and EA.
If you can send me your data as an attachment, or file a radar and
attach the data to it, I'll see that it's looked at. It shouldn't
crash, obviously.
- Jordan
If you want a couple more things to look into that are broken try
these two:
a) If chflags +uchg is set on a file copyfile() will replicate this
onto rsync's temporary ._* files, which rsync is then unable to
delete, and are left behind in /tmp.
and
b) When acl's are disabled for a filesystem (sudo fsaclctl -p / -d)
the following code works. With acl's enabled (sudo fsaclctl -p / -e)
it fails. The difference is the behaviour of mktemp(3), without
ACL's it will create a temporary file, with ACL's enabled it doesn't,
a situation that copyfile() seems unable to handle. If you were to
use mkstemp(3) instead this problem does not occur.
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <err.h>
#include <errno.h>
#include <string.h>
#include "copyfile.h"
int main (int argc, char **argv) {
char *fname_src = "/tmp";
char *template = "/tmp/test.XXXXX";
char fname[32];
char *fname_tmp;
int fd;
strncpy(fname, template, sizeof(fname));
fname_tmp = mktemp(fname);
if (fname_tmp && copyfile(fname_src, fname_tmp, NULL,
COPYFILE_NOFOLLOW | COPYFILE_PACK | COPYFILE_METADATA)==0 &&
(fd = open(fname_tmp, O_RDONLY, 0)) >= 0) {
printf("Copyfile worked\n");
unlink(fname_tmp);
} else {
printf("Copyfile failed\n");
printf("fname_tmp = %s\nfname_src = %s\nfd = %d\n", fname_tmp,
fname_src, fd);
err(errno, "%s", fname_tmp);
}
return 0;
}
--
Seeya...Q
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
_____ / Quinton Dolan - email@hidden
__ __/ / / __/ / /
/ __ / _/ / / Gold Coast, QLD, Australia
__/ __/ __/ ____/ / - / Ph: +61 419 729 806
_______ /
_\
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden