Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jun 2018 11:54:21 +0800
From:      Erich Dollansky <freebsd.ed.lists@sumeritec.com>
To:        "James B. Byrne via freebsd-questions" <freebsd-questions@freebsd.org>
Cc:        byrnejb@harte-lyne.ca
Subject:   Re: FreeBSD-11.1 - symbolic links in jails
Message-ID:  <20180626115421.26159ff8.freebsd.ed.lists@sumeritec.com>
In-Reply-To: <5c01d3596c548d3bac00e22ff2fcd2a5.squirrel@webmail.harte-lyne.ca>
References:  <5c01d3596c548d3bac00e22ff2fcd2a5.squirrel@webmail.harte-lyne.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Mon, 25 Jun 2018 12:59:06 -0400
"James B. Byrne via freebsd-questions" <freebsd-questions@freebsd.org>
wrote:

> I wish to confirm that this is intended behaviour; that a single
> symbolic link can have differing target files depending whether one is
> in a jail or not.
> 
> 
it is even a bit more confusing. When you access the same link from
outside the jail, it will target really the one in the root directory.
Symbolic links are always relative to the environment it is used in.
But they can cross mount points.

If you want to make a link always pointing to the same thing, you will
have to use hard links. But you are not able to cross mount points then
and it opens the doors for software breaking out of the jail.

Erich



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180626115421.26159ff8.freebsd.ed.lists>