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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 19 Oct 2007 22:52:50 -0700
From:	David Brownell <david-b@...bell.net>
To:	sam@...nborg.org
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [patch 2.6.23-git] toplevel Makefile/depmod bugfix

> > -	if [ -r System.map -a -x $(DEPMOD) -a "$(SUBARCH)" == "$(ARCH)" ]; then \
> > +	if [ -r System.map -a -x $(DEPMOD) -a "$(SUBARCH)" = "$(ARCH)" ]; then \
>
> Took a look at 'man bash' here.
> bash --version
> GNU bash, version 3.2.9(1)-release (x86_64-redhat-linux-gnu)
> Copyright (C) 2005 Free Software Foundation, Inc.
>
> Accoding to man bash "==" is used to test for equality and "=" is used for assignmnet.

"man test" shows that only "=" works ... that's for string equality,
which is what's being tested there.  And "==" is undefined (error).

If "==" were to kick in that would be for an arithmetic expression;
but "[" is (modulo wierdness) "test" not "expr".


> I assume the above is a dash syntax error (dash is default on ubuntu IIRC).

My $SHELL is /bin/bash:

$ bash --version
GNU bash, version 3.2.13(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
$


> Is it truly protable with "=" or do we need to be more clever?

I don't know how you managed to get it to work wtih "==".
String equality should be "=" in all /bin/sh versions.
It's been that way since it was written in pseudo-Algol.

- Dave

-
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