]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fortify: Rename temporary file to match ignore pattern
authorNicolas Schier <nsc@kernel.org>
Wed, 14 Jan 2026 13:57:14 +0000 (14:57 +0100)
committerKees Cook <kees@kernel.org>
Thu, 15 Jan 2026 03:49:55 +0000 (19:49 -0800)
test_fortify.sh uses a temporary file that might appear as untracked
file in some rare sitations.  Rename it to match one of top-level's
gitignore patterns.

Reported-by: WangYuli <wangyuli@aosc.io>
Closes: https://lore.kernel.org/linux-kbuild/20251112114725.287349-1-wangyuli@aosc.io/
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: WangYuli <wangyuli@aosc.io>
Signed-off-by: Nicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/20260114-fortify-improve-handling-of-tempfile-v2-1-63b86c4dbd0e@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
lib/test_fortify/test_fortify.sh

index c2688ab8281d025ad80168b783d293950c4e726c..368d07d9acbf737be376756b39def87f12f4e9bf 100644 (file)
@@ -17,7 +17,7 @@ WANT="__${FILE%%-*}"
 # Argument 2: Where to write the build log.
 OUT="$1"
 shift
-TMP="${OUT}.tmp"
+TMP="${OUT%/*}/.${OUT##*/}.tmp"
 
 # Argument 3: Path to "nm" tool.
 NM="$1"