[OE-core] pseudo: host user contamination

Burton, Ross ross.burton at intel.com
Fri Mar 23 16:17:53 UTC 2018


On 23 March 2018 at 16:10, Enrico Scholz
<enrico.scholz at sigma-chemnitz.de> wrote:
> "Burton, Ross" <ross.burton at intel.com> writes:
>
>>> do_install() {
>>>         install -D -p -m 0644 bar ${D}/bin/bar
>>>         install -d -m 0755 ${D}/usr/bin
>>>         mv ${D}/bin/bar ${D}/usr/bin/bar
>>>         ln -s /usr/bin/bar ${D}/bin/bar
>>> }
>>>
>>> FILES_${PN} = "/bin/* /usr/bin/*"
>>> ---
>>>
>>> WARNING: foo-1.0-r0 do_package_qa: QA Issue: foo: /foo/usr/bin/bar
>>> is owned by uid 505, which is the same as the user running
>>> bitbake. This may be due to host contamination
>>> [host-user-contaminated]
>>
>> Works for me: install correctly changes owner to root:root as it
>> should.
>
> I think, 'mv' is the culprit.  It calls 'renameat2()' directly over
> 'syscall()':
>
> | $ ltrace mv foo bar
> | ...
> | syscall(316, 0xffffff9c, 0x7fff1564a341, 0xffffff9c)                                            = 0
>
>
> Perhaps, 'pseudo' does not catch this?

I suspect that would do it as pseudo is basically a glorified LD_PRELOAD.  Sigh.

CCing Peter, pseudo author.

Ross



More information about the Openembedded-core mailing list