BASH Shellshock and FreeBSD 4.X

Mario Lobo lobo at bsd.com.br
Mon Sep 29 21:36:42 UTC 2014


On Mon, 29 Sep 2014 17:23:29 +0200
Polytropon <freebsd at edvax.de> wrote:

> On Mon, 29 Sep 2014 22:29:06 +0930, Shane Ambler wrote:
> > On 29/09/2014 17:39, Polytropon wrote:
> > > On Sun, 28 Sep 2014 13:59:13 -0700, Everett Batey wrote:
> > >> Severely stuck in Time - OLD FBSD .. any bright ideas
> > >> around /bin/bash risks AND NOT DONT TELL ME UPDATE FBSD .. -
> > >> Dependencies I can NOT escape ..
> > 
> > > If you're using ports:
> > > 
> > > 	# portsnap fetch update
> > > 	# cd /usr/ports/shells/bash
> > > 	# make deinstall
> > > 	# make
> > > 	# make reinstall
> > > 
> > 
> > I'm not 100% certain that the current ports tree will work on 4.x
> > 
> > I'd keep a copy of your current tree before trying updates. If you
> > have trouble with the current ports then put the old version back
> > in place and look at the changes made to fix the issue and
> > incorporate them into your tree.
> 
> Yes, _that_ might be a problem...
> 
> On the other hand, maybe it would even be possible to check
> out the current source for bssh (and maybe its dependencies)
> and build them "off the track", i. e., not using the ports
> infrastructure at all, and then manually copying the resulting
> binary to the required place, as well as its libraries (unless
> static linking has been enabled). It's worth having a look at
> ./configure's options to tune this approach.
> 
> 

Everett;

Why don't you give this a try:

#---------------------------
#cat bash_bsd_fix.sh

mkdir src
cd src
fetch http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
for i in $(jot -w %03d 25); do 
fetch http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-$i; done
tar zxvf bash-4.3.tar.gz
cd bash-4.3
for i in $(jot -w %03d 25);do patch -p0 < ../bash43-$i; done
./configure && make
#---------------------------


If it compiles without errors, then:


#---------------------------
make install
cd ..
cd ..
rm -r src
#---------------------------


I got this script from a colleague in the Brazilian BSD list. He used
it to update his old servers. It was tested only on 8.1 and up but I
don't see why you can't give it a spin.

I used it withou any problems on all my 8.x servers.

-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since 2.2.8 [not Pro-Audio.... YET!!] (99% winblows FREE)
 
"UNIX was not designed to stop you from doing stupid things, 
because that would also stop you from doing clever things."


More information about the freebsd-questions mailing list