diff options
author | 2015-10-16 21:35:16 +0000 | |
---|---|---|
committer | 2015-10-16 21:35:16 +0000 | |
commit | 779d88a99c8c25ae3c25d9a5f2715e0344d141a0 (patch) | |
tree | 3e432e3415c832e38da06a2cec5eeca6c16c2abc /usr.bin/mandoc | |
parent | Use SSL_get_version() not SSL_get_cipher_version(); the former gives the TLS (diff) | |
download | wireguard-openbsd-779d88a99c8c25ae3c25d9a5f2715e0344d141a0.tar.xz wireguard-openbsd-779d88a99c8c25ae3c25d9a5f2715e0344d141a0.zip |
Once apropos(1) or man(1) are done with database access, or if the
program was called as mandoc(1) in the first place, remove "flock"
from our pledge(2) before entering the parsers and formatters.
OK millert@ deraadt@
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c index 07edb8c36b5..f62bca14ad8 100644 --- a/usr.bin/mandoc/main.c +++ b/usr.bin/mandoc/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.156 2015/10/16 13:37:44 millert Exp $ */ +/* $OpenBSD: main.c,v 1.157 2015/10/16 21:35:16 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -394,6 +394,10 @@ main(int argc, char *argv[]) /* mandoc(1) */ + if (pledge(use_pager ? "stdio rpath tmppath proc exec" : + "stdio rpath", NULL) == -1) + err(1, "pledge"); + if (search.argmode == ARG_FILE && ! moptions(&options, auxpaths)) return (int)MANDOCLEVEL_BADARG; |