Mountdir has correct ownership and permissions set. Fixes https://github.com/cryfs/cryfs/issues/10

This commit is contained in:
Sebastian Messmer 2016-02-12 12:21:39 +01:00
parent 3ecbef6d11
commit d05e3841bd
1 changed files with 3 additions and 1 deletions

View File

@ -103,7 +103,9 @@ void CryNode::stat(struct ::stat *result) const {
if(_parent == none) {
//We are the root directory.
//TODO What should we do?
result->st_mode = S_IFDIR;
result->st_uid = getuid();
result->st_gid = getgid();
result->st_mode = S_IFDIR | S_IRUSR | S_IWUSR | S_IXUSR;
result->st_size = fsblobstore::DirBlob::DIR_LSTAT_SIZE;
} else {
(*_parent)->statChild(_key, result);