提交 f0772604 编写于 作者: M Marcin Nowakowski 提交者: Michal Marek

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: NMarcin Nowakowski <marcin.nowakowski.000@gmail.com>
Signed-off-by: NMichal Marek <mmarek@suse.cz>
上级 d8ecc5cd
......@@ -43,7 +43,7 @@ else
TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
fi
if test -z "$KBUILD_BUILD_USER"; then
LINUX_COMPILE_BY=`whoami`
LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')
else
LINUX_COMPILE_BY=$KBUILD_BUILD_USER
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册