<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10158</bug_id>
          
          <creation_ts>2016-08-17 14:40:36 +0000</creation_ts>
          <short_desc>Calls to setfacl under pseudo don&apos;t result in xattr being set on the file</short_desc>
          <delta_ts>2016-11-25 23:45:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Pseudo</product>
          <component>pseudo</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joshua Lock">joshuagloe</reporter>
          <assigned_to name="Hongxu Jia">hongxu.jia</assigned_to>
          <cc>jose.perez.carranza</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>seebs</cc>
    
    <cc>sgw</cc>
    
    <cc>yp.pseudo.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          <qa_contact name="Juan Ramos">juan.fernandox.ramos.frayle</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>65263</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-08-17 14:40:36 +0000</bug_when>
    <thetext>Setting extended attributes (xattr) on files (i.e. with setfattr or setxattr() calls) works in latest pseudo, however calls to setfattr from i.e. a postinst (or even during do_install) don&apos;t modify the xattr on the file.

[root@tethys xattrtest-1.0]# getfattr -d ../image/usr/share/xattrtest/xattrtest 
# file: ../image/usr/share/xattrtest/xattrtest
user.oeqa=&quot;miccheck&quot;

[root@tethys xattrtest-1.0]# getfacl -d ../image/usr/share/xattrtest/xattrtest 
# file: ../image/usr/share/xattrtest/xattrtest
# owner: root
# group: root

[root@tethys xattrtest-1.0]# setfacl -m u:bar:r-- ../image/usr/share/xattrtest/xattrtest 
[root@tethys xattrtest-1.0]# getfacl -d ../image/usr/share/xattrtest/xattrtest 
# file: ../image/usr/share/xattrtest/xattrtest
# owner: root
# group: root</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65326</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-08-18 20:25:29 +0000</bug_when>
    <thetext>This may (or may not) be related to the special handling of system.posix_acl_access extended attributes in pseudo.

The code in shared_setxattr() of ports/linux/xattr/pseudo_wrappers.c attempts to undo GNU tar&apos;s conversion of all permissions to POSIX ACL extended attributes and instead change those which are just standard POSIX permissions into a chmod call.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66236</commentid>
    <comment_count>2</comment_count>
    <who name="Seebs">seebs</who>
    <bug_when>2016-09-16 02:59:00 +0000</bug_when>
    <thetext>So, I tried this, and... I get the exact same behavior with or without pseudo.

getfacl -d &quot;displays the default access control list&quot;.

However, if you just do plain &quot;getfacl&quot; on the file, it seems to show the expected behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66242</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-09-16 12:20:11 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; 
&gt; However, if you just do plain &quot;getfacl&quot; on the file, it seems to show the
&gt; expected behavior.

Ugh, you&apos;re dead right. Apologies for the noise. I must&apos;ve been looking at the wrong manual.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68612</commentid>
    <comment_count>4</comment_count>
    <who name="Juan Ramos">juan.fernandox.ramos.frayle</who>
    <bug_when>2016-11-25 23:45:58 +0000</bug_when>
    <thetext>tested in commit: 6c9f6b5f70ab3ee194b2c2c6f3bd462c994848fa

I got this:

sh-4.3# getfacl dmesg.txt 
# file: dmesg.txt
# owner: root
# group: disk
user::rwx
group::rwx
other::---

Verified.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>