26 #ifndef NFD_DAEMON_COMMON_PRIVILEGE_HELPER_HPP
27 #define NFD_DAEMON_COMMON_PRIVILEGE_HELPER_HPP
57 return m_whatMessage.data();
61 const std::string m_whatMessage;
65 initialize(
const std::string& userName,
const std::string& groupName);
76 std::invoke(std::forward<F>(f));
90 #ifdef NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
91 static uid_t s_normalUid;
92 static gid_t s_normalGid;
94 static uid_t s_privilegedUid;
95 static gid_t s_privilegedGid;
Indicates a serious seteuid/setegid failure.
Error(const std::string &what)
const char * what() const
static void runElevated(F &&f)
static void initialize(const std::string &userName, const std::string &groupName)
#define NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE