Rework how fuse request context is handled (#1543)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
mkdocs / deploy (push) Waiting to run

This commit is contained in:
trapexit 2025-10-13 00:21:36 -04:00 • committed by GitHub
parent d18c273293
commit 0371f03def
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
117 changed files with 1894 additions and 2438 deletions

View file

@ -132,21 +132,21 @@ _mknod(const Policy::Search &searchFunc_,
}
int
FUSE::mknod(const char *fusepath_,
mode_t mode_,
dev_t rdev_)
FUSE::mknod(const fuse_req_ctx_t *ctx_,
const char *fusepath_,
mode_t mode_,
dev_t rdev_)
{
int rv;
const fs::path fusepath{fusepath_};
const fuse_context *fc = fuse_get_context();
const ugid::Set ugid(fc->uid,fc->gid);
const fs::path fusepath{fusepath_};
const ugid::Set ugid(ctx_);
rv = ::_mknod(cfg.func.getattr.policy,
cfg.func.mknod.policy,
cfg.branches,
fusepath,
mode_,
fc->umask,
ctx_->umask,
rdev_);
if(rv == -EROFS)
{
@ -156,7 +156,7 @@ FUSE::mknod(const char *fusepath_,
cfg.branches,
fusepath,
mode_,
fc->umask,
ctx_->umask,
rdev_);
}