legacy
parent 5675cc832a
commit 4dcd8e86e5

Binary file not shown.

@ -1862,7 +1862,7 @@ This command is not allowed."))
# Создаем сертификат для Postfix
if not self.createCertificate(sslOrganization="Postfix IMAP Server",
userName="postfix", groupName="postfix",
certFile="/etc/ssl/postfix/server.pem",
certFile="/etc/ssl/postfix/server.crt",
keyFile="/etc/ssl/postfix/server.key"):
return False
return True
@ -1901,7 +1901,10 @@ This command is not allowed."))
if not os.path.exists(rndFile):
self.printERROR(_("Can not create %s")%rndFile)
return False
textLine = self.execProg("%s gendh -rand %s 512 >> %s"\
self.printOK(
_("Generating DH. This is going to take a long time")
+ " ...", printBR=False)
textLine = self.execProg("%s dhparam -dsaparam -rand %s 4096 >> %s"\
%(sslFile, rndFile, dhFile))
if textLine == False:
self.printERROR(_("Can not create DH certificate %s")%certFile)
@ -1971,7 +1974,10 @@ nsCertType = %s
return False
# Создание DH
if genDH:
textLine = self.execProg("%s gendh -rand %s 512 >> %s"\
self.printOK(
_("Generating DH. This is going to take a long time")
+ " ...", printBR=False)
textLine = self.execProg("%s dhparam -dsaparam -rand %s 4096 >> %s"\
%(sslFile, rndFile, certFile))
if textLine == False:
self.printERROR(_("Can not create DH certificate %s")%certFile)
@ -5284,6 +5290,7 @@ in Jabber service"))
# Изменяемые аттрибуты пользователя
modAttrs = []
# Изменяем Jabber ID
jabber_hosts = self.get_jabber_hosts()
if options.has_key('j'):
# Изменяем JID
jabberId = options['j']
@ -5293,6 +5300,10 @@ in Jabber service"))
if len(jabberId.split("@")) != 2:
self.printERROR(_("JID %s incorrect") %jabberId)
return False
if jabberId.rpartition('@')[2] not in jabber_hosts:
self.printERROR(
_("JID %s not supported on this jabber hosts") %jabberId)
return False
searchUser = self.searchUserToId(jabberId)
if searchUser:
foundUserName = searchUser[0][0][1]['uid'][0]
@ -5552,10 +5563,16 @@ in Unix service") %str(jabberId))
return False
return True
def get_jabber_hosts(self):
jabber_host = self.clVars.Get('sr_jabber_host')
jabber_hosts = self.clVars.Get('sr_jabber_hosts').split(',')
jabber_hosts.append(jabber_host)
return list(set(jabber_hosts))
@adminConnectLdap
def addUserJabberServer(self, userName, options, checkSetup=True):
"""Добавляет jabber пользователя"""
jabber_hosts = self.get_jabber_hosts()
# Проверим установлен ли сервис jabber
if checkSetup and not self.initialChecks("jabber"):
return False
@ -5570,6 +5587,10 @@ in Unix service") %str(jabberId))
if len(jabberId.split("@")) != 2:
self.printERROR(_("JID %s incorrect") %jabberId)
return False
if jabberId.rpartition('@')[2] not in jabber_hosts:
self.printERROR(
_("JID %s not supported on this jabber hosts") %jabberId)
return False
# добавляем jabberID в Unix
if self.isServiceSetup("unix",False):
if not self.servUnixObj.setUserJabberID(userName, jabberId):

Loading…
Cancel
Save