зеркало из https://github.com/Azure/sonic-openssh.git
remove SELECT_REQUIRED_FDS added erroneously with strnlen. spotted by tim
This commit is contained in:
Родитель
036876cd7d
Коммит
b0b29cc0c5
49
configure.ac
49
configure.ac
|
@ -1,4 +1,4 @@
|
|||
# $Id: configure.ac,v 1.482 2011/09/29 13:17:21 dtucker Exp $
|
||||
# $Id: configure.ac,v 1.483 2011/10/02 07:49:24 dtucker Exp $
|
||||
#
|
||||
# Copyright (c) 1999-2004 Damien Miller
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org])
|
||||
AC_REVISION($Revision: 1.482 $)
|
||||
AC_REVISION($Revision: 1.483 $)
|
||||
AC_CONFIG_SRCDIR([ssh.c])
|
||||
AC_LANG([C])
|
||||
|
||||
|
@ -2506,51 +2506,6 @@ elif test "x$sandbox_arg" = "xrlimit" || \
|
|||
AC_MSG_ERROR([rlimit sandbox requires setrlimit function])
|
||||
SANDBOX_STYLE="rlimit"
|
||||
AC_DEFINE([SANDBOX_RLIMIT], [1], [Sandbox using setrlimit(2)])
|
||||
|
||||
AC_MSG_CHECKING([if select works with zero available fds])
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
#include <sys/time.h>
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <sys/resource.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
]], [[
|
||||
struct rlimit rl_zero;
|
||||
int fd, r;
|
||||
fd_set fds;
|
||||
|
||||
fd = open("/dev/null", O_RDWR);
|
||||
rl_zero.rlim_cur = rl_zero.rlim_max = 0;
|
||||
setrlimit(RLIMIT_FSIZE, &rl_zero);
|
||||
setrlimit(RLIMIT_NOFILE, &rl_zero);
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(fd, &fds);
|
||||
r = select(fd+1, &fds, NULL, NULL, NULL);
|
||||
if (r == -1)
|
||||
exit(1);
|
||||
exit(0);
|
||||
]])], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([SELECT_REQUIRED_FDS], [0],
|
||||
[number of available fds required for select])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE([SELECT_REQUIRED_FDS], [1],
|
||||
[number of available fds required for select])
|
||||
], [
|
||||
AC_MSG_RESULT([cross-compiling, assuming yes])
|
||||
AC_DEFINE([SELECT_REQUIRED_FDS], [0],
|
||||
[assuming select works with zero free fds])
|
||||
]
|
||||
)
|
||||
elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \
|
||||
test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then
|
||||
SANDBOX_STYLE="none"
|
||||
|
|
Загрузка…
Ссылка в новой задаче