From aff8d265fa1c4b6d5c7a5220e328bcb7b62585f2 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sat, 24 Oct 2026 16:22:58 +0300 Subject: [PATCH] chroot.2: document EPERM for shared pwd Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D60963 --- lib/libsys/chroot.2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libsys/chroot.2 b/lib/libsys/chroot.2 index 6e64b28ccf97..6dd93d28033a 100644 --- a/lib/libsys/chroot.2 +++ b/lib/libsys/chroot.2 @@ -126,6 +126,11 @@ process has not enabled the .Dv PROC_NO_NEW_PRIVS_CTL .Xr procctl 2 . .It Bq Er EPERM +The effective user ID is not the super-user and the +current/root directory state of the process is shared with +another process, see +.Xr rfork 2 . +.It Bq Er EPERM One or more file descriptors are open directories and the .Ql Va kern.chroot_allow_open_directories sysctl is not set to permit this.