Rework credential handling to support chroot & idmap (#1595)
Some checks are pending
mkdocs / deploy (push) Waiting to run

Run in an elevated credential mode (root) and let the kernel manage
entitlements. Will result in slightly different behavior but should
not be noticed by most.
This commit is contained in:
trapexit 2025-12-05 21:03:48 -06:00 • committed by GitHub
parent d8918458bf
commit 9b046d9a34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
69 changed files with 788 additions and 1066 deletions

View file

@ -48,9 +48,7 @@ int
_concurrent_readdir(ThreadPool &tp_,
const Branches::Ptr &branches_,
const fs::path &rel_dirpath_,
fuse_dirents_t *dirents_,
const uid_t uid_,
const gid_t gid_)
fuse_dirents_t *dirents_)
{
HashSet names;
std::mutex mutex;
@ -62,10 +60,8 @@ _concurrent_readdir(ThreadPool &tp_,
for(const auto &branch : *branches_)
{
auto func =
[&,dirents_,uid_,gid_]()
[&,dirents_]()
{
const ugid::Set ugid(uid_,gid_);
return ::_readdir(branch.path,
rel_dirpath_,
names,
@ -95,7 +91,5 @@ FUSE::ReadDirCOR::operator()(const fuse_req_ctx_t *ctx_,
return ::_concurrent_readdir(_tp,
cfg.branches,
di->fusepath,
dirents_,
ctx_->uid,
ctx_->gid);
dirents_);
}