change_sacl_perms() and ACLs from Solaris to 2.6 Linux
c182driver9 at gideon.org
Tue Oct 3 00:33:18 GMT 2006
I've found an error: ACLs are not properly preserved when a file is moved
from Solaris to a 2.6 Linux (I'm testing using CentOS 4 update 3 plus
updates). This is using 2.6.8 built with the acl patch on both platforms.
The file on the source Solaris machine:
[truffle:/opt]# getfacl /xxx/x
# file: /xxx/x
# owner: root
# group: other
and on the destination:
[root at backup1 truffle]# getfacl /backup/truffle/xxx.10/x
getfacl: Removing leading '/' from absolute path names
# file: backup/truffle/xxx.10/x
# owner: root
# group: bin
The problem only appears to arise when the "main" group and mask bits are
not the same. The data is received correctly, but is "mangled" by
change_sacl_perms(), which is being called within set_acl().
The piece of code in change_sacl_perms() which is causing the problem is
/* mask is only empty when we don't need it. */
if (racl->mask == ACL_NO_ENTRY)
COE2( store_access_in_entry,((mode >> 3) & 7, entry) );
As far as I can tell, this is setting the mask value based upon the file's
group mode. But I don't know why that would be desired. So I'm not sure
what to do to fix this problem.
Any help, please?
I'm wondering if the test is wrong, and if it shouldn't be:
racl->mask != ACL_NO_ENTRY
but that's purely guesswork.
More information about the rsync