mergerfs/src/fuse_passthrough.hpp

32 lines
499 B
C++
Raw Normal View History

2025-06-05 23:47:42 -05:00
#pragma once
#include "ugid.hpp"
#include "fuse.h"
// Becoming root is required due to current security policies within
// the kernel. This may be able to be changed in the future.
2025-06-05 23:47:42 -05:00
namespace FUSE
{
static
inline
int
passthrough_open(const int fd_)
2025-06-05 23:47:42 -05:00
{
const ugid::SetRootGuard _;
return fuse_passthrough_open(fd_);
2025-06-05 23:47:42 -05:00
}
static
inline
int
passthrough_close(const int backing_id_)
2025-06-05 23:47:42 -05:00
{
const ugid::SetRootGuard _;
return fuse_passthrough_close(backing_id_);
2025-06-05 23:47:42 -05:00
}
}