Re: [PATCH 1/3] fix setsid() for sub-namespace /sbin/init

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric W. Biederman
Date: Monday, November 26, 2007 - 2:40 pm

Oleg Nesterov <oleg@tv-sign.ru> writes:


Since session == pgrp == 0 is the historical start condition for /sbin/init there
is no problem from the session perspective, it in fact is better.

The only case that might have cared was setting si_pid when sending signals,
and it turns out it is both simple and necessary to handle that case across
namespaces anyway.

So there is no reason not to handle this.


init starting with session == pgrp == 0 is historical linux behavior.  I consider
the current 2.6 behavior a temporary aberation from the historical linux behavior.

sysvinit does call setsid.  And nothing really bad will happen if someone forgets
to call setsid, in some obscure version of init.

Plus once we do this the code will be easier to maintain because we have
removed one obscure special case.

Eric
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/3] fix setsid() for sub-namespace /sbin/init, Oleg Nesterov, (Mon Nov 26, 7:25 am)
Re: [PATCH 1/3] fix setsid() for sub-namespace /sbin/init, Oleg Nesterov, (Mon Nov 26, 7:43 am)
Re: [PATCH 1/3] fix setsid() for sub-namespace /sbin/init, Pavel Emelyanov, (Mon Nov 26, 8:00 am)
Re: [PATCH 1/3] fix setsid() for sub-namespace /sbin/init, Eric W. Biederman, (Mon Nov 26, 12:16 pm)
Re: [PATCH 1/3] fix setsid() for sub-namespace /sbin/init, Oleg Nesterov, (Mon Nov 26, 1:11 pm)
Re: [PATCH 1/3] fix setsid() for sub-namespace /sbin/init, Eric W. Biederman, (Mon Nov 26, 2:40 pm)
Re: [PATCH 1/3] fix setsid() for sub-namespace /sbin/init, Oleg Nesterov, (Mon Nov 26, 3:46 pm)