diff options
author | Ron Yorston <rmy@pobox.com> | 2015-03-24 08:27:45 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2015-03-24 08:27:45 +0000 |
commit | 538a16d15016b9be9885e94e9b94a4cbfb760501 (patch) | |
tree | dfbde972f95e05e0557ffd45bb5bd050a150e98f /coreutils/test.c | |
parent | f2cfa8d515d7c7f594ced5bfe748a5b5773590cb (diff) | |
download | busybox-w32-538a16d15016b9be9885e94e9b94a4cbfb760501.tar.gz busybox-w32-538a16d15016b9be9885e94e9b94a4cbfb760501.tar.bz2 busybox-w32-538a16d15016b9be9885e94e9b94a4cbfb760501.zip |
test: fix access check bug; tweak fake file mode
Changing the fake uid from 0 to 1000 uncovered a problem with file
access checks in test. Previously the tests were short-circuited
because it thought we were root. With a non-root user the tests
were performed, but the mode bits had been redefined for WIN32.
Also adjust the fake file mode returned by stat so that the user
and group modes are identical. Other users have the same modes
as user but without write permission.
Diffstat (limited to 'coreutils/test.c')
-rw-r--r-- | coreutils/test.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/coreutils/test.c b/coreutils/test.c index 6b16ffeb1..9e709a709 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
@@ -643,10 +643,6 @@ static int filstat(char *nm, enum token mode) | |||
643 | } | 643 | } |
644 | 644 | ||
645 | #if ENABLE_PLATFORM_MINGW32 | 645 | #if ENABLE_PLATFORM_MINGW32 |
646 | #undef R_OK | ||
647 | #define R_OK S_IREAD | ||
648 | #undef W_OK | ||
649 | #define W_OK S_IWRITE | ||
650 | if (mode == FILEX) { | 646 | if (mode == FILEX) { |
651 | char *p; | 647 | char *p; |
652 | 648 | ||