lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 Apr 2008 00:24:56 +0200
From:	Willy Tarreau <w@....eu>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	Mark Rustad <mrustad@...il.com>, Sam Ravnborg <sam@...nborg.org>,
	Timur Tabi <timur@...escale.com>,
	Roland Kuhn <rkuhn@....physik.tu-muenchen.de>,
	linux-kernel@...r.kernel.org
Subject: Re: Why use /bin/sh in kernel build system?

On Wed, Apr 30, 2008 at 01:41:07AM +0400, Alexey Dobriyan wrote:
> On Tue, Apr 29, 2008 at 03:27:02PM -0500, Mark Rustad wrote:
> > On Apr 29, 2008, at 11:45 AM, Sam Ravnborg wrote:
> >
> >>> I read in the latest Linux Journal magazine that someone noticed that 
> >>> even
> >>> though the kernel scripts say #!/bin/sh, many of them are really bash 
> >>> scripts.
> >>> This person went through the effort of changing the script to be true 
> >>> 'sh'
> >>> scripts.  Has that code been merged in?
> >>
> >> I have no patches pending but I may have lost them.
> >> As I am 100% ignorant about what is bash and what is not bash specialities
> >> I will more or less be blind when I apply them so I hope they are well
> >> tested.
> >
> >
> > So why use /bin/sh ever in the kernel build system? I consciously began 
> > using /bin/bash consistently in scripts years ago because you just never 
> > know what you get when you use /bin/sh. I remember replacing /bin/sh with 
> > /bin/bash in gcc's build system to get it to work on some system at some 
> > point. Life is too short to keep having to fight silliness like this and I 
> > can't see a valid reason why a system building a Linux kernel, or for that 
> > matter gcc, should not have the bash shell installed on it.
> 
> Think harder.

Hint: not every joe user may install bash into /bin... That's why we
see some scripts begin with "/usr/bin/env bash" as there are less
systems without env in /usr/bin than systems without bash in /bin (or
at all).

Willy

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ