| 212 | } |
| 213 | |
| 214 | void LDAPHandler::parseConf(const std::string path) |
| 215 | { |
| 216 | _ldap_file = path; |
| 217 | USBGUARD_LOG(Info) << "Loading LDAP configuration from " << _ldap_file; |
| 218 | std::ifstream ldap_file(_ldap_file); |
| 219 | |
| 220 | if (!ldap_file.is_open()) { |
| 221 | throw ErrnoException("LDAP configuration parsing", _ldap_file, errno); |
| 222 | } |
| 223 | |
| 224 | _parser.parseStream(ldap_file); |
| 225 | _parsedOptions = _parser.getMap(); |
| 226 | ldap_file.close(); |
| 227 | USBGUARD_LOG(Debug) << "Map contains:"; |
| 228 | |
| 229 | for (auto x: _parsedOptions) { |
| 230 | USBGUARD_LOG(Debug) << "--> " << x.first << "->" << x.second << " <--"; |
| 231 | } |
| 232 | |
| 233 | USBGUARD_LOG(Debug) << "LDAP conf has been parsed"; |
| 234 | } |
| 235 | |
| 236 | void LDAPHandler::validateConf() |
| 237 | { |
nothing calls this directly
no test coverage detected