Android-cuttlefish cvd tool
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
cuttlefish::ScopedPrivileges Class Reference

#include <privilege.h>

Public Member Functions

 ScopedPrivileges (ScopedPrivileges &&other) noexcept
 
ScopedPrivileges & operator= (ScopedPrivileges &&other)=delete
 
 ScopedPrivileges (const ScopedPrivileges &)=delete
 
ScopedPrivileges & operator= (const ScopedPrivileges &)=delete
 
 ~ScopedPrivileges ()
 

Static Public Member Functions

static Result< ScopedPrivileges > Elevate ()
 

Private Member Functions

 ScopedPrivileges (uid_t orig)
 

Private Attributes

std::optional< uid_t > orig_
 
std::optional< std::vector< char * > > saved_env_
 

Constructor & Destructor Documentation

◆ ScopedPrivileges() [1/3]

cuttlefish::ScopedPrivileges::ScopedPrivileges ( ScopedPrivileges &&  other)
noexcept

◆ ScopedPrivileges() [2/3]

cuttlefish::ScopedPrivileges::ScopedPrivileges ( const ScopedPrivileges &  )
delete

◆ ~ScopedPrivileges()

cuttlefish::ScopedPrivileges::~ScopedPrivileges ( )

◆ ScopedPrivileges() [3/3]

cuttlefish::ScopedPrivileges::ScopedPrivileges ( uid_t  orig)
explicitprivate

Member Function Documentation

◆ Elevate()

Result< ScopedPrivileges > cuttlefish::ScopedPrivileges::Elevate ( )
static

◆ operator=() [1/2]

ScopedPrivileges & cuttlefish::ScopedPrivileges::operator= ( const ScopedPrivileges &  )
delete

◆ operator=() [2/2]

ScopedPrivileges & cuttlefish::ScopedPrivileges::operator= ( ScopedPrivileges &&  other)
delete

Member Data Documentation

◆ orig_

std::optional<uid_t> cuttlefish::ScopedPrivileges::orig_
private

◆ saved_env_

std::optional<std::vector<char*> > cuttlefish::ScopedPrivileges::saved_env_
private

The documentation for this class was generated from the following files: