2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 09:57:41 +00:00

Fix OS major version detection on CentOS Stream

This commit is contained in:
Todd C. Miller 2022-05-12 09:42:34 -06:00
parent ea2bf7f1f2
commit 4a7d26c381

View File

@ -160,7 +160,7 @@ case "$osversion" in
centos*|rhel*|f[0-9]*) centos*|rhel*|f[0-9]*)
case "$osversion" in case "$osversion" in
centos*|rhel*) centos*|rhel*)
osmajor=`sed -n -e 's/^.*release \([0-9]*\)[^0-9].*$/\1/p' /etc/redhat-release` osmajor=`sed -n -e 's/^.*release \([0-9][0-9]*\).*$/\1/p' /etc/redhat-release`
if [ $osmajor -ge 4 ]; then if [ $osmajor -ge 4 ]; then
# RHEL 4 and up support SELinux # RHEL 4 and up support SELinux
with_selinux=true with_selinux=true