|
FlatImage
A configurable Linux containerization system
|
Unshare namespace options bitfield management in reserved space. More...
Classes | |
| class | Unshares |
| Manages FlatImage unshare options stored in reserved space. More... | |
Typedefs | |
| using | Bits = uint16_t |
Functions | |
| ENUM (Unshare, ALL, USER, IPC, PID, NET, UTS, CGROUP) | |
| Value< void > | bit_set (Bits &bits, Unshare const &unshare, bool value) noexcept |
| Sets a bit unshare option with the target value. | |
| std::set< std::string > | to_strings (Bits const &bits) noexcept |
| Creates a set of lowercase string unshare option 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< Unshare, Bits > const | unshare_mask |
Unshare namespace options bitfield management in reserved space.
This namespace manages the namespace unshare options for bubblewrap. It provides operations for setting, adding, removing, and querying unshare options such as user, ipc, pid, net, uts, and cgroup namespaces. Options default to zero (no unsharing), and must be explicitly enabled by the user.
Note: USER and CGROUP options will use the '-try' variants in bwrap for permissiveness.
| using ns_reserved::ns_unshare::Bits = uint16_t |
Definition at line 42 of file unshare.hpp.
|
inlinenodiscardnoexcept |
Sets a bit unshare option with the target value.
| bits | Unshare bits |
| unshare | Unshare option to change in the bits |
| value | Value to set the target unshare option |
Definition at line 66 of file unshare.hpp.
|
inlinenoexcept |
Read the Bits struct from the given binary.
| path_file_binary | Binary which to read the Bits struct from |
Definition at line 118 of file unshare.hpp.
|
inlinenodiscardnoexcept |
Creates a set of lowercase string unshare option representations.
| bits | Unshare bits |
Definition at line 82 of file unshare.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 104 of file unshare.hpp.
|
inline |
Definition at line 48 of file unshare.hpp.