diff options
author | delphij <delphij@FreeBSD.org> | 2009-11-03 09:17:23 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-11-03 09:17:23 +0000 |
commit | f93bd9fff414a71e24948bb8dc29233a4c02e351 (patch) | |
tree | 868b22bb0650d91a2405ab2f15ffd23e375c43d8 /usr.sbin/crashinfo | |
parent | f9007b2aae3906f3584edae5e272f40c0923abdf (diff) | |
download | FreeBSD-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/crashinfo')
-rwxr-xr-x | usr.sbin/crashinfo/crashinfo.sh | 2 |
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) |