1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

last but not least: add pledge for wump(6)

one more of those games which fork a pager with instructions, so first
pledge "stdio rpath proc exec", then drop to pledge "stdio" afterwards.
This commit is contained in:
tb 2015-11-30 09:00:02 +00:00
parent f01d2bc3df
commit 56e43436ce

View File

@ -1,4 +1,4 @@
/* $OpenBSD: wump.c,v 1.26 2013/08/29 20:22:22 naddy Exp $ */
/* $OpenBSD: wump.c,v 1.27 2015/11/30 09:00:02 tb Exp $ */
/*
* Copyright (c) 1989, 1993
@ -135,6 +135,9 @@ main(int argc, char *argv[])
{
int c;
if (pledge("stdio rpath proc exec", NULL) == -1)
err(1, "pledge");
#ifdef DEBUG
while ((c = getopt(argc, argv, "a:b:hop:r:t:d")) != -1)
#else
@ -220,6 +223,10 @@ main(int argc, char *argv[])
"the wumpus refused to enter the cave, claiming it was too dangerous!");
instructions();
if (pledge("stdio", NULL) == -1)
err(1, "pledge");
if (oldstyle)
dodecahedral_cave_init();
else