diff options
| author | Andreas Schneider <asn@cryptomilk.org> | 2015-05-05 10:42:36 +0200 |
|---|---|---|
| committer | Andreas Schneider <asn@cryptomilk.org> | 2015-05-05 11:27:09 +0200 |
| commit | e4e3b3052fa6050a796796e22a0c4b52cb7e0835 (patch) | |
| tree | 41c0bcfb4d240ceb26209e8fc6b58544ee1ae82a /tests/client | |
| parent | 96882cc58cc36f79600a54263b7327b1ce88f99e (diff) | |
| download | libssh-e4e3b3052fa6050a796796e22a0c4b52cb7e0835.tar.gz libssh-e4e3b3052fa6050a796796e22a0c4b52cb7e0835.tar.xz libssh-e4e3b3052fa6050a796796e22a0c4b52cb7e0835.zip | |
tests: Apply umask before calling mkstemp()
CID: #978660
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'tests/client')
| -rw-r--r-- | tests/client/torture_sftp_read.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/client/torture_sftp_read.c b/tests/client/torture_sftp_read.c index 6586d49e..eca8a8c6 100644 --- a/tests/client/torture_sftp_read.c +++ b/tests/client/torture_sftp_read.c @@ -45,12 +45,14 @@ static void torture_sftp_read_blocking(void **state) { ssize_t byteswritten; int fd; sftp_file file; - + mode_t mask; file = sftp_open(t->sftp, "/usr/bin/ssh", O_RDONLY, 0); assert_non_null(file); + mask = umask(S_IRWXO | S_IRWXG); fd = mkstemp(libssh_tmp_file); + umask(mask); unlink(libssh_tmp_file); for (;;) { |
