From: doug Date: Tue, 13 Oct 2015 07:03:26 +0000 (+0000) Subject: Obvious pledge "stdio" for yes. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=acb54853af4e1eada6defa3cdfb6124f36710826;p=openbsd Obvious pledge "stdio" for yes. ok deraadt@ --- 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]);