[Bug 3349] Test sshd in chroot fails when syscall close_range is undefined and openssh is built with glibc 2.34

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri Oct 8 21:40:36 AEDT 2021


https://bugzilla.mindrot.org/show_bug.cgi?id=3349

--- Comment #8 from Florian Weimer <fweimer at redhat.com> ---
(In reply to Darren Tucker from comment #7)
> Created attachment 3551 [details]
> use close_range with fallback
> 
> (In reply to Florian Weimer from comment #6)
> > This patch is not the right way to do this. You should call
> > close_range (either the glibc wrapper or the system call via the
> > generic syscall function) and perform emulation as a fallback.
> > Failure with close_range (including lack of kernel support) does not
> > terminate the process.
> 
> oh, I didn't realise close_range was exposed by glibc.

Thanks, this patch looks much better to me. However, including
<linux/close_range.h> does not add value here. The prototype is
declared in <unistd.h> (if at all), and you don't need any constants
from the UAPI header.

-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list