summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-11-11 08:01:22 +0000
committerderaadt <deraadt@openbsd.org>2015-11-11 08:01:22 +0000
commitfee409091279f1124d9900bbb917109dfe61a8d8 (patch)
tree44efa79a1d793c667e9ce417dd756bc752d99bb2
parentimprove PEEK/POKE macros: better casts, don't multiply evaluate (diff)
downloadwireguard-openbsd-fee409091279f1124d9900bbb917109dfe61a8d8.tar.xz
wireguard-openbsd-fee409091279f1124d9900bbb917109dfe61a8d8.zip
the ramdisk more(1) works with pledge "stdio rpath tty"
-rw-r--r--distrib/special/more/more.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/distrib/special/more/more.c b/distrib/special/more/more.c
index e7289889d4a..be7feb8812d 100644
--- a/distrib/special/more/more.c
+++ b/distrib/special/more/more.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: more.c,v 1.36 2015/10/15 16:10:57 deraadt Exp $ */
+/* $OpenBSD: more.c,v 1.37 2015/11/11 08:01:22 deraadt Exp $ */
/*
* Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -210,6 +210,11 @@ main(int argc, char **argv)
int ch;
char initbuf[80];
+ if (pledge("stdio rpath tty", NULL) == -1) {
+ perror("pledge");
+ exit(1);
+ }
+
setlocale(LC_ALL, "");
/* all signals just use a stub handler and interrupt syscalls */