Bug 7093 - Files owned by build user when created by qemuwrapper
Summary: Files owned by build user when created by qemuwrapper
Status: VERIFIED WONTFIX
Alias: None
Product: Pseudo
Classification: Yocto Project Subprojects
Component: pseudo (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.1 M4
Assignee: Mark Hatle
QA Contact: Bogdan Alexandru Voiculescu
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-12-19 19:03 UTC by Christopher Larson
Modified: 2016-05-11 07:57 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Larson 2014-12-19 19:03:35 UTC
Files emitted at do_rootfs time by the user mode emulation qemu (e.g. generation of hwdb.bin, fontconfig cache, etc) end up owned by the build machine user rather than root/root.
Comment 1 Cristian Iorga 2015-02-19 10:02:43 UTC
Investigation started.
Comment 2 Cristian Iorga 2015-05-21 16:34:30 UTC
Put on hold, as there is no easy technical solution.
Comment 3 Cristian Iorga 2015-11-02 08:53:32 UTC
Moved to 2.1, 2.0 is already frozen feature-wise.
Comment 4 Saul Wold 2016-02-18 21:48:50 UTC
This is due to the fact that the qemuwrapper running in user space can not get 
access to pseudo.so to intercept the system call correctly  

(08:11:36 AM) sgw_: ERROR: ld.so: object 'libpseudo.so' from LD_PRELOAD cannot 
be preloaded (cannot open shared object file): ignored.

Trying to add libpseudo.so to the target would cause contamination in the 
target.

The workaround for this is to correct set the ownership / permissions in 
postinst scripts that calls the qemurapper with the the PSEUDO_UNLOAD such that 
they chown/chmod is called with pseudo correctly.
Comment 5 Mark Hatle 2016-02-18 21:50:43 UTC
When a qemu process is executed the LD_PRELOAD will be run.

The LD_PRELOAD if inherited into the target environment will not execute, as it's is designed to be running native and not target.

The system may choose to unload pseudo BEFORE calling qemu, if this is the case then any files created or modified by the pseudo method will not be under pseudo control, and thus inherit a system based user or password.

I believe this is a problem with the way QEMU is executing individual binaries, and not an error in pseudo itself.
Comment 6 Bogdan Alexandru Voiculescu 2016-05-11 07:57:53 UTC
Verified as Wontfix since the problem is not in Yocto project.