On 06/01/2011 02:47 AM, Phil Blundell wrote:
On Tue, 2011-05-31 at 12:53 -0700, Scott Garman wrote:
This adds a -native recipe for the shadow utilities.

The custom --root option allows the the following utilities to be
run within a chroot when invoked under pseudo:

Rather than patching the code for all these utilities, can't you just
wrap them in a call to chroot(8)?  That is, make useradd.bbclass do:

eval $PSEUDO chroot ${STAGING_DIR_TARGET} useradd ...

rather than the existing

eval $PSEUDO useradd --root ${STAGING_DIR_TARGET} ...

That's a reasonable suggestion. I haven't tried it yet, but I have found that pseudo's chroot(2) implementation is not complete. One of the cases where it does not work is when forking child processes, which breaks the jail and the child processes are no longer chroot'ed.

My guess is that chroot(8) is going to call chroot(2) and then fork a child process to run its additional arguments.

cc'ing Mark directly in case he has additional comments or needs to correct me.

Scott

--
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center

_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to