MCPcopy Create free account
hub / github.com/USBGuard/usbguard / loadRules

Method loadRules

src/Daemon/Daemon.cpp:402–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400 }
401
402 void Daemon::loadRules()
403 {
404 USBGUARD_LOG(Info) << "Loading RuleSet";
405 auto rulesets = _nss.getRuleSet(this);
406
407 try {
408 for (auto ruleset : rulesets) {
409 ruleset->load();
410 }
411 }
412 catch (const RuleParserError& ex) {
413 throw Exception("Rules", _nss.getSourceInfo(), ex.hint());
414 }
415 catch (const Exception& ex) {
416 throw ex;
417 }
418 catch (const std::exception& ex) {
419 throw Exception("Rules", _nss.getSourceInfo(), ex.what());
420 }
421 catch (...) {
422 throw Exception("Rules", _nss.getSourceInfo(), "unknown exception");
423 }
424
425 _policy.setRuleSet(rulesets);
426 }
427
428 void Daemon::loadIPCAccessControlFiles(const std::string& path)
429 {

Callers

nothing calls this directly

Calls 6

ExceptionFunction · 0.85
getSourceInfoMethod · 0.80
whatMethod · 0.80
setRuleSetMethod · 0.80
getRuleSetMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected