1 #ifndef LIBFILEZILLA_IMPERSONATION_HEADER
2 #define LIBFILEZILLA_IMPERSONATION_HEADER
15 #include "glue/windows.hpp"
20 class logger_interface;
29 bool drop_admin_privileges =
true;
36 class impersonation_token_impl;
60 explicit operator bool()
const {
61 return impl_.operator bool();
74 std::size_t hash()
const noexcept;
77 std::string uid()
const;
82 friend class impersonation_token_impl;
83 std::unique_ptr<impersonation_token_impl> impl_;
104 struct hash<
fz::impersonation_token>
Definition: impersonation.hpp:22
bool operator==(symmetric_key const &lhs, symmetric_key const &rhs)
Side-channel safe comparison.
Definition: impersonation.hpp:100
Impersonation tokens for a given user can be used to spawn processes running as that user...
Definition: impersonation.hpp:46
native_string current_username()
Returns the username the calling thread is running under.
bool operator<(strtokenizer< LhsString, LhsDelims > const &lhs, strtokenizer< RhsString, RhsDelims > const &rhs)
strtokenizer class less-than comparator.
Definition: string.hpp:565
std::wstring native_string
A string in the system's native character type and encoding. Note: This typedef changes depending on...
Definition: string.hpp:69
String types and assorted functions.
The namespace used by libfilezilla.
Definition: apply.hpp:17
Impersonate as any user without checking credentials.
Definition: impersonation.hpp:25
std::string get_user_uid(native_string const &username)
Abstract interface for logging strings.
Definition: logger.hpp:50