From: Zhiguo Deng <bjzgdeng-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Zhiguo Deng <bjzgdeng-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Subject: [PATCH] Conceal ftp user passwd in rdsosreport
Date: Mon, 28 Sep 2015 09:20:30 +0200 [thread overview]
Message-ID: <1443424830-6198-1-git-send-email-bjzgdeng@linux.vnet.ibm.com> (raw)
When using authenticated FTP, the password contained in the kernel command line.
This causes it to end up in the generated /run/initramfs/rdsosreport.txt
Signed-off-by: Zhiguo Deng <bjzgdeng-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
modules.d/99base/rdsosreport.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules.d/99base/rdsosreport.sh b/modules.d/99base/rdsosreport.sh
index 3e2ac87..4b8afb7 100755
--- a/modules.d/99base/rdsosreport.sh
+++ b/modules.d/99base/rdsosreport.sh
@@ -10,7 +10,7 @@ set -x
cat /lib/dracut/dracut-*
-cat /proc/cmdline
+cat /proc/cmdline | sed -e 's/\(ftp:\/\/.*\):.*@/\1:*******@/'
[ -f /etc/cmdline ] && cat /etc/cmdline
@@ -47,9 +47,9 @@ cat /proc/mdstat
command -v ip >/dev/null 2>/dev/null && ip addr
if command -v journalctl >/dev/null 2>/dev/null; then
- journalctl -ab --no-pager -o short-monotonic
+ journalctl -ab --no-pager -o short-monotonic | sed -e 's/\(ftp:\/\/.*\):.*@/\1:*******@/'
else
- dmesg
+ dmesg | sed -e 's/\(ftp:\/\/.*\):.*@/\1:*******@/'
[ -f /run/initramfs/init.log ] && cat /run/initramfs/init.log
fi
--
1.9.1
next reply other threads:[~2015-09-28 7:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 7:20 Zhiguo Deng [this message]
[not found] ` <1443424830-6198-1-git-send-email-bjzgdeng-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2015-09-28 8:01 ` [PATCH] Conceal ftp user passwd in rdsosreport Dracut GitHub Import Bot
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=1443424830-6198-1-git-send-email-bjzgdeng@linux.vnet.ibm.com \
--to=bjzgdeng-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.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