aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/crashinfo/crashinfo.sh
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2009-11-03 09:17:23 +0000
committerXin LI <delphij@FreeBSD.org>2009-11-03 09:17:23 +0000
commit59bf36c3a797699801b9fe746d44650134554074 (patch)
tree868b22bb0650d91a2405ab2f15ffd23e375c43d8 /usr.sbin/crashinfo/crashinfo.sh
parent5661377e37716a18e2a1f13dc8cfd1eed6a78546 (diff)
downloadsrc-59bf36c3a797699801b9fe746d44650134554074.tar.gz
src-59bf36c3a797699801b9fe746d44650134554074.zip
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
Notes
Notes: svn path=/head/; revision=198846
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 886affd6f0ed..60f036014c44 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)