Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: native_client_sdk/src/libraries/nacl_io/kernel_handle.cc

Issue 659513002: [NaCl SDK] nacl_io: ignore mode bits when creating files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | native_client_sdk/src/tests/nacl_io_test/kernel_proxy_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/nacl_io/kernel_handle.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc b/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc
index 5c5bcc10b2f30e2ca66ba561ea0f936a81a13132..f7bf16313f554758a19ebbbdf70a48132edc3707 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc
@@ -40,7 +40,7 @@ SocketNode* KernelHandle::socket_node() {
Error KernelHandle::Init(int open_flags) {
handle_attr_.flags = open_flags;
- if (!node_->CanOpen(open_flags)) {
+ if ((open_flags & O_CREAT) == 0 && !node_->CanOpen(open_flags)) {
return EACCES;
}
« no previous file with comments | « no previous file | native_client_sdk/src/tests/nacl_io_test/kernel_proxy_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698