Path: blob/main/website/static/security/patches/EN-07:05/freebsd-update.patch
18096 views
Index: usr.sbin/freebsd-update/freebsd-update.sh1===================================================================2RCS file: /home/ncvs/src/usr.sbin/freebsd-update/freebsd-update.sh,v3retrieving revision 1.2.2.2.2.14diff -u -I__FBSDID -I$FreeBSD -r1.2.2.2.2.1 freebsd-update.sh5--- usr.sbin/freebsd-update/freebsd-update.sh 27 Nov 2006 21:27:33 -0000 1.2.2.2.2.16+++ usr.sbin/freebsd-update/freebsd-update.sh 13 Mar 2007 12:56:06 -00007@@ -499,6 +499,24 @@8exit 19fi1011+ # Figure out what kernel configuration is running. We start with12+ # the output of `uname -i`, and then make the following adjustments:13+ # 1. Replace "SMP-GENERIC" with "SMP". Why the SMP kernel config14+ # file says "ident SMP-GENERIC", I don't know...15+ # 2. If the kernel claims to be GENERIC _and_ ${ARCH} is "amd64"16+ # _and_ `sysctl kern.version` contains a line which ends "/SMP", then17+ # we're running an SMP kernel. This mis-identification is a bug18+ # which was fixed in 6.2-STABLE.19+ KERNCONF=`uname -i`20+ if [ ${KERNCONF} = "SMP-GENERIC" ]; then21+ KERNCONF=SMP22+ fi23+ if [ ${KERNCONF} = "GENERIC" ] && [ ${ARCH} = "amd64" ]; then24+ if sysctl kern.version | grep -qE '/SMP$'; then25+ KERNCONF=SMP26+ fi27+ fi28+29# Define some paths30BSPATCH=/usr/bin/bspatch31SHA256=/sbin/sha25632@@ -1084,8 +1102,8 @@33# /boot/kernel34# (or more generally, `sysctl -n kern.bootfile` minus the trailing "/kernel").35fetch_filter_kernel_names () {36- grep ^/boot/`uname -i` $1 |37- sed -e "s,/boot/`uname -i`,${KERNELDIR}," |38+ grep ^/boot/${KERNCONF} $1 |39+ sed -e "s,/boot/${KERNCONF},${KERNELDIR},g" |40sort - $1 > $1.tmp41mv $1.tmp $142}434445