summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/test/nacl_security_tests/commands_posix.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/test/nacl_security_tests/commands_posix.cc b/chrome/test/nacl_security_tests/commands_posix.cc
index 013043e..79bcde7 100644
--- a/chrome/test/nacl_security_tests/commands_posix.cc
+++ b/chrome/test/nacl_security_tests/commands_posix.cc
@@ -19,8 +19,11 @@
namespace sandbox {
+// Permissions for the user to read & write and others to read.
+const mode_t kCreatePermissions = 0644;
+
SboxTestResult TestOpenReadFile(const char *path) {
- int fd = open(path, O_RDONLY | O_CREAT);
+ int fd = open(path, O_RDONLY | O_CREAT, kCreatePermissions);
if (-1 == fd) {
return SBOX_TEST_DENIED;
} else {
@@ -30,7 +33,7 @@ SboxTestResult TestOpenReadFile(const char *path) {
}
SboxTestResult TestOpenWriteFile(const char *path) {
- int fd = open(path, O_WRONLY | O_CREAT);
+ int fd = open(path, O_WRONLY | O_CREAT, kCreatePermissions);
if (-1 == fd) {
return SBOX_TEST_DENIED;
} else {