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]
Message-ID: <d65b1b151001261110j6c0561a1ifba2da0077698e54@mail.gmail.com>
Date:	Tue, 26 Jan 2010 20:10:58 +0100
From:	Glenn Sommer <glemsom@...il.com>
To:	Michal Marek <mmarek@...e.cz>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Use full path to dnsdomainname and domainname in 
	scripts/mkcompile_h

2010/1/26 Michal Marek <mmarek@...e.cz>:
> On 26.1.2010 04:55, Américo Wang wrote:
>> On Wed, Jan 20, 2010 at 11:06 PM, Glenn Sommer <glemsom@...il.com> wrote:
>>> Alternatively, if we want it to be more flexible(and allow the above)
>>> - we should do something like:
>>>
>>> domainname_executable=`which domainname`
>>> if [ ! -z "$domainname_executable" ] && [ -x "$domainname_executable" ]; then
>>>
>
> (or 'if command -v domainname >/dev/null 2>&1; then domainname ...')
>
>
>> Yeah, this seems better for me.
>
> Me too. Glenn, could you send a complete patch doing this? I'll add it
> to the kbuild tree then.
>
> Thanks,
> Michal
>

Yeah, good idea with "command -v" ! :)
( note: `command -v` will return true if the executable is found -
else it will return false. )

mkcompile_h is changed slightly in 2.6.32. Here's my new proposed patch:


--- scripts/mkcompile_h.orig	2010-01-26 18:59:37.000000000 +0100
+++ scripts/mkcompile_h	2010-01-26 20:03:42.000000000 +0100
@@ -67,9 +67,9 @@
   echo \#define LINUX_COMPILE_BY \"`whoami`\"
   echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\"

-  if [ -x /bin/dnsdomainname ]; then
+  if [ `command -v dnsdomainname 2> /dev/null` ]; then
     domain=`dnsdomainname 2> /dev/null`
-  elif [ -x /bin/domainname ]; then
+  elif [ `command -v domainname 2> /dev/null` ]; then
     domain=`domainname 2> /dev/null`
   fi

Signed-off-by: Glenn Sommer <glemsom@...il.com>
--
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