From 3e7a72eaaca9819f28e48fbf676bf67eb408287d Mon Sep 17 00:00:00 2001 From: Ratan Gupta Date: Thu, 18 Oct 2018 09:57:14 +0530 Subject: phosphor-ldap-conf: Make correction in renaming path of nsswitch.conf By default nscd comes with nsswitch.conf, we had one more file for the ldap specific version, and we copy the content from the ldap nsswitch to the nsswitch.conf once LDAP config object gets created/deleted. We had some inconsistency during restarting of services so thought of clean logic where we would be having two files nsswitch_linux/nsswitch_ldap and when ldap config object gets created we copy the nsswitch_ldap to nsswitch.conf and when it gets deleted then copy the nsswitch_linux to nsswitch.conf Change-Id: I5a0af3ec82dd08fc54c7423fda1a80509769872d Signed-off-by: Ratan Gupta Signed-off-by: Nagaraju Goruganti --- phosphor-ldap-config/ldap_configuration.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/phosphor-ldap-config/ldap_configuration.cpp b/phosphor-ldap-config/ldap_configuration.cpp index 3e31e41..1369362 100644 --- a/phosphor-ldap-config/ldap_configuration.cpp +++ b/phosphor-ldap-config/ldap_configuration.cpp @@ -51,8 +51,7 @@ void Config::delete_() { fs::copy_file(defaultNslcdFile, LDAP_CONFIG_FILE, fs::copy_options::overwrite_existing); - fs::copy_file(nsSwitchFile, LDAPNsSwitchFile, - fs::copy_options::overwrite_existing); + fs::copy_file(linuxNsSwitchFile, nsSwitchFile, fs::copy_options::overwrite_existing); } @@ -416,8 +415,6 @@ std::string deleteObject(); try { - fs::copy_file(nsSwitchFile, linuxNsSwitchFile, - fs::copy_options::overwrite_existing); fs::copy_file(LDAPNsSwitchFile, nsSwitchFile, fs::copy_options::overwrite_existing); } -- cgit v1.2.1