2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +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]*)
case "$osversion" in
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
# RHEL 4 and up support SELinux
with_selinux=true