Опции "-u, --users", "-U", "--full", помещены в сервисы которые их поддерживают

Добавлена проверка существования MX записи для записи на которую будет изменена текущая запись
develop
Самоукин Алексей 15 years ago
parent ca9ad726d3
commit 38bf6dffe7

@ -6910,6 +6910,8 @@ Samba and Unix services") %", ".join(exclGroup)
pwDialog = [_("New SMB password"),
_("Retype new SMB password")]
userPwd = self.getUserPassword(options, "p", "P", pwDialog)
if userPwd == False:
return False
# Опция s пароль только для Samba
if not options.has_key('s'):
if not self.servUnixObj.modUserUnixPasswd(userName,{},
@ -9647,15 +9649,105 @@ the password will be changed only for Samba account")
{'progAccess':(14,),
'shortOption':"u",
'longOption':"users",
'helpChapter':_("Common options"),
'helpChapter':_("Unix service options"),
'help':_("information about all users")
},
{'progAccess':(14,),
'shortOption':"U",
'optVal':"LOGIN",
'helpChapter':_("Common options"),
'helpChapter':_("Unix service options"),
'help':_("information about the user")
},
{'progAccess':(14,),
'longOption':"full",
'helpChapter':_("Unix service options"),
'help':_("full information (all fields)")
},
{'progAccess':(14,),
'shortOption':"u",
'longOption':"users",
'helpChapter':_("Samba service options"),
'help':_("information about all users")
},
{'progAccess':(14,),
'shortOption':"U",
'optVal':"LOGIN",
'helpChapter':_("Samba service options"),
'help':_("information about the user")
},
{'progAccess':(14,),
'longOption':"full",
'helpChapter':_("Samba service options"),
'help':_("full information (all fields)")
},
{'progAccess':(14,),
'shortOption':"u",
'longOption':"users",
'helpChapter':_("Mail service options"),
'help':_("information about all users")
},
{'progAccess':(14,),
'shortOption':"U",
'optVal':"LOGIN",
'helpChapter':_("Mail service options"),
'help':_("information about the user")
},
{'progAccess':(14,),
'longOption':"full",
'helpChapter':_("Mail service options"),
'help':_("full information (all fields)")
},
{'progAccess':(14,),
'shortOption':"u",
'longOption':"users",
'helpChapter':_("Jabber service options"),
'help':_("information about all users")
},
{'progAccess':(14,),
'shortOption':"U",
'optVal':"LOGIN",
'helpChapter':_("Jabber service options"),
'help':_("information about the user")
},
{'progAccess':(14,),
'longOption':"full",
'helpChapter':_("Jabber service options"),
'help':_("full information (all fields)")
},
{'progAccess':(14,),
'shortOption':"u",
'longOption':"users",
'helpChapter':_("FTP service options"),
'help':_("information about all users")
},
{'progAccess':(14,),
'shortOption':"U",
'optVal':"LOGIN",
'helpChapter':_("FTP service options"),
'help':_("information about the user")
},
{'progAccess':(14,),
'longOption':"full",
'helpChapter':_("FTP service options"),
'help':_("full information (all fields)")
},
{'progAccess':(14,),
'shortOption':"u",
'longOption':"users",
'helpChapter':_("Proxy service options"),
'help':_("information about all users")
},
{'progAccess':(14,),
'shortOption':"U",
'optVal':"LOGIN",
'helpChapter':_("Proxy service options"),
'help':_("information about the user")
},
{'progAccess':(14,),
'longOption':"full",
'helpChapter':_("Proxy service options"),
'help':_("full information (all fields)")
},
{'progAccess':(14,),
'shortOption':"g",
'longOption':"groups",
@ -9735,11 +9827,6 @@ forward zone, 'net name' for reverse zone)")
'help':_("information about the DNS record ('host name' for \
forward zone, 'host ip' for reverse zone)")
},
{'progAccess':(14,),
'longOption':"full",
'helpChapter':_("Common options"),
'help':_("full information (all fields)")
},
{'progAccess':(15,),
'shortOption':"s",
'optVal':"PROXY_DN",
@ -12670,7 +12757,7 @@ for %s DNS zone")%zoneName)
allRecordList = ["A","CNAME","MX"]
allHeaderList = [(_("Domain"), "ip"),
(_("Domain"), _("CNAME Domain")),
(_("Domain"), _("Prioritet"),\
(_("Domain"), _("Priority"),\
_("MX Domain"))]
for i in range(len(allRecordList)):
if allDataList[i]:
@ -15881,7 +15968,7 @@ incompatible with CNAME record (options "-t")'))
# modMxServers[1] - новая запись
modMxServers = []
if options.has_key('mxhost'):
# Оключаем модификацию обратной зоны
# Отключаем модификацию обратной зоны
modOther = False
# Почтовые серверы для доменного имени
if typeRec == "ptr":
@ -16292,6 +16379,11 @@ is incompatible with option "--ip"')
self.printERROR(_("Can not found MX host %s")\
%oldMxHost +" " + _("in A record %s")%domainName)
return False
# Проверка наличия новой MX записи в A записи
if newMxHost in foundMxServers:
self.printERROR(_("MX host %s exists")\
%newMxHost +" " + _("in A record %s")%domainName)
return False
# Проверка существования A записи для MX хоста
if not self.checkMXDomains([newMxHost]):
return False
@ -17137,8 +17229,7 @@ in LDAP")%zoneName)
if ret:
self.printOK(_("Remove DNS DN from LDAP Database") + " ...")
else:
self.printERROR(\
_("Can not remove DNS DN from LDAP Database"))
self.printERROR(_("Can not remove DNS DN from LDAP Database"))
if not ret:
return False
ldifFile = self.ldifFileBase

Loading…
Cancel
Save