libfilezilla
Public Member Functions | Friends | List of all members
impersonation_token Class Referencefinal

Impersonation tokens for a given user can be used to spawn processes running as that user. More...

#include <impersonation.hpp>

Public Member Functions

 impersonation_token (impersonation_token &&) noexcept
 
impersonation_tokenoperator= (impersonation_token &&) noexcept
 
 impersonation_token (fz::native_string const &username, fz::native_string const &password)
 Creates an impersonation token, verifying credentials in the proceess.
 
 operator bool () const
 
bool operator== (impersonation_token const &) const
 
bool operator< (impersonation_token const &) const
 
fz::native_string username () const
 Returns the name of the impersonated user.
 
fz::native_string home () const
 Returns home directory, may be empty.
 
std::size_t hash () const noexcept
 For std::hash.
 

Friends

class impersonation_token_impl
 

Detailed Description

Impersonation tokens for a given user can be used to spawn processes running as that user.

Under *nix, the caller needs to be root. On Linux, CAP_SETUID/CAP_SETGID is also sufficient.

On Windows, the caller needs to have "Replace a process level token" rights, to be found through secpol.msc -> Local Policies -> User Rights Assignment


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