[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1193681247.24087.206.camel@localhost>
Date: Mon, 29 Oct 2007 11:07:27 -0700
From: Dave Hansen <haveblue@...ibm.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org,
Linux Containers <containers@...ts.osdl.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Oleg Nesterov <oleg@...sign.ru>,
Pavel Emelyanov <xemul@...nvz.org>,
"Sukadev Bhattiprolu [imap]" <sukadev@...ibm.com>
Subject: Re: [PATCH] pidns: Limit kill -1 and cap_set_all
On Mon, 2007-10-29 at 11:59 -0600, Eric W. Biederman wrote:
> ier to read.) Also, can
> > we think of any better name for this? It seems a bit funky that:
> >
> > pid_in_pid_ns(mypid, &init_pid_ns);
> >
> > would _ever_ return 0.
>
> It can't.
>
> > So, it isn't truly a test for belonging *in* a
> > namespace, but having that namespace be the lowest level one.
>
> No. It is precisely a test for being in a namespace.
> We first check ns->level to make certain it doesn't fall out
> of the array, and then we check to see if the namespace we
> are looking for is at that level.
>
> pid->numbers[0].ns == &init_pid_ns.
Ahhh. I misparsed the:
pid->numbers[ns->level].ns == ns;
line to be checking at the pid level. You're right, it works fine as it
stands.
-- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists