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:
##################################################################
#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]);
}
}
}
##################################################################
--
Peter Fales
Alcatel-Lucent
Member of Technical Staff
2000 Lucent Lane
Room: 1C-436
Naperville, IL 60566-7033
Email: [EMAIL PROTECTED]
Phone: 630 979 8031
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils