-/* $OpenBSD: bs.c,v 1.40 2018/08/05 13:32:25 schwarze Exp $ */
+/* $OpenBSD: bs.c,v 1.41 2018/08/24 11:14:49 mestre Exp $ */
/*
* Copyright (c) 1986, Bruce Holloway
* All rights reserved.
do_options(argc, argv);
intro();
+
+ if (pledge("stdio tty", NULL) == -1)
+ err(1, "pledge");
+
do {
initgame();
while(awinna() == -1)
-/* $OpenBSD: canfield.c,v 1.27 2016/09/11 14:21:17 tb Exp $ */
+/* $OpenBSD: canfield.c,v 1.28 2018/08/24 11:14:49 mestre Exp $ */
/* $NetBSD: canfield.c,v 1.7 1995/05/13 07:28:35 jtc Exp $ */
/*
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);
noecho();
initall();
+ if (pledge("stdio tty", NULL) == -1)
+ err(1, "pledge");
+
instruct();
makeboard();
for (;;) {
-/* $OpenBSD: makedefs.c,v 1.10 2016/01/09 18:33:15 mestre Exp $ */
+/* $OpenBSD: makedefs.c,v 1.11 2018/08/24 11:14:49 mestre Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
int propct = 0;
char *sp;
- if (pledge("stdio rpath", NULL) == -1)
- err(1, "pledge");
-
if (argc != 2) {
(void)fprintf(stderr, "usage: makedefs file\n");
return 1;
perror(argv[1]);
return 1;
}
+
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
skipuntil("objects[] = {");
while(getentry()) {
if(!*string){
-/* $OpenBSD: quiz.c,v 1.29 2016/03/07 12:07:56 mestre Exp $ */
+/* $OpenBSD: quiz.c,v 1.30 2018/08/24 11:14:49 mestre Exp $ */
/* $NetBSD: quiz.c,v 1.9 1995/04/22 10:16:58 cgd Exp $ */
/*-
err(1, "pledge");
get_file(indexfile);
get_cats(argv[0], argv[1]);
+
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
quiz();
break;
default:
-/* $OpenBSD: snake.c,v 1.28 2016/09/11 14:21:18 tb Exp $ */
+/* $OpenBSD: snake.c,v 1.29 2018/08/24 11:14:49 mestre Exp $ */
/* $NetBSD: snake.c,v 1.8 1995/04/29 00:06:41 mycroft Exp $ */
/*
struct sigaction sa;
int ch, i;
- if (pledge("stdio rpath wpath cpath tty", NULL) == -1)
- err(1, "pledge");
-
#ifdef LOGGING
const char *home;
readscores(1);
penalty = loot = 0;
initscr();
+
+ if (pledge("stdio tty", NULL) == -1)
+ err(1, "pledge");
+
#ifdef KEY_LEFT
keypad(stdscr, TRUE);
#endif
-/* $OpenBSD: worm.c,v 1.38 2016/01/07 16:00:33 tb Exp $ */
+/* $OpenBSD: worm.c,v 1.39 2018/08/24 11:14:49 mestre Exp $ */
/*
* Copyright (c) 1980, 1993
const char *errstr;
struct timespec t, tn, tdiff;
- if (pledge("stdio rpath tty", NULL) == -1)
- err(1, "pledge");
-
timespecclear(&t);
setvbuf(stdout, outbuf, _IOFBF, sizeof outbuf);
signal(SIGQUIT, leave);
signal(SIGTSTP, suspend); /* process control signal */
initscr();
+
+ if (pledge("stdio tty", NULL) == -1)
+ err(1, "pledge");
+
cbreak();
noecho();
keypad(stdscr, TRUE);