Peter Fales <[EMAIL PROTECTED]> wrote: > I decided to have a look at the latest coreutils-6.12.70-4f470, and I'm > seeing a new problem on Solaris 8. (Both sparc and x86) > > It seems that on Solaris, you can't simply copy the ACLs using GETACL/SETACL > if the source file is in /tmp. This causes qcopy_acl() to fail with an > error, and can be demonstrated with the following program. Copying the > ACLs from /foo works, but copying from /tmp/foo fails with EINVAL:
Thanks for investigating/reporting that. Unfortunately, copy-acl.c has several candidate acl/facl calls, and I don't have access to a Solaris 8 system on which to debug it. Do you know which one is affected in your case? There are already some attempts to handle EINVAL. > ################################################################## > #include <sys/acl.h> > #include <sys/fcntl.h> > > main(int argc, char *argv[]) > { > int count, fd, i, res; > aclent_t *entries; > > > char *file[] = { "foo", "/tmp/foo" }; > > open("bar",O_WRONLY|O_CREAT,0644); > > for ( i = 0 ; i < 2 ; i++ ) { > > open(file[i],O_WRONLY|O_CREAT,0644); > > count = acl (file[i], GETACLCNT, 0, NULL); > > entries = (aclent_t *) malloc (count * sizeof (aclent_t)); > > res = acl (file[i], GETACL, count, entries); > > res = acl ("bar", SETACL, count, entries); > if ( res < 0 ) { > perror(file[i]); > } > } > } > ################################################################## _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils