diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-01-15 10:24:27 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-01-15 10:24:27 -0500 |
commit | 88e36eaf0e508f3745bd8aa2aedb1324b273ebf0 (patch) | |
tree | f08ba4f8f105284f9e269596ca9ecb637334b6fe /src/test/test_checkdir.c | |
parent | 354ddf87126b60e9113bb14ded46280191478fec (diff) | |
download | tor-88e36eaf0e508f3745bd8aa2aedb1324b273ebf0.tar.gz tor-88e36eaf0e508f3745bd8aa2aedb1324b273ebf0.zip |
Fix the checkdir/perms test when umask==077
Fixes 14215; bugfix on 0.2.6.2-alpha. Reported by "cypherpunks".
Diffstat (limited to 'src/test/test_checkdir.c')
-rw-r--r-- | src/test/test_checkdir.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/test_checkdir.c b/src/test/test_checkdir.c index 882e3b3a61..ae859449cb 100644 --- a/src/test/test_checkdir.c +++ b/src/test/test_checkdir.c @@ -11,6 +11,7 @@ #ifdef _WIN32 #define mkdir(a,b) mkdir(a) #define tt_int_op_nowin(a,op,b) do { (void)(a); (void)(b); } while (0) +#define umask(mask) ((void)0) #else #define tt_int_op_nowin(a,op,b) tt_int_op((a),op,(b)) #endif @@ -28,6 +29,8 @@ test_checkdir_perms(void *testdata) cpd_check_t unix_verify_optsmask; struct stat st; + umask(022); + /* setup data directory before tests. */ tor_free(options->DataDirectory); options->DataDirectory = tor_strdup(get_fname(subdir)); @@ -134,7 +137,7 @@ test_checkdir_perms(void *testdata) { #name, test_checkdir_##name, (flags), NULL, NULL } struct testcase_t checkdir_tests[] = { - CHECKDIR(perms, 0), + CHECKDIR(perms, TT_FORK), END_OF_TESTCASES }; |