"setfattr -x" 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="foo" Excepted result is no output from getfattr.
d'oh. There's a list of operations for which paths are extracted from the client request, and REMOVE_XATTR isn't in that list. This still has the issues from 9317 to sort, but this part's trivial.
(In reply to comment #1) > d'oh. There's a list of operations for which paths are extracted from the > client request, and REMOVE_XATTR isn't in that list. > > This still has the issues from 9317 to sort, but this part'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.
Okay, so, it's a trivial one-line fix, but it'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->path); (... and yes, I'm aware that I put it in the wrong place, it should be one line higher.)
I've submitted a change to OE-Core to backport the fix from master of the pseudo git tree. I tested with Patrick'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
The backport was merged: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=1341c1744be50bcd05272f5db06fe27c5d6a8aba