Skip to content
API Documentation
BastionGuard™
FileIdentity.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <filesystem>
5#include <sys/types.h>
7
9
12 std::filesystem::path canonicalPath;
13 std::uint32_t mode{};
14 std::uint32_t uid{};
15 std::uint32_t gid{};
17 bool directory{};
18};
19
21public:
22 [[nodiscard]] static __u64 kernelDeviceNumber(dev_t encodedDevice);
23
24 [[nodiscard]] static FileIdentity resolve(
25 const std::filesystem::path& path,
26 bool requireRegularFile,
27 bool requireRootOwnedAndNotWritable);
28};
29
30} // namespace bastionguard::rootguard
static FileIdentity resolve(const std::filesystem::path &path, bool requireRegularFile, bool requireRootOwnedAndNotWritable)
static __u64 kernelDeviceNumber(dev_t encodedDevice)