Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Nov 2021 09:21:25 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 259770] ggate: jail(2) failure error: Unable to jail process in directory /var/empty after stable/12 src ca9ab8ea1774
Message-ID:  <bug-259770-227-pjk4NYmV9T@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-259770-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-259770-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D259770

--- Comment #8 from Fabian Keil <fk@fabiankeil.de> ---
(In reply to Kyle Evans from comment #7)

D'oh. Thanks, Kyle.

Somehow I was under the impression that CLOEXEC would apply to forks
as well but obviously it does not.

Calling "pidfile_close(pfh)" before "g_gate_drop_privs()"
lets jail(2) succeed:

[fk@steffen ~]$ sysctl kern.pwd_chroot_chdir_check_open_directories
kern.pwd_chroot_chdir_check_open_directories: 1
[fk@steffen ~]$ sudo ggated -v -j
info: Listen on port: 3080.
debug: Privileges successfully dropped using jail+setgid+setuid.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-259770-227-pjk4NYmV9T>