|
FlatImage
A configurable Linux containerization system
|
Permission bitfield management in reserved space. More...
Classes | |
| class | Permissions |
| Manages FlatImage permissions stored in reserved space. More... | |
Typedefs | |
| using | Bits = uint64_t |
Functions | |
| ENUM (Permission, ALL, HOME, MEDIA, AUDIO, WAYLAND, XORG, DBUS_USER, DBUS_SYSTEM, UDEV, USB, INPUT, GPU, NETWORK, DEV, SHM, OPTICAL) | |
| Value< void > | bit_set (Bits &bits, Permission const &permission, bool value) noexcept |
| Sets a bit permission with the target value. | |
| std::set< std::string > | to_strings (Bits const &bits) noexcept |
| Creates a set of lowercase string permission representations. | |
| Value< void > | write (fs::path const &path_file_binary, Bits const &bits) noexcept |
| Write the Bits struct to the given binary. | |
| Value< Bits > | read (fs::path const &path_file_binary) noexcept |
| Read the Bits struct from the given binary. | |
Variables | |
| std::map< Permission, Bits > const | permission_mask |
Permission bitfield management in reserved space.
This namespace manages the sandboxing permissions. It provides operations for setting, adding, removing, and querying permissions such as X11, Wayland, network, GPU, audio, home directory access, USB, Bluetooth, and more. Permissions default to zero (no access), and must be explicitly granted by the user.
| using ns_reserved::ns_permissions::Bits = uint64_t |
Definition at line 41 of file permissions.hpp.
|
inlinenodiscardnoexcept |
Sets a bit permission with the target value.
| bits | Permission bits |
| permission | Permission to change in the bits |
| value | Value to set the target permission |
Definition at line 74 of file permissions.hpp.
|
inlinenoexcept |
Read the Bits struct from the given binary.
| path_file_binary | Binary which to read the Bits struct from |
Definition at line 126 of file permissions.hpp.
|
inlinenodiscardnoexcept |
Creates a set of lowercase string permission representations.
| bits | Permission bits |
Definition at line 90 of file permissions.hpp.
|
inlinenoexcept |
Write the Bits struct to the given binary.
| path_file_binary | Binary in which to write the Bits struct |
| bits | The bits struct to write into the binary |
Definition at line 112 of file permissions.hpp.
|
inline |
Definition at line 47 of file permissions.hpp.