[CFR] [PATCH] jail mount/unmount patch
Pawel Jakub Dawidek
pjd at FreeBSD.org
Thu Jul 28 17:38:16 UTC 2011
On Thu, Jul 28, 2011 at 08:25:39PM +0300, Kostik Belousov wrote:
> On Thu, Jul 28, 2011 at 06:07:52PM +0200, Pawel Jakub Dawidek wrote:
> > In you patch you depend on fact that full path to mount directory is
> > passed to the nmount(2) system call. This doesn't have to be true.
> > I changed mount(8) to call realpath(3) in mount directory, but I see no
> > reason someone calling nmount(2) directly with "./foo" mount dir.
> >
> > I think the proper way is to build full path from within the kernel
> > using vn_fullpath_global().
>
> It indeed may work if the supplied vnode is a directory, since it
> will fall back to the dotdot lookup loop if the namecache is purged.
Exactly. Mount directory by definition is always a directory, so it
should be reliable.
--
Pawel Jakub Dawidek http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://yomoli.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/zfs-devel/attachments/20110728/03253acd/attachment.pgp
More information about the zfs-devel
mailing list