[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bashims in debian/rules



Ian Jackson <ian@chiark.greenend.org.uk> writes:

> Are you sure that SHELL=`which bash` doesn't cause it to be
> repeatedly evaluated ?

Yes; SHELL=$(shell which bash) does, which is what I tried first.

> Also, I'm not sure I'd trust `which' so much.  `which' &co
> frequently have odd behaviours, and the user might have a `which'
> script which doesn't something different.

Valid point.  
 
> > But isn't there a security problem with that? Someone could've put
> > a (btw, isn't SHELL=bash the same? Make searches PATH itself,
> > doesn't it?)
> 
> If it does then we should do SHELL=bash.  Otherwise IMO we should do
> SHELL=/bin/bash.

It searches something, but it doesn't appear to be $PATH.

hades|15:16:47 ~/temp/leave-1.4 $head -n 20 debian/rules
#!/usr/bin/make -f
# debian/rules file - for leave (1.4).
# Based on sample debian.rules file - for GNU Hello (1.3).

[...]

SHELL=foo
package=leave

[...]

hades|15:17:01 ~/temp/leave-1.4 $type foo
foo is /home/james/bin/foo
hades|15:17:51 ~/temp/leave-1.4 $echo $PATH
/home/james/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/sbin:/usr/sbin
hades|15:17:54 ~/temp/leave-1.4 $sudo debian/rules binary-arch
test -f leave.c -a -f debian/rules
make: foo: Command not found
make: *** [checkroot] Error 127
hades|15:18:00 ~/temp/leave-1.4 $foo --version
GNU bash, version 2.01.0(1)-release (i486-debian-linux-gnu)
Copyright 1996 Free Software Foundation, Inc.
hades|15:19:26 ~/temp/leave-1.4 $

-- 
James


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . Trouble? 
e-mail to templin@bucknell.edu .


Reply to: