Gentoo Archives: gentoo-embedded

From: Ahmed Ammar <b33fc0d3@g.o>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] emerge --root : users not created
Date: Mon, 21 Dec 2009 21:26:36
Message-Id: 1261430712.26386.6.camel@gentoo-dev
In Reply to: Re: [gentoo-embedded] emerge --root : users not created by Peter Stuge
1 On Tue, 2009-12-15 at 18:37 +0100, Peter Stuge wrote
2 > useradd is a C program and my idea is to make it use the chroot()
3 > system call. This system call changes the root directory for the
4 > calling process. The chroot utility uses this system call, and then
5 > executes a shell or other program inside the new root. The utility
6 > will of course not work cross platform.
7 >
8 > As long as the useradd C program does not rely on other executables
9 > at runtime, which I severly doubt considering the nature of the
10 > program, calling chroot() early in useradd would work regardless of
11 > what binaries, if any, are inside the new root dir. useradd only
12 > touches the user database text files.
13
14 Sounds like a simple enough idea. Patches welcome? Might be worth
15 looking at how Gentoo Prefix does it first though.
16
17 A.

Replies

Subject Author
Re: [gentoo-embedded] emerge --root : users not created Ned Ludd <solar@g.o>