*/
flags |= O_CLOEXEC;
- return open(pathname, flags, 0777);
+ return open(pathname, flags, 0644);
}
int os_close(int fd)
struct sandbox_state *state = state_get_current();
int fd, ret;
- fd = open(fname, O_CREAT | O_WRONLY, 0777);
+ fd = open(fname, O_CREAT | O_WRONLY, 0644);
if (fd < 0)
return -ENOENT;
ret = write(fd, state->ram_buf, state->ram_size);
if (write(fd, data, size) < 0)
return -EIO;
close(fd);
- if (chmod(fname, 0777))
+ if (chmod(fname, 0755))
return -ENOEXEC;
return 0;