Received: by mail.netbsd.org (Postfix, from userid 0) id ADF2363B17C; Mon, 14 Dec 2009 03:58:29 +0000 (UTC) Received: from cvs.netbsd.org (cvs.NetBSD.org [IPv6:2001:4f8:3:7:2e0:81ff:fe30:95bd]) by mail.netbsd.org (Postfix) with ESMTP id 5B86163B140 for ; Mon, 14 Dec 2009 03:58:27 +0000 (UTC) Received: by cvs.netbsd.org (Postfix, from userid 500) id 46355175DD; Mon, 14 Dec 2009 03:58:27 +0000 (UTC) MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: binary Content-Type: text/plain Date: Mon, 14 Dec 2009 03:58:27 +0000 From: "David A. Holland" Subject: CVS commit: src/usr.bin/less/less To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20091214035827.46355175DD@cvs.netbsd.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: list Reply-To: source-changes-d@NetBSD.org Module Name: src Committed By: dholland Date: Mon Dec 14 03:58:27 UTC 2009 Modified Files: src/usr.bin/less/less: cmdbuf.c Log Message: Don't attempt to read or write ~/.lesshst if it's not a regular file or a symlink to a regular file. Previously, symlinking to /dev/null would cause less to trash /dev/null if run with sufficient privileges, as seen in PR misc/42237. While the official way to disable .lesshst is to set an environment variable, that is problematic in some cases, such as single-user mode. A safer way to prevent even an unpatched less from writing anything out is to mkdir ~/.lesshst. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/less/less/cmdbuf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.