Created attachment 3445 [details] Utility to reproduce the bug For some reason after renameat() extended attributes are no more there. Strangely enough it is not the case with plain rename(). The attached program gives no error in normal environment and outputs "fgetattr: no data available" in pseudo. try as root: make; make test
Huh. That's mildly surprising, renameat() shouldn't need to do anything about extended attributes unless it's moving across filesystems, since xattrs are stored by dev/inode. I'll try to get a look.
Thank you! I was debugging communication from the client side (calls to pseudo_client_request) and the only difference between rename and renameat that I've noticed is that rename (healthy one) OP_STATs the old file and doesn't OP_LINK it, while renameat (th buggy one) goes directly to OP_LINK without OP_STAT. One can actually see the difference in ports/unix/guts/rename(at).c - lines 37-39 in rename.c that are missing in renameat.c. Could you please tell me, what is the reason for this difference? I couldn't figure it out yet.
I've sent a patch with possible solution. I've tested it shortly on my utility, but I don't know pseudo good enough to be sure that it doesn't break anything. Please take a look. https://lists.yoctoproject.org/pipermail/poky/2016-September/010725.html
The patch is correct and is now merged in upstream.
Submitted for inclusion in the upcoming release: http://lists.openembedded.org/pipermail/openembedded-core/2016-October/127359.html