| 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 | { |
nothing calls this directly
no test coverage detected