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-next>] [day] [month] [year] [list]
Message-Id: <1577253483-24358-1-git-send-email-fanliangcai9@gmail.com>
Date:   Wed, 25 Dec 2019 13:58:03 +0800
From:   Liangcai Fan <fanliangcai9@...il.com>
To:     masahiroy@...nel.org, michal.lkml@...kovi.net
Cc:     linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
        zhang.lyra@...il.com, gengcixi@...il.com, orson.zhai@...soc.com,
        Liangcai Fan <liangcai.fan@...soc.com>,
        Liangcai Fan <fanliangcai9@...il.com>
Subject: [PATCH] use bash instead of sh to run mkcompile_h

From: Liangcai Fan <liangcai.fan@...soc.com>

Use sh to run mkcompile_h, compilation would fail if whoami contains
backslash, since sh uses dash. The reason is that the echo command would
interpret backslash to escapes, so the LINUX_COMPILE_BY definition was
incorrect.

Parse mkcompile_h with bash, the echo command would not see backslash as
escapes, then there is no error with the definition of LINUX_COMPILE_BY.

Signed-off-by: Liangcai Fan <liangcai.fan@...soc.com>
Signed-off-by: Liangcai Fan <fanliangcai9@...il.com>
---
 init/Makefile       | 2 +-
 scripts/mkcompile_h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/init/Makefile b/init/Makefile
index 6246a06..9348d17 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -33,6 +33,6 @@ $(obj)/version.o: include/generated/compile.h
 silent_chk_compile.h = :
 include/generated/compile.h: FORCE
 	@$($(quiet)chk_compile.h)
-	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@	\
+	$(Q)$(BASH) $(srctree)/scripts/mkcompile_h $@	\
 	"$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)"	\
 	"$(CONFIG_PREEMPT_RT)" "$(CC) $(KBUILD_CFLAGS)"
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 3a5a4b2..cfc2e2a 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
 TARGET=$1
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ