Skip to content

Instantly share code, notes, and snippets.

@ManasJayanth
Last active August 29, 2015 14:07
Show Gist options
  • Save ManasJayanth/62f3e6fae2161b829723 to your computer and use it in GitHub Desktop.
Save ManasJayanth/62f3e6fae2161b829723 to your computer and use it in GitHub Desktop.
Hand compile bash with Shellshock fix (Source: https://news.ycombinator.com/item?id=8364385)
#assume that your sources are in /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 25); 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 25); do
patch -p0 < ../bash43-$i;
done
#build and install
./configure && make && make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment