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

Pledge "stdio rpath tty" for hangman(6).

Patch submitted by Ricardo Mestre <serial@helheim.mooo.com>

ok semarie@
This commit is contained in:
doug 2015-10-22 05:28:42 +00:00
parent e4e00e5d12
commit 4001b1c3f4

View File

@ -1,4 +1,4 @@
/* $OpenBSD: main.c,v 1.12 2015/02/07 01:37:30 miod Exp $ */
/* $OpenBSD: main.c,v 1.13 2015/10/22 05:28:42 doug Exp $ */
/* $NetBSD: main.c,v 1.3 1995/03/23 08:32:50 cgd Exp $ */
/*
@ -43,6 +43,9 @@ main(int argc, char *argv[])
{
int ch;
if (pledge("stdio rpath tty", NULL) == -1)
err(1, "pledge");
while ((ch = getopt(argc, argv, "d:hk")) != -1) {
switch (ch) {
case 'd':
@ -69,6 +72,10 @@ main(int argc, char *argv[])
}
signal(SIGINT, die);
setup();
if (pledge("stdio tty", NULL) == -1)
err(1, "pledge");
for (;;) {
Wordnum++;
playgame();