Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
environment.hpp File Reference

Declaration of environment setup routines that requires root privileges. More...

#include <string>
#include <vector>
#include <functional>
#include <sys/types.h>

Go to the source code of this file.

Namespaces

 utils
 

Functions

bool utils::setSuppGroups (const std::vector< std::string > &groups)
 Set supplementary groups to the current process. More...
 
bool utils::dropRoot (uid_t uid, gid_t gid, const std::vector< unsigned int > &caps)
 Set effective and permitted capabilities on the current process and drop root privileges. More...
 
bool utils::launchAsRoot (const std::function< bool()> &func)
 Launch func as root user. More...
 
bool utils::joinToNs (int nsPid, int ns)
 Join to namespace. More...
 
int utils::passNamespacedFd (int nsPid, int ns, const std::function< int()> &fdFactory)
 Pass file descriptor from namespace of some process. More...
 

Detailed Description

Declaration of environment setup routines that requires root privileges.

Author
Michal Witanowski (m.wit.nosp@m.anow.nosp@m.ski@s.nosp@m.amsu.nosp@m.ng.co.nosp@m.m)