summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch/patch.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-03 13:49:51 +0000
committerderaadt <deraadt@openbsd.org>2015-10-03 13:49:51 +0000
commit4e8d95bc9366fa0202f1d7edbae90f62b1986446 (patch)
treee6ef7d5a5b1c9ef8914db10a94556229cc458a4d /usr.bin/patch/patch.c
parentRestore description of the sparc64 boot process which was lost when (diff)
downloadwireguard-openbsd-4e8d95bc9366fa0202f1d7edbae90f62b1986446.tar.xz
wireguard-openbsd-4e8d95bc9366fa0202f1d7edbae90f62b1986446.zip
As pointed out by tobiasu, ed-style patches still use popen() and execute
/bin/ed. This is RETARDED. Nothing learned from the last year? Add tame "proc" until that is fixed, to allow fork+exec. I beg for someone to cross-link the guts of ed directly into patch, or write a ed-subset which can do the job.
Diffstat (limited to 'usr.bin/patch/patch.c')
-rw-r--r--usr.bin/patch/patch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c
index 3f7c54cd5d7..80af7fea140 100644
--- a/usr.bin/patch/patch.c
+++ b/usr.bin/patch/patch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: patch.c,v 1.55 2015/10/03 02:35:56 deraadt Exp $ */
+/* $OpenBSD: patch.c,v 1.56 2015/10/03 13:49:51 deraadt Exp $ */
/*
* patch - a program to apply diffs to original files
@@ -147,7 +147,7 @@ main(int argc, char *argv[])
const char *tmpdir;
char *v;
- if (tame("stdio rpath wpath cpath tmppath fattr", NULL) == -1)
+ if (tame("stdio rpath wpath cpath tmppath fattr proc", NULL) == -1)
perror("tame");
setvbuf(stdout, NULL, _IOLBF, 0);