diff options
author | tb <tb@cvs.openbsd.org> | 2015-11-30 08:38:14 +0000 |
---|---|---|
committer | tb <tb@cvs.openbsd.org> | 2015-11-30 08:38:14 +0000 |
commit | 95840cc92f5af636cec27e91fc4a2fcc7a7583cd (patch) | |
tree | c5a71a8e1c11c2353bce309fb96c5c66603804ab | |
parent | 87582225a0ac6540e087cff75dca5341115620d0 (diff) |
pledge "stdio rpath wpath cpath tty" for canfield
pledge "stdio rpath" for cfscores
made possible by Ricardo Mestre's earlier work
-rw-r--r-- | games/canfield/canfield/canfield.c | 5 | ||||
-rw-r--r-- | games/canfield/cfscores/cfscores.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/games/canfield/canfield/canfield.c b/games/canfield/canfield/canfield.c index db2f08bc0fd..5b50b9b68e3 100644 --- a/games/canfield/canfield/canfield.c +++ b/games/canfield/canfield/canfield.c @@ -1,4 +1,4 @@ -/* $OpenBSD: canfield.c,v 1.20 2015/11/26 13:28:22 tb Exp $ */ +/* $OpenBSD: canfield.c,v 1.21 2015/11/30 08:38:13 tb Exp $ */ /* $NetBSD: canfield.c,v 1.7 1995/05/13 07:28:35 jtc Exp $ */ /* @@ -1736,6 +1736,9 @@ askquit(int dummy) int main(int argc, char *argv[]) { + if (pledge("stdio rpath wpath cpath tty", NULL) == -1) + err(1, "pledge"); + signal(SIGINT, askquit); signal(SIGHUP, cleanup); signal(SIGTERM, cleanup); diff --git a/games/canfield/cfscores/cfscores.c b/games/canfield/cfscores/cfscores.c index fe63a0be6ac..234b01b7c0d 100644 --- a/games/canfield/cfscores/cfscores.c +++ b/games/canfield/cfscores/cfscores.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cfscores.c,v 1.19 2015/11/26 13:28:22 tb Exp $ */ +/* $OpenBSD: cfscores.c,v 1.20 2015/11/30 08:38:13 tb Exp $ */ /* $NetBSD: cfscores.c,v 1.3 1995/03/21 15:08:37 cgd Exp $ */ /* @@ -61,6 +61,9 @@ main(int argc, char *argv[]) { char *home, *name; int ret; + + if (pledge("stdio rpath", NULL) == -1) + err(1, "pledge"); home = getenv("HOME"); if (home == NULL || *home == '\0') |