[openssh-commits] [openssh] 01/03: Skip select+rlimit check if sandboxing is disabled

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Jul 1 16:01:06 AEST 2022


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 32e82a392d9f263485effdd606ff5862d289a4a0
Author: Darren Tucker <dtucker at dtucker.net>
Date:   Fri Jul 1 13:55:19 2022 +1000

    Skip select+rlimit check if sandboxing is disabled
    
    It's not needed in that case, and the test can fail when being built
    with some compiler memory sanitizer flags.  bz#3441
---
 configure.ac | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1f9d23a3..0aba3709 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3552,10 +3552,13 @@ AC_ARG_WITH([sandbox],
 
 # POSIX specifies that poll() "shall fail with EINVAL if the nfds argument
 # is greater than OPEN_MAX".  On some platforms that includes implementions
-# ofselect in userspace on top of poll() so check both work with rlimit NOFILES
-# so check that both work before enabling the rlimit sandbox.
+# of select in userspace on top of poll() so check both work with rlimit
+# NOFILES so check that both work before enabling the rlimit sandbox.
 AC_MSG_CHECKING([if select and/or poll works with descriptor rlimit])
-AC_RUN_IFELSE(
+if test "x$sandbox_arg" = "xno"; then
+    AC_MSG_RESULT([sandboxing disabled, skipping])
+else
+    AC_RUN_IFELSE(
 	[AC_LANG_PROGRAM([[
 #include <sys/types.h>
 #ifdef HAVE_SYS_TIME_H
@@ -3608,7 +3611,8 @@ AC_RUN_IFELSE(
 	 select_works_with_rlimit=no],
 	[AC_MSG_WARN([cross compiling: assuming no])
 	 select_works_with_rlimit=no]
-)
+    )
+fi
 
 AC_CHECK_MEMBERS([struct pollfd.fd], [], [], [[
 #include <sys/types.h>

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list