Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Oct 2025 17:16:15 GMT
From:      Olivier Certner <olce@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 6e888a22743f - stable/14 - jail.2: Mention EPERM is returned on open directories
Message-ID:  <202510101716.59AHGFU5009075@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by olce:

URL: https://cgit.FreeBSD.org/src/commit/?id=6e888a22743f67d3b130dd0a9b9849bcee160d2f

commit 6e888a22743f67d3b130dd0a9b9849bcee160d2f
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2025-09-01 09:31:23 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-10-10 17:15:55 +0000

    jail.2: Mention EPERM is returned on open directories
    
    The manual page does not directly mention this reason for getting EPERM,
    instead referring the reader to chroot(2).  We have had some questions
    about it recently, in part due to a bug (fixed), and this case is not an
    obvious permission/problem, so let's be more explicit.
    
    PR:             280809
    Reviewed by:    jamie
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52319
    
    (cherry picked from commit ef2f36be8fce8cf7a62ce7d33ab1c4a181fac3e2)
---
 lib/libc/sys/jail.2 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/libc/sys/jail.2 b/lib/libc/sys/jail.2
index 4bb4a6dde7d2..dd6107a7c201 100644
--- a/lib/libc/sys/jail.2
+++ b/lib/libc/sys/jail.2
@@ -23,7 +23,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd February 19, 2021
+.Dd September 15, 2025
 .Dt JAIL 2
 .Os
 .Sh NAME
@@ -379,6 +379,9 @@ and
 call
 .Xr chroot 2
 internally, so they can fail for all the same reasons.
+In particular, they return the
+.Bq Er EPERM
+error when the process to join a jail has open directories.
 Please consult the
 .Xr chroot 2
 manual page for details.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510101716.59AHGFU5009075>