MCPcopy Create free account
hub / github.com/OpenHD/OpenHD / terminate_if_not_root

Method terminate_if_not_root

OpenHD/ohd_common/src/openhd_util.cpp:249–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249void OHDUtil::terminate_if_not_root() {
250 if (!check_root(false)) {
251 openhd::log::get_default()->error(
252 "not root,terminating. Run OpenHD with root privileges.");
253 exit(EXIT_FAILURE);
254 }
255}
256
257bool OHDUtil::get_ohd_env_variable_bool(const std::string& name) {
258 if (!OHDUtil::contains_after_uppercase(name, "OHD_")) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected