From: Marcin Nowakowski <marcin.nowakowski.000@gmail.com>
To: linux-kbuild@vger.kernel.org
Subject: [PATCH V2] Fix handling of backlash character in LINUX_COMPILE_BY name
Date: Mon, 25 Apr 2011 13:35:21 +0100 [thread overview]
Message-ID: <4DB56A89.6060204@gmail.com> (raw)
In-Reply-To: <4D9B63B2.1080701@gmail.com>
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.
V2 simplifies a very complex escape pattern introduced initially.
Signed-off-by: Marcin Nowakowski <marcin.nowakowski.000@gmail.com>
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 7ad6bf7..f221ddf 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -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
next prev parent reply other threads:[~2011-04-25 12:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4D9B63B2.1080701@gmail.com>
2011-04-19 8:28 ` [kbuild patch] mkcompile_h produces warnings when using domain logins Michal Marek
2011-04-19 18:23 ` Marcin Nowakowski
2011-04-25 12:35 ` Marcin Nowakowski [this message]
2011-04-29 13:57 ` [PATCH V2] Fix handling of backlash character in LINUX_COMPILE_BY name Michal Marek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DB56A89.6060204@gmail.com \
--to=marcin.nowakowski.000@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox