diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-11-05 14:27:05 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-11-05 14:28:34 -0500 |
commit | 1dcc49229563192cd43258af5eab97d233146f90 (patch) | |
tree | 9ddd33aebc8894fb812f86b050c25ef1be1893df /src/test | |
parent | 8f645befba4c1c5df9c6f4ef832d217b1fdfed76 (diff) | |
download | tor-1dcc49229563192cd43258af5eab97d233146f90.tar.gz tor-1dcc49229563192cd43258af5eab97d233146f90.zip |
chgrp the testing tempdir to ourself to clear the sticky bit
Closes 13678. Doesn't actually matter for older tors.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test.c b/src/test/test.c index 203b7489df..8b74c0a87a 100644 --- a/src/test/test.c +++ b/src/test/test.c @@ -123,6 +123,10 @@ setup_directory(void) tor_snprintf(temp_dir, sizeof(temp_dir), "/tmp/tor_test_%d_%s", (int) getpid(), rnd32); r = mkdir(temp_dir, 0700); + if (!r) { + /* undo sticky bit so tests don't get confused. */ + r = chown(temp_dir, getuid(), getgid()); + } #endif if (r) { fprintf(stderr, "Can't create directory %s:", temp_dir); |