Subject: Re: openat(2) and friends
To: Steinar Hamre <steinarh@pvv.ntnu.no>
From: Rhialto <rhialto@azenomei.knuffel.net>
List: tech-kern
Date: 03/08/2005 17:22:53
On Tue 08 Mar 2005 at 17:09:01 +0100, Steinar Hamre wrote:
> > Similar checks are also in sys_fchroot() and sys_chroot(), and in
> > kern/uipc_usrreq.c:unp_externalize().
> 
> Ok. I'll add it.

With all these new system calls there are now so many more places where
this check needs to be added... I was thinking that it would perhaps be
getting more efficient to do all this checking for fd-s outside the
chroot area at the time the chroot is done. That is, change the strategy
from "check when used" to "check when created".

That would include the unp_externalize() case when fd-s are passed
in via a socket, and when a chroot() variant is done, but I don't think
any other place. The check in sys_chdir() could in theory be removed.

> 	Steinar
-Olaf.
-- 
___ Olaf 'Rhialto' Seibert                            --  rhialto/at/falu.nl
\X/ Hi! I'm a signature virus! Copy me to your .signature to help me spread!