aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-03-15 09:01:45 +0000
committerRon Yorston <rmy@pobox.com>2018-03-15 09:01:45 +0000
commit94cf1f830d25409ba80b0933075e026e41fe0e3c (patch)
treef3a386872c52bb7c18283a4bca01dade3811d503 /include
parent6fe4ad9a6c96624c2b75c0d51b035bc1a71d9eba (diff)
downloadbusybox-w32-94cf1f830d25409ba80b0933075e026e41fe0e3c.tar.gz
busybox-w32-94cf1f830d25409ba80b0933075e026e41fe0e3c.tar.bz2
busybox-w32-94cf1f830d25409ba80b0933075e026e41fe0e3c.zip
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.
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h
index 09903d582..386540b37 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -30,6 +30,7 @@ int inet_pton(int af, const char *src, void *dst);
30#define FD_CLOEXEC 0x1 30#define FD_CLOEXEC 0x1
31#define O_NONBLOCK 0 31#define O_NONBLOCK 0
32#define O_NOFOLLOW 0 32#define O_NOFOLLOW 0
33#define O_SPECIAL 0x800000
33 34
34/* 35/*
35 * grp.h 36 * grp.h
@@ -367,6 +368,7 @@ int kill(pid_t pid, int sig);
367int link(const char *oldpath, const char *newpath); 368int link(const char *oldpath, const char *newpath);
368NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM); 369NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM);
369int mingw_open (const char *filename, int oflags, ...); 370int mingw_open (const char *filename, int oflags, ...);
371int mingw_xopen(const char *filename, int oflags);
370void mingw_read_zero(int fd); 372void mingw_read_zero(int fd);
371void mingw_read_random(int fd); 373void mingw_read_random(int fd);
372ssize_t mingw_read(int fd, void *buf, size_t count); 374ssize_t mingw_read(int fd, void *buf, size_t count);