summaryrefslogtreecommitdiff
path: root/gl/lib
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-11-05 16:48:09 -0700
committerEric Blake <ebb9@byu.net>2009-11-07 10:10:28 -0700
commit56b85e035b77e48e7ec241b54da3f9c9d19e77d5 (patch)
tree952adbea1809337271c1857d3bc20cfc5a639a5a /gl/lib
parentc768e2231b89901a2e29c3bf96c027b64f8646d9 (diff)
downloadcoreutils-56b85e035b77e48e7ec241b54da3f9c9d19e77d5.tar.xz
build: consistently use freopen-safer
cat, head, ptx, shuf, tac, tail, tee, tr, and uniq used freopen on stdout, and were potentially vulnerable. dircolors, du, and tsort only used it on stdin, which is unaffected by freopen_safer, but this covers all uses for consistency. * cfg.mk (sc_require_stdio_safer): New rule. * gl/modules/xfreopen (Depends-on): Add freopen-safer. * gl/lib/xfreopen.c (includes): Use stdio--.h. * src/ptx.c (includes): Likewise. * src/shuf.c (includes): Likewise. * src/uniq.c (includes): Likewise. * src/dircolors.c (includes): Likewise. * src/du.c (includes): Likewise. * src/tsort.c (includes): Likewise.
Diffstat (limited to 'gl/lib')
-rw-r--r--gl/lib/xfreopen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gl/lib/xfreopen.c b/gl/lib/xfreopen.c
index 61091694b..32e68fa35 100644
--- a/gl/lib/xfreopen.c
+++ b/gl/lib/xfreopen.c
@@ -21,6 +21,7 @@
#include "error.h"
#include "exitfail.h"
#include "quote.h"
+#include "stdio--.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)