From: Todd C. Miller Date: Fri, 15 Aug 2014 22:46:24 +0000 (-0600) Subject: Only use the first two digits of the version number. X-Git-Tag: SUDO_1_8_11^2~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dbe0b213daf926e470ca36f449650bcbf72c6761;p=sudo Only use the first two digits of the version number. Fixes a problem on RHEL 7 which has version numbers like 7.0.1406 --- diff --git a/sudo.pp b/sudo.pp index b7b335443..1736638bf 100644 --- a/sudo.pp +++ b/sudo.pp @@ -84,7 +84,7 @@ still allow people to get their work done." %if [rpm] # Add distro info to release - osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*//' -e 's/-.*$//'` + osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*\([0-9][0-9]\).*/\1/' -e 's/^[^0-9]*\([0-9]\)[^0-9].*/\1/'` case "$pp_rpm_distro" in centos*|rhel*) pp_rpm_release="$pp_rpm_release.el${osrelease%%[0-9]}"