[openssh-commits] [openssh] branch master updated: Fix pledge(2) special casing
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon Aug 18 17:00:51 AEST 2025
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
The following commit(s) were added to refs/heads/master by this push:
new 3ef1a87d0 Fix pledge(2) special casing
3ef1a87d0 is described below
commit 3ef1a87d0a29eac94f32371af628e81eb2e2d817
Author: Damien Miller <djm at mindrot.org>
AuthorDate: Mon Aug 18 17:00:26 2025 +1000
Fix pledge(2) special casing
Unbreaks non-OpenBSD platforms
---
configure.ac | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index bc1900af7..71766ba10 100644
--- a/configure.ac
+++ b/configure.ac
@@ -629,6 +629,9 @@ SOLARIS_PRIVS="no"
# Default shared library extension
SHLIBEXT=".so"
+# See OpenBSD section in $host case below.
+need_pledge_inet=""
+
# Check for some target-specific stuff
case "$host" in
*-*-aix*)
@@ -1129,7 +1132,6 @@ mips-sony-bsd|mips-sony-newsos4)
[syslog_r function is safe to use in in a signal handler])
TEST_MALLOC_OPTIONS="SJRU"
AC_MSG_CHECKING([whether pledge(2) allows IP_TOS])
- need_pledge_inet=""
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <sys/socket.h>
@@ -1151,12 +1153,6 @@ if (setsockopt(s, IPPROTO_IP, IP_TOS, &one, sizeof(one)) == -1)
need_pledge_inet=1
],
[ AC_MSG_WARN([cross compiling: cannot test]) ])
- if test -z "$need_pledge_inet" ; then
- AC_DEFINE_UNQUOTED([PLEDGE_EXTRA_INET], [])
- else
- AC_DEFINE_UNQUOTED([PLEDGE_EXTRA_INET], ["inet "],
- [need inet in pledge for setsockopt IP_TOS])
- fi
;;
*-*-solaris*)
if test "x$withval" != "xno" ; then
@@ -1430,6 +1426,14 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdlib.h> ]], [[ exit(0); ]])],
[ AC_MSG_WARN([cross compiling: not checking compiler sanity]) ]
)
+dnl Finish up special pledge(2) handling from above.
+if test -z "$need_pledge_inet" ; then
+ AC_DEFINE_UNQUOTED([PLEDGE_EXTRA_INET], [])
+else
+ AC_DEFINE_UNQUOTED([PLEDGE_EXTRA_INET], ["inet "],
+ [need inet in pledge for setsockopt IP_TOS])
+fi
+
dnl Checks for header files.
# Checks for libraries.
AC_CHECK_FUNC([setsockopt], , [AC_CHECK_LIB([socket], [setsockopt])])
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list