From 0b14c471fc77cbcb93f435a46878b25f57741e0e Mon Sep 17 00:00:00 2001 From: Tom Joseph Date: Sun, 30 Sep 2018 01:42:59 +0530 Subject: ldap: Add persistence for LDAP mapper D-Bus objects Change-Id: Ib8979a7c655f74c332d80e7fb221ef03e9a3f83c Signed-off-by: Tom Joseph --- phosphor-ldap-mapper/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'phosphor-ldap-mapper/main.cpp') diff --git a/phosphor-ldap-mapper/main.cpp b/phosphor-ldap-mapper/main.cpp index b4a0650..15c9802 100644 --- a/phosphor-ldap-mapper/main.cpp +++ b/phosphor-ldap-mapper/main.cpp @@ -11,6 +11,12 @@ int main(int argc, char** argv) phosphor::user::LDAPMapperMgr mapperMgr(bus, phosphor::user::mapperMgrRoot); + // Create a directory to persist errors. + std::experimental::filesystem::create_directories(LDAP_MAPPER_PERSIST_PATH); + + // Restore the serialized LDAP group privilege mapping. + mapperMgr.restore(); + // Claim the bus name for the application bus.request_name(LDAP_MAPPER_MANAGER_BUSNAME); -- cgit v1.2.1