| Index: native_client_sdk/src/libraries/nacl_io/mount_dev.cc
|
| diff --git a/native_client_sdk/src/libraries/nacl_io/mount_dev.cc b/native_client_sdk/src/libraries/nacl_io/mount_dev.cc
|
| index 11893ea09e8ff985c82bd569b12f5731b1132ac6..a7e507af5f3b7927e73e5dbcfa1c408478d78ae6 100644
|
| --- a/native_client_sdk/src/libraries/nacl_io/mount_dev.cc
|
| +++ b/native_client_sdk/src/libraries/nacl_io/mount_dev.cc
|
| @@ -9,6 +9,7 @@
|
| #include <errno.h>
|
| #include <fcntl.h>
|
| #include <string.h>
|
| +#include <unistd.h>
|
| #include "nacl_io/kernel_wrap_real.h"
|
| #include "nacl_io/mount_dev.h"
|
| #include "nacl_io/mount_node.h"
|
| @@ -269,6 +270,22 @@ Error UrandomNode::Write(size_t offs,
|
|
|
| } // namespace
|
|
|
| +Error MountDev::Access(const Path& path, int a_mode) {
|
| + MountNode* node = NULL;
|
| +
|
| + AutoLock lock(&lock_);
|
| +
|
| + int error = root_->FindChild(path.Join(), &node);
|
| + if (error)
|
| + return error;
|
| +
|
| + // Don't allow execute access.
|
| + if (a_mode & X_OK)
|
| + return EACCES;
|
| +
|
| + return 0;
|
| +}
|
| +
|
| Error MountDev::Open(const Path& path, int mode, MountNode** out_node) {
|
| *out_node = NULL;
|
|
|
|
|