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 <bjzgd...@linux.vnet.ibm.com>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to