mirror of
git://anongit.mindrot.org/openssh.git
synced 2025-01-05 09:09:38 +00:00
- (djm) [configure.ac] We now require a working vsnprintf everywhere (not
just for systems that lack asprintf); check for it always and extend test to catch more brokenness. Fixes builds on Solaris <= 9
This commit is contained in:
parent
4cec036362
commit
d244a5816f
@ -1,6 +1,9 @@
|
|||||||
20140823
|
20140823
|
||||||
- (djm) [sshd.c] Ignore SIGXFSZ in preauth monitor child; can explode on
|
- (djm) [sshd.c] Ignore SIGXFSZ in preauth monitor child; can explode on
|
||||||
lastlog writing on platforms with high UIDs; bz#2263
|
lastlog writing on platforms with high UIDs; bz#2263
|
||||||
|
- (djm) [configure.ac] We now require a working vsnprintf everywhere (not
|
||||||
|
just for systems that lack asprintf); check for it always and extend
|
||||||
|
test to catch more brokenness. Fixes builds on Solaris <= 9
|
||||||
|
|
||||||
20140822
|
20140822
|
||||||
- (djm) [configure.ac] include leading zero characters in OpenSSL version
|
- (djm) [configure.ac] include leading zero characters in OpenSSL version
|
||||||
|
26
configure.ac
26
configure.ac
@ -1,4 +1,4 @@
|
|||||||
# $Id: configure.ac,v 1.581 2014/08/22 08:06:21 djm Exp $
|
# $Id: configure.ac,v 1.582 2014/08/23 07:06:49 djm Exp $
|
||||||
#
|
#
|
||||||
# Copyright (c) 1999-2004 Damien Miller
|
# Copyright (c) 1999-2004 Damien Miller
|
||||||
#
|
#
|
||||||
@ -15,7 +15,7 @@
|
|||||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org])
|
AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org])
|
||||||
AC_REVISION($Revision: 1.581 $)
|
AC_REVISION($Revision: 1.582 $)
|
||||||
AC_CONFIG_SRCDIR([ssh.c])
|
AC_CONFIG_SRCDIR([ssh.c])
|
||||||
AC_LANG([C])
|
AC_LANG([C])
|
||||||
|
|
||||||
@ -1887,11 +1887,9 @@ if test "x$ac_cv_func_snprintf" = "xyes" ; then
|
|||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If we don't have a working asprintf, then we strongly depend on vsnprintf
|
# We depend on vsnprintf returning the right thing on overflow: the
|
||||||
# returning the right thing on overflow: the number of characters it tried to
|
# number of characters it tried to create (as per SUSv3)
|
||||||
# create (as per SUSv3)
|
if test "x$ac_cv_func_vsnprintf" = "xyes" ; then
|
||||||
if test "x$ac_cv_func_asprintf" != "xyes" && \
|
|
||||||
test "x$ac_cv_func_vsnprintf" = "xyes" ; then
|
|
||||||
AC_MSG_CHECKING([whether vsnprintf returns correct values on overflow])
|
AC_MSG_CHECKING([whether vsnprintf returns correct values on overflow])
|
||||||
AC_RUN_IFELSE(
|
AC_RUN_IFELSE(
|
||||||
[AC_LANG_PROGRAM([[
|
[AC_LANG_PROGRAM([[
|
||||||
@ -1901,13 +1899,21 @@ if test "x$ac_cv_func_asprintf" != "xyes" && \
|
|||||||
|
|
||||||
int x_snprintf(char *str, size_t count, const char *fmt, ...)
|
int x_snprintf(char *str, size_t count, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
size_t ret; va_list ap;
|
size_t ret;
|
||||||
va_start(ap, fmt); ret = vsnprintf(str, count, fmt, ap); va_end(ap);
|
va_list ap;
|
||||||
|
|
||||||
|
va_start(ap, fmt);
|
||||||
|
ret = vsnprintf(str, count, fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
]], [[
|
]], [[
|
||||||
char x[1];
|
char x[1];
|
||||||
exit(x_snprintf(x, 1, "%s %d", "hello", 12345) == 11 ? 0 : 1);
|
if (x_snprintf(x, 1, "%s %d", "hello", 12345) != 11)
|
||||||
|
return 1;
|
||||||
|
if (x_snprintf(NULL, 0, "%s %d", "hello", 12345) != 11)
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
]])],
|
]])],
|
||||||
[AC_MSG_RESULT([yes])],
|
[AC_MSG_RESULT([yes])],
|
||||||
[
|
[
|
||||||
|
Loading…
Reference in New Issue
Block a user