aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2014-10-12 20:15:38 +0200
committerJakub Jelen <jjelen@redhat.com>2018-10-02 16:33:18 +0200
commit2db325eb74db424857000d7c32dde9f1b6a58b5f (patch)
tree3cb37215e88beb5f6df04e0c22aa47117cd8ceea
parent9937d0b552124c4416d1d8c646086d4369eb27b5 (diff)
downloadlibssh-2db325eb74db424857000d7c32dde9f1b6a58b5f.tar.gz
libssh-2db325eb74db424857000d7c32dde9f1b6a58b5f.tar.xz
libssh-2db325eb74db424857000d7c32dde9f1b6a58b5f.zip
torture: Restrict files to we write to our user.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> (cherry-picked from commit 62b0f58d)
-rw-r--r--tests/torture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/torture.c b/tests/torture.c
index 5129facf..75db88a1 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -561,7 +561,7 @@ void torture_write_file(const char *filename, const char *data){
assert_true(filename[0] != '\0');
assert_non_null(data);
- fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, 0755);
+ fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, 0600);
assert_true(fd >= 0);
rc = write(fd, data, strlen(data));