mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-19 16:16:48 +00:00
Fix error handling in fuse chmod, chown, setxattr, removexattr
This commit is contained in:
committed by
trapexit
parent
e5d897f3dc
commit
8199cc8a8b
+3
-3
@@ -37,14 +37,14 @@ _chmod_loop_core(const std::string &basepath_,
|
||||
const mode_t mode_,
|
||||
PolicyRV *prv_)
|
||||
{
|
||||
int rv;
|
||||
fs::path fullpath;
|
||||
|
||||
fullpath = basepath_ / fusepath_;
|
||||
|
||||
errno = 0;
|
||||
fs::lchmod(fullpath,mode_);
|
||||
rv = fs::lchmod(fullpath,mode_);
|
||||
|
||||
prv_->insert(errno,basepath_);
|
||||
prv_->insert(rv,basepath_);
|
||||
}
|
||||
|
||||
static
|
||||
|
||||
+3
-3
@@ -38,14 +38,14 @@ _chown_loop_core(const fs::path &basepath_,
|
||||
const gid_t gid_,
|
||||
PolicyRV *prv_)
|
||||
{
|
||||
int rv;
|
||||
fs::path fullpath;
|
||||
|
||||
fullpath = basepath_ / fusepath_;
|
||||
|
||||
errno = 0;
|
||||
fs::lchown(fullpath,uid_,gid_);
|
||||
rv = fs::lchown(fullpath,uid_,gid_);
|
||||
|
||||
prv_->insert(errno,basepath_);
|
||||
prv_->insert(rv,basepath_);
|
||||
}
|
||||
|
||||
static
|
||||
|
||||
@@ -36,14 +36,14 @@ _removexattr_loop_core(const fs::path &basepath_,
|
||||
const char *attrname_,
|
||||
PolicyRV *prv_)
|
||||
{
|
||||
int rv;
|
||||
fs::path fullpath;
|
||||
|
||||
fullpath = basepath_ / fusepath_;
|
||||
|
||||
errno = 0;
|
||||
fs::lremovexattr(fullpath,attrname_);
|
||||
rv = fs::lremovexattr(fullpath,attrname_);
|
||||
|
||||
prv_->insert(errno,basepath_);
|
||||
prv_->insert(rv,basepath_);
|
||||
}
|
||||
|
||||
static
|
||||
|
||||
@@ -110,14 +110,14 @@ _setxattr_loop_core(const fs::path &basepath_,
|
||||
const int flags_,
|
||||
PolicyRV *prv_)
|
||||
{
|
||||
int rv;
|
||||
fs::path fullpath;
|
||||
|
||||
fullpath = basepath_ / fusepath_;
|
||||
|
||||
errno = 0;
|
||||
fs::lsetxattr(fullpath,attrname_,attrval_,attrvalsize_,flags_);
|
||||
rv = fs::lsetxattr(fullpath,attrname_,attrval_,attrvalsize_,flags_);
|
||||
|
||||
prv_->insert(errno,basepath_);
|
||||
prv_->insert(rv,basepath_);
|
||||
}
|
||||
|
||||
static
|
||||
|
||||
Reference in New Issue
Block a user