From owner-svn-src-all@FreeBSD.ORG Tue Nov 10 00:41:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBF0C106566B; Tue, 10 Nov 2009 00:41:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C88578FC0A; Tue, 10 Nov 2009 00:41:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAA0fMBL040152; Tue, 10 Nov 2009 00:41:22 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAA0fMWg040150; Tue, 10 Nov 2009 00:41:22 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200911100041.nAA0fMWg040150@svn.freebsd.org> From: Xin LI Date: Tue, 10 Nov 2009 00:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199121 - stable/8/usr.sbin/crashinfo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2009 00:41:23 -0000 Author: delphij Date: Tue Nov 10 00:41:22 2009 New Revision: 199121 URL: http://svn.freebsd.org/changeset/base/199121 Log: MFC r198846: Set umask to 0x077 instead of the default. This prevents non-root user from reading crashinfo output, which could contain some sensitive information. Modified: stable/8/usr.sbin/crashinfo/crashinfo.sh Directory Properties: stable/8/usr.sbin/crashinfo/ (props changed) Modified: stable/8/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- stable/8/usr.sbin/crashinfo/crashinfo.sh Tue Nov 10 00:34:25 2009 (r199120) +++ stable/8/usr.sbin/crashinfo/crashinfo.sh Tue Nov 10 00:41:22 2009 (r199121) @@ -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)