diff --git a/pym/server/server.py b/pym/server/server.py index cbdffa1..9f2a311 100644 --- a/pym/server/server.py +++ b/pym/server/server.py @@ -17,7 +17,7 @@ import sys from calculate.core.server.func import MethodsInterface from calculate.lib.utils.openrc import OpenRC, OpenRCError -from calculate.lib.configparser import (ConfigParserLocked, +from calculate.lib.configparser import (ConfigParserCaseSensLocked, Error as ConfigParserError) import os from os import path @@ -90,13 +90,13 @@ class Server(MethodsInterface): :return: """ cp_path = self.clVars.Get('server.cl_server_env_path') - cp = ConfigParserLocked(cp_path) + cp = ConfigParserCaseSensLocked(cp_path) try: with cp.lock_write() as cp: if service not in cp: cp.add_section(service) - cp[service]["dn"] = binddn - cp[service]["pass"] = cred + cp[service]["DN"] = binddn + cp[service]["PASS"] = cred except ConfigParserError: raise ServerError(_("Failed to save server parameters")) return True @@ -115,7 +115,7 @@ class Server(MethodsInterface): except OSError: raise ServerError(_("Failed to clear server config")) - cp = ConfigParserLocked(cp_path) + cp = ConfigParserCaseSensLocked(cp_path) try: with cp.lock_write() as cp: if service in cp: diff --git a/pym/server/variables/server.py b/pym/server/variables/server.py index e1bc7a2..1aef3b0 100644 --- a/pym/server/variables/server.py +++ b/pym/server/variables/server.py @@ -38,7 +38,7 @@ class VariableClServerEnvPath(Variable): """ Путь до файла хранящий учётные записи сервера """ - value = "/etc/calculate/server.env" + value = "/etc/calculate/calculate.ldap" class VariableSrLdapSet(Variable):