On Mon, 2009-12-21 at 23:25 +0200, Ahmed Ammar wrote:
> On Tue, 2009-12-15 at 18:37 +0100, Peter Stuge wrote
> > useradd is a C program and my idea is to make it use the chroot()
> > system call. This system call changes the root directory for the
> > calling process. The chroot utility uses this system call, and then
> > executes a shell or other program inside the new root. The utility
> > will of course not work cross platform.
> > 
> > As long as the useradd C program does not rely on other executables
> > at runtime, which I severly doubt considering the nature of the
> > program, calling chroot() early in useradd would work regardless of
> > what binaries, if any, are inside the new root dir. useradd only
> > touches the user database text files.
> 
> Sounds like a simple enough idea. Patches welcome? Might be worth
> looking at how Gentoo Prefix does it first though.


FYI. This is GLEP-0027 and it's not handled anywhere properly yet afaik.

http://www.gentoo.org/proj/en/glep/glep-0027.html


-- 
Ned Ludd <[email protected]>
Gentoo Linux


Reply via email to