summaryrefslogtreecommitdiff
path: root/gl
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
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')
-rw-r--r--gl/lib/xfreopen.c1
-rw-r--r--gl/modules/xfreopen1
2 files changed, 2 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)
diff --git a/gl/modules/xfreopen b/gl/modules/xfreopen
index 411f80bbd..ed4ede75a 100644
--- a/gl/modules/xfreopen
+++ b/gl/modules/xfreopen
@@ -8,6 +8,7 @@ lib/xfreopen.h
Depends-on:
error
exitfail
+freopen-safer
quote
configure.ac: