libfilezilla
Loading...
Searching...
No Matches
impersonation.hpp File Reference

Declares impersonation_token. More...

#include <array>
#include <cstddef>
#include <functional>
#include <initializer_list>
#include <memory>
#include <variant>
#include <type_traits>
#include <utility>
#include "string.hpp"
#include "logger.hpp"
#include "glue/windows.hpp"
Include dependency graph for impersonation.hpp:

Go to the source code of this file.

Classes

class  user
struct  user::name
 A user name. More...
struct  user::id
 Numeric UID on Unix-like systems, string SID on Windows. More...
struct  automatic
struct  isolated
 Create an isolated window station and desktop for spawned processes. More...
struct  named
 Use a caller-provided desktop name, such as L"WinSta0\\Default". More...
struct  impersonation_options
struct  impersonation_options::pwless_type
 Impersonate as any user without checking credentials. More...
class  impersonation_capabilities
class  impersonation_token
 Impersonation tokens for a given user can be used to spawn processes running as that user. More...

Namespaces

namespace  fz
 The namespace used by libfilezilla.

Typedefs

using mode = std::variant<automatic, isolated, named>
 Window station and desktop selection mode for impersonated processes.

Enumerations

enum class  impersonation_profile_mode { skip , require_if_roaming , require }
enum class  impersonation_capability : std::size_t { password , passwordless , user_profile }
enum class  impersonation_capability_state {
  not_requested , not_applicable , indeterminate , unavailable ,
  available
}

Functions

HANDLE get_handle (impersonation_token const &token)
native_string current_username ()
 Returns the username the calling thread is running under.
std::string get_user_id (native_string const &name)
native_string get_user_name (std::string const &id)

Detailed Description