(adding proc exec), now that "exec" has arrived in the kernel. This
permits the dangerous game of feeding ed-style diffs with popen() via
/bin/ed. Shocked yet? Your mission, should you choose to accept it,
is to replace this code with an builtin ed-style patcher, maybe cribbing
code from ed itself.
I'm sorry, but we can't fix the entire world all at once. Noone loves
deprecating standarized features as much as we do, but there are some
lines. Maybe if people become aware of how crappy the implimentations
of some standard features are, they could help decide the path.
-/* $OpenBSD: patch.c,v 1.57 2015/10/04 18:11:22 deraadt Exp $ */
+/* $OpenBSD: patch.c,v 1.58 2015/10/07 06:29:26 deraadt Exp $ */
/*
* patch - a program to apply diffs to original files
const char *tmpdir;
char *v;
- if (tame("stdio rpath wpath cpath tmppath fattr", NULL) == -1)
+ if (tame("stdio rpath wpath cpath tmppath fattr proc exec", NULL) == -1)
perror("tame");
setvbuf(stdout, NULL, _IOLBF, 0);