aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcin Nowakowski <marcin.nowakowski.000@gmail.com>2011-04-25 08:35:21 -0400
committerMichal Marek <mmarek@suse.cz>2011-04-29 09:55:45 -0400
commitf07726048d599acd6bac438e304645a78db753c0 (patch)
tree1d76654ce62045f8a8960900189d4cad5747e8dd
parentd8ecc5cd8e227bc318513b5306ae88a474b8886d (diff)
Fix handling of backlash character in LINUX_COMPILE_BY name
When using a domain login, `whoami` returns the login in user\domain format. This leads to either warnings on unrecognised escape sequences or escaped characters being generated for the user. This patch ensures that any backslash is escaped to a double-backslash to make sure the name is preserved correctly. This patch does not enforce escaping on the KBUILD_BUILD_USER variable, as this is something the user has control of and can escape if required. Signed-off-by: Marcin Nowakowski <marcin.nowakowski.000@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
-rwxr-xr-xscripts/mkcompile_h2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 7ad6bf7a09ff..f221ddf69080 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -43,7 +43,7 @@ else
43 TIMESTAMP=$KBUILD_BUILD_TIMESTAMP 43 TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
44fi 44fi
45if test -z "$KBUILD_BUILD_USER"; then 45if test -z "$KBUILD_BUILD_USER"; then
46 LINUX_COMPILE_BY=`whoami` 46 LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')
47else 47else
48 LINUX_COMPILE_BY=$KBUILD_BUILD_USER 48 LINUX_COMPILE_BY=$KBUILD_BUILD_USER
49fi 49fi