| Index: libraries/nacl-mounts/memory/MemNode.cc
|
| ===================================================================
|
| --- libraries/nacl-mounts/memory/MemNode.cc (revision 598)
|
| +++ libraries/nacl-mounts/memory/MemNode.cc (working copy)
|
| @@ -7,6 +7,7 @@
|
| #include "MemNode.h"
|
| #include <assert.h>
|
| #include <errno.h>
|
| +#include <nacl-mounts/util/DebugPrint.h>
|
| #include <stdio.h>
|
| #include <stdlib.h>
|
|
|
| @@ -22,12 +23,14 @@
|
| }
|
|
|
| int MemNode::stat(struct stat *buf) {
|
| + if (!buf) return 0;
|
| memset(buf, 0, sizeof(struct stat));
|
| buf->st_ino = (ino_t)slot_;
|
| if (is_dir()) {
|
| buf->st_mode = S_IFDIR | 0777;
|
| } else {
|
| - buf->st_mode = S_IFREG | 0777;
|
| + buf->st_mode = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
|
| + | S_IWOTH;
|
| buf->st_size = len_;
|
| }
|
| buf->st_uid = 1001;
|
|
|