diff options
author | Ron Yorston <rmy@pobox.com> | 2018-03-15 09:01:45 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2018-03-15 09:01:45 +0000 |
commit | 94cf1f830d25409ba80b0933075e026e41fe0e3c (patch) | |
tree | f3a386872c52bb7c18283a4bca01dade3811d503 /include | |
parent | 6fe4ad9a6c96624c2b75c0d51b035bc1a71d9eba (diff) | |
download | busybox-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.h | 2 |
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); | |||
367 | int link(const char *oldpath, const char *newpath); | 368 | int link(const char *oldpath, const char *newpath); |
368 | NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM); | 369 | NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM); |
369 | int mingw_open (const char *filename, int oflags, ...); | 370 | int mingw_open (const char *filename, int oflags, ...); |
371 | int mingw_xopen(const char *filename, int oflags); | ||
370 | void mingw_read_zero(int fd); | 372 | void mingw_read_zero(int fd); |
371 | void mingw_read_random(int fd); | 373 | void mingw_read_random(int fd); |
372 | ssize_t mingw_read(int fd, void *buf, size_t count); | 374 | ssize_t mingw_read(int fd, void *buf, size_t count); |