|
@ -283,15 +283,20 @@ namespace mergerfs |
|
|
int flags) |
|
|
int flags) |
|
|
{ |
|
|
{ |
|
|
const config::Config &config = config::get(); |
|
|
const config::Config &config = config::get(); |
|
|
|
|
|
const struct fuse_context *fc = fuse_get_context(); |
|
|
|
|
|
|
|
|
if(fusepath == config.controlfile) |
|
|
if(fusepath == config.controlfile) |
|
|
|
|
|
{ |
|
|
|
|
|
if((fc->uid != ::getuid()) && (fc->gid != ::getgid())) |
|
|
|
|
|
return -EPERM; |
|
|
|
|
|
|
|
|
return _setxattr_controlfile(config::get_writable(), |
|
|
return _setxattr_controlfile(config::get_writable(), |
|
|
attrname, |
|
|
attrname, |
|
|
string(attrval,attrvalsize), |
|
|
string(attrval,attrvalsize), |
|
|
flags); |
|
|
flags); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
const struct fuse_context *fc = fuse_get_context(); |
|
|
|
|
|
const ugid::SetResetGuard ugid(fc->uid,fc->gid); |
|
|
const ugid::SetResetGuard ugid(fc->uid,fc->gid); |
|
|
const rwlock::ReadGuard readlock(&config.srcmountslock); |
|
|
const rwlock::ReadGuard readlock(&config.srcmountslock); |
|
|
|
|
|
|
|
|