git: fcfe407d2aaa - stable/15 - chroot.2: document EPERM for shared pwd

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 11 Nov 2026 01:07:02 UTC
The branch stable/15 has been updated by kib:

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

commit fcfe407d2aaa697696d0a19d19e6403f084bd2af
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-10-24 13:22:58 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-10 19:53:56 +0000

    chroot.2: document EPERM for shared pwd
    
    (cherry picked from commit aff8d265fa1c4b6d5c7a5220e328bcb7b62585f2)
---
 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.