[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with coreutils-6.12.70-4f470
From: |
Peter Fales |
Subject: |
Problems with coreutils-6.12.70-4f470 |
Date: |
Thu, 24 Jul 2008 15:42:05 -0500 |
User-agent: |
Mutt/1.4.2.3i |
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: address@hidden
Phone: 630 979 8031
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Problems with coreutils-6.12.70-4f470,
Peter Fales <=