diff options
author | Xin LI <delphij@FreeBSD.org> | 2009-11-10 00:52:22 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2009-11-10 00:52:22 +0000 |
commit | 0a949f809919064b9143fe4f36a30256f737f7c0 (patch) | |
tree | 9803753732b209ca61f4f3814a5c2f4b49105ea9 | |
parent | e868427534863e3d33cdde2bd8038514ddf469ce (diff) |
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
-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 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) |