From c5ef424a48f1add3dc7346aa8d4a8782c3ec70af Mon Sep 17 00:00:00 2001 From: mestre Date: Thu, 23 Aug 2018 06:25:01 +0000 Subject: [PATCH] reduce pledge(2) to "stdio tty" after ncurses initialization. OK tb@ --- games/grdc/grdc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/games/grdc/grdc.c b/games/grdc/grdc.c index d6a02e74641..8af4e730236 100644 --- a/games/grdc/grdc.c +++ b/games/grdc/grdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grdc.c,v 1.28 2017/12/11 23:33:44 tb Exp $ */ +/* $OpenBSD: grdc.c,v 1.29 2018/08/23 06:25:01 mestre Exp $ */ /* * * Copyright 2002 Amos Shapir. Public domain. @@ -97,6 +97,9 @@ main(int argc, char *argv[]) initscr(); + if (pledge("stdio tty", NULL) == -1) + err(1, "pledge"); + signal(SIGINT,sighndl); signal(SIGTERM,sighndl); signal(SIGHUP,sighndl); -- 2.20.1