Add configure check for vfork(2) and fall back to fork(2) if missing.
This commit is contained in:
@@ -1021,6 +1021,9 @@
|
||||
/* Define to 1 if you have the `va_copy' function. */
|
||||
#undef HAVE_VA_COPY
|
||||
|
||||
/* Define to 1 if you have the `vfork' function. */
|
||||
#undef HAVE_VFORK
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#undef HAVE_VSNPRINTF
|
||||
|
||||
|
2
configure
vendored
2
configure
vendored
@@ -3261,6 +3261,7 @@ as_fn_append ac_func_c_list " faccessat HAVE_FACCESSAT"
|
||||
as_fn_append ac_func_c_list " wordexp HAVE_WORDEXP"
|
||||
as_fn_append ac_func_c_list " getauxval HAVE_GETAUXVAL"
|
||||
as_fn_append ac_func_c_list " strtoull HAVE_STRTOULL"
|
||||
as_fn_append ac_func_c_list " vfork HAVE_VFORK"
|
||||
as_fn_append ac_func_c_list " seteuid HAVE_SETEUID"
|
||||
|
||||
# Auxiliary files required by this configure script.
|
||||
@@ -21259,6 +21260,7 @@ done
|
||||
|
||||
|
||||
|
||||
|
||||
for ac_func in execvpe
|
||||
do :
|
||||
ac_fn_c_check_func "$LINENO" "execvpe" "ac_cv_func_execvpe"
|
||||
|
@@ -2605,7 +2605,7 @@ dnl Function checks
|
||||
dnl
|
||||
AC_FUNC_GETGROUPS
|
||||
AC_FUNC_FSEEKO
|
||||
AC_CHECK_FUNCS_ONCE([fexecve fmemopen killpg nl_langinfo faccessat wordexp getauxval strtoull])
|
||||
AC_CHECK_FUNCS_ONCE([fexecve fmemopen killpg nl_langinfo faccessat wordexp getauxval strtoull vfork])
|
||||
AC_CHECK_FUNCS([execvpe], [SUDO_APPEND_INTERCEPT_EXP(execvpe)])
|
||||
AC_CHECK_FUNCS([pread], [
|
||||
# pread/pwrite on 32-bit HP-UX 11.x may not support large files
|
||||
|
@@ -52,6 +52,10 @@
|
||||
#include "sudo_util.h"
|
||||
#include "pathnames.h"
|
||||
|
||||
#ifndef HAVE_VFORK
|
||||
# define vfork fork
|
||||
#endif
|
||||
|
||||
/* execl flavors */
|
||||
#define SUDO_EXECL 0x0
|
||||
#define SUDO_EXECLE 0x1
|
||||
|
Reference in New Issue
Block a user