libssh: fix key file permissions

Should hopefully fix https://github.com/google/oss-fuzz/pull/418#issuecomment-295277016
This commit is contained in:
Oliver Chang 2017-04-19 10:58:20 -07:00
parent 5c0631d83f
commit 98cc8ce860
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
res = shutdown(socket_fds[1], SHUT_WR);
assert(res == 0);
int fd = open("/tmp/libssh_fuzzer_private_key", O_WRONLY | O_CREAT);
int fd = open("/tmp/libssh_fuzzer_private_key", O_WRONLY | O_CREAT, S_IRWXU);
assert(fd >= 0);
ssize_t write_res = write(fd, kRSAPrivateKeyPEM, strlen(kRSAPrivateKeyPEM));
assert(write_res == strlen(kRSAPrivateKeyPEM));