mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
platform specific code to deal with sete{u,g}id. closes #17
This commit is contained in:
parent
716453596a
commit
0e12d79659
39 changed files with 323 additions and 131 deletions
|
|
@ -76,7 +76,7 @@ _create(const fs::SearchFunc searchFunc,
|
|||
createPathFunc(srcmounts,dirname,createpath);
|
||||
if(createpath.empty())
|
||||
return -ENOSPC;
|
||||
|
||||
|
||||
if(createpath[0].base != existingpath[0].base)
|
||||
fs::clonepath(existingpath[0].base,createpath[0].base,dirname);
|
||||
|
||||
|
|
@ -100,8 +100,9 @@ namespace mergerfs
|
|||
mode_t mode,
|
||||
struct fuse_file_info *fileinfo)
|
||||
{
|
||||
ugid::SetResetGuard ugid;
|
||||
const config::Config &config = config::get();
|
||||
const struct fuse_context *fc = fuse_get_context();
|
||||
const config::Config &config = config::get();
|
||||
const ugid::SetResetGuard ugid(fc->uid,fc->gid);
|
||||
|
||||
if(fusepath == config.controlfile)
|
||||
return _create_controlfile(fileinfo->fh);
|
||||
|
|
@ -110,7 +111,7 @@ namespace mergerfs
|
|||
*config.create,
|
||||
config.srcmounts,
|
||||
fusepath,
|
||||
mode,
|
||||
(mode & ~fc->umask),
|
||||
fileinfo->flags,
|
||||
fileinfo->fh);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue