aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/crashinfo/crashinfo.sh
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2009-11-10 00:52:22 +0000
committerXin LI <delphij@FreeBSD.org>2009-11-10 00:52:22 +0000
commit0a949f809919064b9143fe4f36a30256f737f7c0 (patch)
tree9803753732b209ca61f4f3814a5c2f4b49105ea9 /usr.sbin/crashinfo/crashinfo.sh
parente868427534863e3d33cdde2bd8038514ddf469ce (diff)
downloadsrc-0a949f809919064b9143fe4f36a30256f737f7c0.tar.gz
src-0a949f809919064b9143fe4f36a30256f737f7c0.zip
MFC r198846 (MF8 r199121):
Set umask to 0x077 instead of the default. This prevents non-root user from reading crashinfo output, which could contain some sensitive information. Approved by: re (kensmith)
Notes
Notes: svn path=/releng/8.0/; revision=199124
Diffstat (limited to 'usr.sbin/crashinfo/crashinfo.sh')
-rwxr-xr-xusr.sbin/crashinfo/crashinfo.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/crashinfo/crashinfo.sh b/usr.sbin/crashinfo/crashinfo.sh
index cd4100941898..8533f6eb2e32 100755
--- a/usr.sbin/crashinfo/crashinfo.sh
+++ b/usr.sbin/crashinfo/crashinfo.sh
@@ -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)