Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 159617 - restore fails to restore ext3 ACL's
Summary: restore fails to restore ext3 ACL's
Alias: None
Product: Fedora
Classification: Fedora
Component: dump
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2005-06-06 05:32 UTC by Paul Janzen
Modified: 2013-07-02 23:07 UTC (History)
2 users (show)

Fixed In Version: 0.4b40-3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-06-09 10:58:12 UTC

Attachments (Terms of Use)
Fix ACLs in restore (deleted)
2005-06-08 13:39 UTC, Stelian Pop
no flags Details | Diff

Description Paul Janzen 2005-06-06 05:32:25 UTC
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):
dump-0.4b40-2; kernel-2.6.9-1.667

How reproducible:

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. 

Additional info:

ext3 filesystem mounted with -oacl and -ouser_xattr. 

strace shows: 

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).

Comment 1 Stelian Pop 2005-06-08 13:39:59 UTC
Created attachment 115218 [details]
Fix ACLs in restore

Comment 2 Stelian Pop 2005-06-08 13:41:24 UTC
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.

Comment 3 Jindrich Novy 2005-06-09 10:58:12 UTC
The patch is now applied and the new dump-0.4b40-3 is now built.

Note You need to log in before you can comment on or make changes to this bug.