From 0c3a8085b37ce545ac8923efdbbe0710162057fe Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 5 Jan 2017 06:22:58 -0700 Subject: [PATCH] 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. --- configure | 6 ++++++ configure.ac | 6 ++++++ doc/LICENSE | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) 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 -- 2.40.0