From 94cf1f830d25409ba80b0933075e026e41fe0e3c Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Thu, 15 Mar 2018 09:01:45 +0000 Subject: win32: restrict visibility of special devices Handling of the special devices /dev/zero and /dev/urandom was inconsistent: - they could be used as arguments to 'cat' but not 'od'; - they could not be used in shell redirection. Restrict the use of these devices to two places: - as input files to 'dd' with the 'if=' argument; - internally within 'shred'. See GitHub issue #98. --- coreutils/shred.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'coreutils/shred.c') diff --git a/coreutils/shred.c b/coreutils/shred.c index 1b65a359e..0ebbc39ca 100644 --- a/coreutils/shred.c +++ b/coreutils/shred.c @@ -38,6 +38,10 @@ #include "libbb.h" +#if ENABLE_PLATFORM_MINGW32 +#define xopen mingw_xopen +#endif + int shred_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int shred_main(int argc UNUSED_PARAM, char **argv) { -- cgit v1.2.3-55-g6feb