Re: standard FAQ procedure ... in chroot

2014-06-08 Thread Andres Perera
On Sun, Jun 8, 2014 at 12:16 PM, Janne Johansson wrote: > It feels like you are trying to convince someone that > chroot("/"); > equals not being chrooted at all. Not at all. I'm trying to convince someone to explain what chrooted means, preferably without changing current semantics. chroot(2),

Re: standard FAQ procedure ... in chroot

2014-06-08 Thread Janne Johansson
It feels like you are trying to convince someone that chroot("/"); equals not being chrooted at all. In my view several things happen when a pid is started in a chroot, including 1. the dir used as a parameter for the chroot will always be its own parent dir so that you may never again go above it

Re: standard FAQ procedure ... in chroot

2014-06-08 Thread Andres Perera
On Sun, Jun 8, 2014 at 3:51 AM, Otto Moerbeek wrote: > On Sun, Jun 08, 2014 at 02:59:08AM -0430, Andres Perera wrote: > >> On Sun, Jun 8, 2014 at 2:24 AM, Janne Johansson wrote: >> > I don't think there is a word for "chroot back". >> >> I don't think you read, understood, and executed the sample

Re: standard FAQ procedure ... in chroot

2014-06-08 Thread sven falempin
On Sun, Jun 8, 2014 at 4:21 AM, Otto Moerbeek wrote: > On Sun, Jun 08, 2014 at 02:59:08AM -0430, Andres Perera wrote: > >> On Sun, Jun 8, 2014 at 2:24 AM, Janne Johansson wrote: >> > I don't think there is a word for "chroot back". >> >> I don't think you read, understood, and executed the sample

Re: standard FAQ procedure ... in chroot

2014-06-08 Thread Otto Moerbeek
On Sun, Jun 08, 2014 at 02:59:08AM -0430, Andres Perera wrote: > On Sun, Jun 8, 2014 at 2:24 AM, Janne Johansson wrote: > > I don't think there is a word for "chroot back". > > I don't think you read, understood, and executed the sample. > > After chroot("/"), or chroot(FOO), you can't mknod(2)

Re: standard FAQ procedure ... in chroot

2014-06-08 Thread Andres Perera
On Sun, Jun 8, 2014 at 2:24 AM, Janne Johansson wrote: > I don't think there is a word for "chroot back". I don't think you read, understood, and executed the sample. After chroot("/"), or chroot(FOO), you can't mknod(2), therefore the description is wrong. Once you limit yourself > into a chro

Re: standard FAQ procedure ... in chroot

2014-06-07 Thread Janne Johansson
I don't think there is a word for "chroot back". Once you limit yourself into a chroot, you are stuck in it and get special treatment until you exit. Apart from why mknod wants to fail inside chroots, having a simple syscall being able to take you out of it would defeat the whole purpose, no? 20

Re: standard FAQ procedure ... in chroot

2014-06-07 Thread Andres Perera
The description of EINVAL in mknod(2) is wrong: [EINVAL] The process is running within an alternate root directory, as created by chroot(2). Even if a process chroot()s back to /, it can't create a device node. The program below exits with EINVAL: #include

Re: standard FAQ procedure ... in chroot

2014-06-07 Thread sven falempin
On Sat, Jun 7, 2014 at 3:12 PM, Miod Vallat wrote: >> >> Is this some kind of security protection ? >> > >> > of course... see mknod(2). >> >> i read it and still does not understand. > > Check the description of EINVAL. i was reading the (8) man pages :-( So DESTDIR is nor working and make rel

Re: standard FAQ procedure ... in chroot

2014-06-07 Thread Miod Vallat
> >> Is this some kind of security protection ? > > > > of course... see mknod(2). > > i read it and still does not understand. Check the description of EINVAL.

Re: standard FAQ procedure ... in chroot

2014-06-07 Thread sven falempin
On Sat, Jun 7, 2014 at 1:41 PM, Otto Moerbeek wrote: > On Sat, Jun 07, 2014 at 01:30:01PM -0400, sven falempin wrote: > >> On Sat, Jun 7, 2014 at 12:38 PM, Otto Moerbeek wrote: >> > On Sat, Jun 07, 2014 at 12:28:28PM -0400, sven falempin wrote: >> > >> >> On Sat, Jun 7, 2014 at 12:14 PM, sven fal

Re: standard FAQ procedure ... in chroot

2014-06-07 Thread Otto Moerbeek
On Sat, Jun 07, 2014 at 01:30:01PM -0400, sven falempin wrote: > On Sat, Jun 7, 2014 at 12:38 PM, Otto Moerbeek wrote: > > On Sat, Jun 07, 2014 at 12:28:28PM -0400, sven falempin wrote: > > > >> On Sat, Jun 7, 2014 at 12:14 PM, sven falempin > >> wrote: > >> > On Sat, Jun 7, 2014 at 11:30 AM, O

Re: standard FAQ procedure ... in chroot

2014-06-07 Thread sven falempin
On Sat, Jun 7, 2014 at 12:38 PM, Otto Moerbeek wrote: > On Sat, Jun 07, 2014 at 12:28:28PM -0400, sven falempin wrote: > >> On Sat, Jun 7, 2014 at 12:14 PM, sven falempin >> wrote: >> > On Sat, Jun 7, 2014 at 11:30 AM, Otto Moerbeek wrote: >> >> On Sat, Jun 07, 2014 at 08:20:00AM -0400, sven fa

Re: standard FAQ procedure ... in chroot

2014-06-07 Thread Otto Moerbeek
On Sat, Jun 07, 2014 at 12:28:28PM -0400, sven falempin wrote: > On Sat, Jun 7, 2014 at 12:14 PM, sven falempin > wrote: > > On Sat, Jun 7, 2014 at 11:30 AM, Otto Moerbeek wrote: > >> On Sat, Jun 07, 2014 at 08:20:00AM -0400, sven falempin wrote: > >> > >>> On Sat, Jun 7, 2014 at 6:58 AM, Stuar

Re: standard FAQ procedure ... in chroot

2014-06-07 Thread sven falempin
On Sat, Jun 7, 2014 at 12:14 PM, sven falempin wrote: > On Sat, Jun 7, 2014 at 11:30 AM, Otto Moerbeek wrote: >> On Sat, Jun 07, 2014 at 08:20:00AM -0400, sven falempin wrote: >> >>> On Sat, Jun 7, 2014 at 6:58 AM, Stuart Henderson >>> wrote: >>> > On 2014-06-06, sven falempin wrote: >>> >> De

Re: standard FAQ procedure ... in chroot

2014-06-07 Thread Otto Moerbeek
On Sat, Jun 07, 2014 at 12:14:55PM -0400, sven falempin wrote: > On Sat, Jun 7, 2014 at 11:30 AM, Otto Moerbeek wrote: > > On Sat, Jun 07, 2014 at 08:20:00AM -0400, sven falempin wrote: > > > >> On Sat, Jun 7, 2014 at 6:58 AM, Stuart Henderson > >> wrote: > >> > On 2014-06-06, sven falempin wr

Re: standard FAQ procedure ... in chroot

2014-06-07 Thread sven falempin
On Sat, Jun 7, 2014 at 11:30 AM, Otto Moerbeek wrote: > On Sat, Jun 07, 2014 at 08:20:00AM -0400, sven falempin wrote: > >> On Sat, Jun 7, 2014 at 6:58 AM, Stuart Henderson >> wrote: >> > On 2014-06-06, sven falempin wrote: >> >> Dear misc readers, >> >> >> >> I try to understand why MAKEDEV is

Re: standard FAQ procedure ... in chroot

2014-06-07 Thread Otto Moerbeek
On Sat, Jun 07, 2014 at 08:20:00AM -0400, sven falempin wrote: > On Sat, Jun 7, 2014 at 6:58 AM, Stuart Henderson wrote: > > On 2014-06-06, sven falempin wrote: > >> Dear misc readers, > >> > >> I try to understand why MAKEDEV is failing inside my chroot, while i > >> can manually create some de

Re: standard FAQ procedure ... in chroot

2014-06-07 Thread sven falempin
On Sat, Jun 7, 2014 at 6:58 AM, Stuart Henderson wrote: > On 2014-06-06, sven falempin wrote: >> Dear misc readers, >> >> I try to understand why MAKEDEV is failing inside my chroot, while i >> can manually create some dev with mknod . >> >> Like: >> SCRIPT ${DESTDIR}/dev/MAKEDEV

Re: standard FAQ procedure ... in chroot

2014-06-07 Thread Stuart Henderson
On 2014-06-06, sven falempin wrote: > Dear misc readers, > > I try to understand why MAKEDEV is failing inside my chroot, while i > can manually create some dev with mknod . > > Like: > SCRIPT ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV > SPECIAL cd dev; sh MAKEDEV ramdisk > sh: [1]: mkno

standard FAQ procedure ... in chroot

2014-06-06 Thread sven falempin
Dear misc readers, I try to understand why MAKEDEV is failing inside my chroot, while i can manually create some dev with mknod . Like: SCRIPT ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV SPECIAL cd dev; sh MAKEDEV ramdisk sh: [1]: mknod: console: Invalid argument sh: [1]: mknod: tty: Inv