<?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>9324</bug_id>
          
          <creation_ts>2016-03-22 15:42:42 +0000</creation_ts>
          <short_desc>pseudo: cannot remove xattr</short_desc>
          <delta_ts>2016-04-05 09:26:11 +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>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.1 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Joshua Lock">joshuagloe</assigned_to>
          <cc>seebs</cc>
    
    <cc>yp.pseudo.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <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>60294</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-03-22 15:42:42 +0000</bug_when>
    <thetext>&quot;setfattr -x&quot; does not work correctly under pseudo:

# touch foobar
# setfattr -n security.ima -v foo foobar 
# setfattr -x security.ima foobar
# getfattr -d -m . foobar 
# file: foobar
security.ima=&quot;foo&quot;

Excepted result is no output from getfattr.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60309</commentid>
    <comment_count>1</comment_count>
    <who name="Seebs">seebs</who>
    <bug_when>2016-03-22 19:38:12 +0000</bug_when>
    <thetext>d&apos;oh. There&apos;s a list of operations for which paths are extracted from the client request, and REMOVE_XATTR isn&apos;t in that list.

This still has the issues from 9317 to sort, but this part&apos;s trivial.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60328</commentid>
    <comment_count>2</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-03-23 07:15:10 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; d&apos;oh. There&apos;s a list of operations for which paths are extracted from the
&gt; client request, and REMOVE_XATTR isn&apos;t in that list.
&gt; 
&gt; This still has the issues from 9317 to sort, but this part&apos;s trivial.

Fixing this issue here without addressing 9317 would be worthwhile already. We have a workaround for 9317 (avoid hardlinks), but not this one here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60362</commentid>
    <comment_count>3</comment_count>
    <who name="Seebs">seebs</who>
    <bug_when>2016-03-23 19:50:36 +0000</bug_when>
    <thetext>Okay, so, it&apos;s a trivial one-line fix, but it&apos;s currently in my tree on top of an overhaul of the startup code. I think it might make sense to just add a patch for this to the oe-core tree until I get that startup code reviewed and vetted.

The actual patch, which really is this simple:

diff --git a/pseudo.c b/pseudo.c
index 2b60fd4..67ebb6a 100644
--- a/pseudo.c
+++ b/pseudo.c
@@ -484,6 +484,7 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char
                case OP_GET_XATTR:
                case OP_LIST_XATTR:
                case OP_REPLACE_XATTR:
+               case OP_REMOVE_XATTR:
                case OP_SET_XATTR:
                        /* In a rename there are two paths, null separated in ms
                        initial_len = strlen(msg-&gt;path);

(... and yes, I&apos;m aware that I put it in the wrong place, it should be one line higher.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60400</commentid>
    <comment_count>4</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-03-24 16:00:18 +0000</bug_when>
    <thetext>I&apos;ve submitted a change to OE-Core to backport the fix from master of the pseudo git tree.

I tested with Patrick&apos;s example and in comment #1 and the result is no output from getfattr.

http://lists.openembedded.org/pipermail/openembedded-core/2016-March/119484.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60790</commentid>
    <comment_count>5</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-04-05 09:26:11 +0000</bug_when>
    <thetext>The backport was merged: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=1341c1744be50bcd05272f5db06fe27c5d6a8aba</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>