revert removal of 'all' policy and relevant behavior. closes #54

This commit is contained in:
Antonio SJ Musumeci 2015-02-24 18:47:31 -05:00
parent a359c88173
commit c022741ffb
28 changed files with 454 additions and 225 deletions

View file

@ -45,19 +45,19 @@ using mergerfs::Policy;
static
int
_access(const fs::SearchFunc searchFunc,
_access(const fs::find::Func searchFunc,
const vector<string> &srcmounts,
const string &fusepath,
const int mask)
{
int rv;
fs::Path path;
fs::Paths paths;
rv = searchFunc(srcmounts,fusepath,path);
rv = searchFunc(srcmounts,fusepath,paths,1);
if(rv == -1)
return -errno;
rv = ::eaccess(path.full.c_str(),mask);
rv = ::eaccess(paths[0].full.c_str(),mask);
return ((rv == -1) ? -errno : 0);
}