From acb54853af4e1eada6defa3cdfb6124f36710826 Mon Sep 17 00:00:00 2001 From: doug Date: Tue, 13 Oct 2015 07:03:26 +0000 Subject: [PATCH] Obvious pledge "stdio" for yes. ok deraadt@ --- usr.bin/yes/yes.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.bin/yes/yes.c b/usr.bin/yes/yes.c index b7bf70e0ee5..023fefc4bad 100644 --- a/usr.bin/yes/yes.c +++ b/usr.bin/yes/yes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yes.c,v 1.8 2009/10/27 23:59:50 deraadt Exp $ */ +/* $OpenBSD: yes.c,v 1.9 2015/10/13 07:03:26 doug Exp $ */ /* $NetBSD: yes.c,v 1.3 1994/11/14 04:56:15 jtc Exp $ */ /* @@ -30,11 +30,16 @@ * SUCH DAMAGE. */ +#include #include +#include int main(int argc, char *argv[]) { + if (pledge("stdio", NULL) == -1) + err(1, "pledge"); + if (argc > 1) for (;;) puts(argv[1]); -- 2.20.1