diff options
author | Ricardo Mestre <mestre@cvs.openbsd.org> | 2018-08-23 06:25:02 +0000 |
---|---|---|
committer | Ricardo Mestre <mestre@cvs.openbsd.org> | 2018-08-23 06:25:02 +0000 |
commit | 8f49e0f48d826a681dd488ac5c158c8380275114 (patch) | |
tree | 8ae33a03d1af9fad2e455ce843a7b568f7a642ee | |
parent | 7be3f29de5a77109552fffae7a231475d4551a5e (diff) |
reduce pledge(2) to "stdio tty" after ncurses initialization.
OK tb@
-rw-r--r-- | games/grdc/grdc.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |