Bug 159617

Summary: restore fails to restore ext3 ACL's
Product: [Fedora] Fedora Reporter: Paul Janzen <pcj>
Component: dumpAssignee: Jindrich Novy <jnovy>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: pknirsch, stelian
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.4b40-3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-06-09 10:58:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix ACLs in restore none

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:
Always

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.