Upstream removed history file support for secure mode. The history file
feature is off by default already, disallowing it altogether in secure
mode allows us to drop wpath.
Added a note about it to manual page.
ok benno, deraadt
#include "cmd.h"
#include "less.h"
+extern int secure;
extern int sc_width;
extern int utf_mode;
FILE *f;
char *p;
+ if (secure)
+ return;
filename = histfile_name();
if (filename == NULL)
return;
struct stat statbuf;
int r;
+ if (secure)
+ return;
if (mlist_search.modified)
modified = 1;
if (mlist_shell.modified)
-.\" $OpenBSD: less.1,v 1.57 2019/09/02 14:07:45 schwarze Exp $
+.\" $OpenBSD: less.1,v 1.58 2021/09/23 18:46:25 tobias Exp $
.\"
.\" Copyright (C) 1984-2012 Mark Nudelman
.\"
.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: September 2 2019 $
+.Dd $Mdocdate: September 23 2021 $
.Dt LESS 1
.Os
.Sh NAME
.It Fl t
Use of tags files.
.It " "
+Use of history file.
+.It " "
Metacharacters in filenames, such as "*".
.It " "
Filename completion (TAB, ^L).
secure = 1;
if (secure) {
- if (pledge("stdio rpath wpath tty", NULL) == -1) {
+ if (pledge("stdio rpath tty", NULL) == -1) {
perror("pledge");
exit(1);
}