2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

Prefer the python3 in /usr/bin on Solaris.

The /opt/csw version, if it exists, may be a 32-bit version which
we can't link with.  Also handle the case where the /usr/bin/python3
link is missing.
This commit is contained in:
Todd C. Miller 2020-06-06 18:45:28 -06:00
parent 48c2bd0007
commit a339945848

View File

@ -411,6 +411,22 @@ case "$osversion" in
with_openssl=true with_openssl=true
# Python plugins # Python plugins
with_python=true with_python=true
# We prefer the system version of python3 to the
# csw one (which may be 32-bit)
if [ -z "$PYTHON" ]; then
if [ -x /usr/bin/python3 ]; then
PYTHON="/usr/bin/python3"; export PYTHON
else
# Sometimes the /usr/bin/python3 is missing
for f in /usr/bin/python3.9 /usr/bin/python3.8 /usr/bin/python3.7 /usr/bin/python3.6 /usr/bin/python3.5 /usr/bin/python3.4 /usr/bin/python3.3 /usr/bin/python3.2 /usr/bin/python3.1 /usr/bin/python3.0; do
if [ -x $f ]; then
PYTHON="$f"; export PYTHON
break
fi
done
fi
fi
fi fi
;; ;;
*) *)