Set umask to 0x077 instead of the default. This prevents non-root user

from reading crashinfo output, which could contain some sensitive
information.

Reviewed by:	jhb
MFC after:	1 week
This commit is contained in:
Xin LI 2009-11-03 09:17:23 +00:00
parent 5661377e37
commit 59bf36c3a7

View File

@ -147,6 +147,8 @@ fi
echo "Writing crash summary to $FILE."
umask 077
# Simulate uname
ostype=$(echo -e printf '"%s", ostype' | gdb -x /dev/stdin -batch $KERNEL)
osrelease=$(echo -e printf '"%s", osrelease' | gdb -x /dev/stdin -batch $KERNEL)