From: Todd C. Miller Date: Thu, 5 Jan 2017 13:22:58 +0000 (-0700) Subject: Avoid using the system strnlen/strndup on AIX < 6. Even if configure X-Git-Tag: SUDO_1_8_19p2^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c3a8085b37ce545ac8923efdbbe0710162057fe;p=sudo Avoid using the system strnlen/strndup on AIX < 6. Even if configure correctly detects it is working on the build machine, the sudo package may be run on a system with an old libc were it is broken. --- diff --git a/configure b/configure index 5bc7e68f4..ae14da306 100755 --- a/configure +++ b/configure @@ -15118,6 +15118,12 @@ fi *) RTLD_PRELOAD_VAR="LDR_PRELOAD";; esac + # strnlen/strndup may be broken on AIX < 6 depending + # on the libc version, use our own. + if test $OSMAJOR -lt 6; then + ac_cv_func_strnlen=no + fi + # Remove timedir on boot, AIX does not have /var/run INIT_SCRIPT=aix.sh INIT_DIR=/etc/rc.d/init.d diff --git a/configure.ac b/configure.ac index 3842a9131..9d09eea7d 100644 --- a/configure.ac +++ b/configure.ac @@ -1730,6 +1730,12 @@ case "$host" in *) RTLD_PRELOAD_VAR="LDR_PRELOAD";; esac + # strnlen/strndup may be broken on AIX < 6 depending + # on the libc version, use our own. + if test $OSMAJOR -lt 6; then + ac_cv_func_strnlen=no + fi + # Remove timedir on boot, AIX does not have /var/run INIT_SCRIPT=aix.sh INIT_DIR=/etc/rc.d/init.d diff --git a/doc/LICENSE b/doc/LICENSE index 1e151fe9f..7a45c8946 100644 --- a/doc/LICENSE +++ b/doc/LICENSE @@ -1,6 +1,6 @@ Sudo is distributed under the following license: - Copyright (c) 1994-1996, 1998-2016 + Copyright (c) 1994-1996, 1998-2017 Todd C. Miller Permission to use, copy, modify, and distribute this software for any