1 |
On Mon, 2009-12-21 at 23:25 +0200, Ahmed Ammar wrote: |
2 |
> On Tue, 2009-12-15 at 18:37 +0100, Peter Stuge wrote |
3 |
> > useradd is a C program and my idea is to make it use the chroot() |
4 |
> > system call. This system call changes the root directory for the |
5 |
> > calling process. The chroot utility uses this system call, and then |
6 |
> > executes a shell or other program inside the new root. The utility |
7 |
> > will of course not work cross platform. |
8 |
> > |
9 |
> > As long as the useradd C program does not rely on other executables |
10 |
> > at runtime, which I severly doubt considering the nature of the |
11 |
> > program, calling chroot() early in useradd would work regardless of |
12 |
> > what binaries, if any, are inside the new root dir. useradd only |
13 |
> > touches the user database text files. |
14 |
> |
15 |
> Sounds like a simple enough idea. Patches welcome? Might be worth |
16 |
> looking at how Gentoo Prefix does it first though. |
17 |
|
18 |
|
19 |
FYI. This is GLEP-0027 and it's not handled anywhere properly yet afaik. |
20 |
|
21 |
http://www.gentoo.org/proj/en/glep/glep-0027.html |
22 |
|
23 |
|
24 |
-- |
25 |
Ned Ludd <solar@g.o> |
26 |
Gentoo Linux |