Last active
August 29, 2015 14:06
-
-
Save alex-jerez/3d6b35aa2b5ba145a3a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#title :linux-mint-14-shellshock.sh | |
#date :20140927 | |
#notes :Install Vim and Emacs to use this script. | |
#bash_version :4.1.5(1)-release | |
# | |
# Linux Mint 14 MATE is no longer supported, but if you have no option to upgrade, | |
# this should upgrade bash and make your system safe from the | |
# 'Shellshock' vulnerability (CVE-2014-6271 and CVE-2014-7169). | |
# run as root. | |
#============================================================================== | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
# update bash | |
mkdir src | |
cd src | |
wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz | |
#download all patches | |
for i in $(seq -f "%03g" 0 26); do wget http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-$i; done | |
tar zxvf bash-4.3.tar.gz | |
cd bash-4.3 | |
#apply all patches | |
for i in $(seq -f "%03g" 0 26);do patch -p0 < ../bash43-$i; done | |
#build and install | |
./configure --prefix=/ && make && make install | |
cd .. | |
cd .. | |
rm -r src |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment