Apache Mesos
|
Provides wrapper for the linux process capabilities interface. More...
#include <capabilities.hpp>
Public Member Functions | |
Try< ProcessCapabilities > | get () const |
Gets capability set for the calling process. More... | |
Try< Nothing > | set (const ProcessCapabilities &processCapabilities) |
Sets capabilities for the calling process. More... | |
Try< Nothing > | setKeepCaps () |
Process control interface to enforce keeping the parent process's capabilities after a change in uid/gid. More... | |
std::set< Capability > | getAllSupportedCapabilities () |
Get all capabilities supported by the system. More... | |
Static Public Member Functions | |
static Try< Capabilities > | create () |
Factory method to create Capabilities object. More... | |
Public Attributes | |
const bool | ambientCapabilitiesSupported |
Whether ambient capabilities are supported on this host. More... | |
Provides wrapper for the linux process capabilities interface.
Note: This is a class instead of an interface because it has state associated with it.
TODO(jojy): Currently we only support linux capabilities. Consider refactoring the interface so that we can support a generic interface which can be used for other OSes(BSD, Windows etc).
|
static |
Factory method to create Capabilities object.
Capabilities
on success; Error on failure. Failure conditions could be:Capabilities
. Try<ProcessCapabilities> mesos::internal::capabilities::Capabilities::get | ( | ) | const |
Gets capability set for the calling process.
std::set<Capability> mesos::internal::capabilities::Capabilities::getAllSupportedCapabilities | ( | ) |
Get all capabilities supported by the system.
Try<Nothing> mesos::internal::capabilities::Capabilities::set | ( | const ProcessCapabilities & | processCapabilities | ) |
const bool mesos::internal::capabilities::Capabilities::ambientCapabilitiesSupported |
Whether ambient capabilities are supported on this host.
If ambient capabilities are supported, the AMBIENT set will be populated when getting the process capabilities and applied when setting them. Otherwise the AMBIENT set will be ignored.