diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-10-16 21:35:17 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-10-16 21:35:17 +0000 |
commit | e29a6e2ccf0bf7a68c8d264319667c2cd3e77661 (patch) | |
tree | 9327571b168099bc4ea8bdc85668e6b62062ac26 /usr.bin/mandoc | |
parent | 4128723924ce30c973a45ba8976cb48fea7ecd89 (diff) |
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; |