Red Hat Bugzilla – Bug 159617
restore fails to restore ext3 ACL's
Last modified: 2013-07-02 19:07:43 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Description of problem:
Dump and restore are not able to preserve ACL's or default ACL's.
Dump claims to support ACL's as of upstream version 0.40. The ACL's make it into the dump file, but restore doesn't extract them.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. touch foo
2. setfacl -m u:nobody:r foo
3. dump -f demo.dump
4. mkdir restore && cd restore
5. restore -xf ../demo.dump
Actual Results: During restore, I see the following error message:
restore: lsetxattr ./path/to/foo failed: Operation not supported
The restored file does not have the original ACL's.
Compares also fail (lgetxattr failed: Operation not supported).
Expected Results: The restored file should have had the original ACL's applied.
ext3 filesystem mounted with -oacl and -ouser_xattr.
lsetxattr("./path/to/foo", "system.", "\x01\x00\x00\x00\x01\x00\x06\x00\x02\x00\x04\x00c\x00\x00\x00\x04\x00\x04\x00\x1
0\x00\x04\x00 \x00\x04", 28, ) = -1 EOPNOTSUPP (Operation not supported)
First, the attribute name needs to be "system.posix_acl_access" (or "system.posix_acl_default", for default ACL's.)
Second, I think the attribute value also needs to be converted from the ext3 on-disk format (ext3_acl_entry) to the xattr_acl format. I.e., the first word of the attribute value needs to be \x02\x00\x00\x00 (XATTR_ACL_VERSION), not \x01\x00\x00\x00 (EXT3_ACL_VERSION).
Created attachment 115218 [details]
Fix ACLs in restore
Indeed, ACL restoration in dump has issues.
The patch above should correct all the issues, including some additional
problems with EA and big endian machines.
The patch is now applied and the new dump-0.4b40-3 is now built.