summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-11-03 09:17:23 +0000
committerdelphij <delphij@FreeBSD.org>2009-11-03 09:17:23 +0000
commitf93bd9fff414a71e24948bb8dc29233a4c02e351 (patch)
tree868b22bb0650d91a2405ab2f15ffd23e375c43d8 /usr.sbin
parentf9007b2aae3906f3584edae5e272f40c0923abdf (diff)
downloadFreeBSD-src-f93bd9fff414a71e24948bb8dc29233a4c02e351.zip
FreeBSD-src-f93bd9fff414a71e24948bb8dc29233a4c02e351.tar.gz
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
Diffstat (limited to 'usr.sbin')
-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 886affd..60f0360 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)
OpenPOWER on IntegriCloud