From: deraadt Date: Wed, 7 Oct 2015 06:29:26 +0000 (+0000) Subject: patch(1) can move to "stdio rpath wpath cpath tmppath fattr proc exec" X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=19b2d0aaf558bf8d3e24419221a9cd4aae4f3b56;p=openbsd patch(1) can move to "stdio rpath wpath cpath tmppath fattr proc exec" (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. --- diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c index 03afc4d8d36..ad477a2bd1e 100644 --- a/usr.bin/patch/patch.c +++ b/usr.bin/patch/patch.c @@ -1,4 +1,4 @@ -/* $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 @@ -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 exec", NULL) == -1) perror("tame"); setvbuf(stdout, NULL, _IOLBF, 0);