summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2018-10-18 09:57:14 +0530
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-11-19 21:37:57 -0500
commit3e7a72eaaca9819f28e48fbf676bf67eb408287d (patch)
treeebd2d44b42ace53aae2e914cb6d32c4faad5c8e6
parentc9c86a2cf57a0cb87ba469ddd69169409fc2b55b (diff)
downloadphosphor-user-manager-3e7a72eaaca9819f28e48fbf676bf67eb408287d.tar.gz
phosphor-user-manager-3e7a72eaaca9819f28e48fbf676bf67eb408287d.zip
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 <ratagupt@in.ibm.com> Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
-rw-r--r--phosphor-ldap-config/ldap_configuration.cpp5
1 files changed, 1 insertions, 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);
}
OpenPOWER on IntegriCloud