artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53ac400
)
Obvious pledge "stdio" for yes.
author
doug
<doug@openbsd.org>
Tue, 13 Oct 2015 07:03:26 +0000
(07:03 +0000)
committer
doug
<doug@openbsd.org>
Tue, 13 Oct 2015 07:03:26 +0000
(07:03 +0000)
ok deraadt@
usr.bin/yes/yes.c
patch
|
blob
|
history
diff --git
a/usr.bin/yes/yes.c
b/usr.bin/yes/yes.c
index
b7bf70e
..
023fefc
100644
(file)
--- 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 <err.h>
#include <stdio.h>
+#include <unistd.h>
int
main(int argc, char *argv[])
{
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
if (argc > 1)
for (;;)
puts(argv[1]);