kdumpctl: make the kdump.log root-readable-only

Decrease the risk that of leaking information that could potentially
be used to exploit the crash further (think location of keys).

Signed-off-by: Lichen Liu <lichliu@redhat.com>
Acked-by: Coiby Xu <coxu@redhat.com>
This commit is contained in:
Lichen Liu 2022-08-24 16:16:14 +08:00 committed by Coiby Xu
parent 677da8a59b
commit 4edcd9a400
1 changed files with 1 additions and 0 deletions

View File

@ -691,6 +691,7 @@ load_kdump()
# and release it.
exec 12>&2
exec 2>> $KDUMP_LOG_PATH/kdump.log
chmod 600 $KDUMP_LOG_PATH/kdump.log
PS4='+ $(date "+%Y-%m-%d %H:%M:%S") ${BASH_SOURCE}@${LINENO}: '
set -x