|
|
|
@ -1114,7 +1114,7 @@ in a sambaDomainName',
|
|
|
|
|
[not x in retList and retList.append(x) for x in listEl]
|
|
|
|
|
return retList
|
|
|
|
|
|
|
|
|
|
#TODO debug jpeg encoding
|
|
|
|
|
#TODO debug magick png to jpeg encoding
|
|
|
|
|
def setJpegPhotoUser(self, userName, photoPath, attr="uid"):
|
|
|
|
|
"""Добавляем jpeg фотографию пользователя в LDAP"""
|
|
|
|
|
import subprocess
|
|
|
|
@ -2797,7 +2797,6 @@ service"))
|
|
|
|
|
addUsers.append(user)
|
|
|
|
|
modAttrs = []
|
|
|
|
|
for userName in addUsers:
|
|
|
|
|
#TODO check userName encoding
|
|
|
|
|
modAttrs.append((ldap.MOD_ADD, 'memberUid', userName.encode("UTF-8")))
|
|
|
|
|
if modAttrs:
|
|
|
|
|
groupDN = self.addDN("cn=" + groupName, self.relGroupsDN)
|
|
|
|
@ -5947,8 +5946,7 @@ of version > 2.1.10, then you can delete this file.") + "\n"
|
|
|
|
|
foundUserNames = []
|
|
|
|
|
if searchUsers:
|
|
|
|
|
for data in searchUsers:
|
|
|
|
|
#TODO check encoding
|
|
|
|
|
foundUserNames.append(data[0][1]["uid"][0])
|
|
|
|
|
foundUserNames.append(data[0][1]["uid"][0].decode("UTF-8"))
|
|
|
|
|
if foundUserNames:
|
|
|
|
|
primaryUsers = list(set(foundUserNames) & set(users))
|
|
|
|
|
if primaryUsers:
|
|
|
|
@ -10066,6 +10064,12 @@ the password will be changed only for Samba account")
|
|
|
|
|
'helpChapter':_("DHCP service options"),
|
|
|
|
|
'help':_("forced setup service")
|
|
|
|
|
},
|
|
|
|
|
{'progAccess':(6,),
|
|
|
|
|
'shortOption':"f",
|
|
|
|
|
'longOption':"force",
|
|
|
|
|
'helpChapter':_("Samba service options"),
|
|
|
|
|
'help':_("forced setup service")
|
|
|
|
|
},
|
|
|
|
|
{'progAccess':(6,),
|
|
|
|
|
'longOption':"net",
|
|
|
|
|
'optVal':"NET",
|
|
|
|
@ -14953,7 +14957,7 @@ with another option."))
|
|
|
|
|
flagFirst = False
|
|
|
|
|
for value in ldapValue:
|
|
|
|
|
if not flagFirst:
|
|
|
|
|
data.append((attrName, value.decode("UTF-8")))
|
|
|
|
|
data.append((attrName, value))
|
|
|
|
|
flagFirst = True
|
|
|
|
|
else:
|
|
|
|
|
data.append(("", value.decode("UTF-8")))
|
|
|
|
@ -14965,12 +14969,12 @@ with another option."))
|
|
|
|
|
if value:
|
|
|
|
|
memberGroups.insert(0, value.decode("UTF-8"))
|
|
|
|
|
flagFirst = False
|
|
|
|
|
for value in memberGroups:
|
|
|
|
|
for member_group in memberGroups:
|
|
|
|
|
if not flagFirst:
|
|
|
|
|
data.append((attrApp, value))
|
|
|
|
|
data.append((attrApp, member_group))
|
|
|
|
|
flagFirst = True
|
|
|
|
|
else:
|
|
|
|
|
data.append(("", value))
|
|
|
|
|
data.append(("", member_group))
|
|
|
|
|
else:
|
|
|
|
|
data.append((attrName, _("No")))
|
|
|
|
|
return (headers, data)
|
|
|
|
@ -16907,7 +16911,8 @@ class dnsTxt(cl_profile.bind,shareTxt):
|
|
|
|
|
elif zoneType == "slave":
|
|
|
|
|
if not zoneMasters:
|
|
|
|
|
self.setError(\
|
|
|
|
|
_('Can not found master DNS server in the DNS zone "%s"')%zoneName)
|
|
|
|
|
_('Can not found master DNS server\
|
|
|
|
|
in the DNS zone "%s"')%zoneName)
|
|
|
|
|
return False
|
|
|
|
|
zoneFile = "%s.zone" %zoneName.split(".in-addr.arpa")[0]
|
|
|
|
|
template = 'zone "%s" {\n\
|
|
|
|
@ -17783,8 +17788,7 @@ incompatible with option "--ip" (PTR-record)'))
|
|
|
|
|
not self.isCorrectStringNet(zoneName):
|
|
|
|
|
self.printERROR(_('Incorrect network %s for reverse zone')\
|
|
|
|
|
%zoneName)
|
|
|
|
|
self.printWARNING(_("Example network for reverse zone") +\
|
|
|
|
|
" :")
|
|
|
|
|
self.printWARNING(_("Example network for reverse zone") + " :")
|
|
|
|
|
self.printWARNING('"-n 192.168.0.0/24"')
|
|
|
|
|
return False
|
|
|
|
|
dataIP = self.getDomainAndZoneFromIP(network)
|
|
|
|
@ -17831,8 +17835,7 @@ incompatible with option "--ip" (PTR-record)'))
|
|
|
|
|
%zoneName)
|
|
|
|
|
return False
|
|
|
|
|
# Удаляем все MX записи в записи зоны
|
|
|
|
|
ret = self.modMXRecord("@", zoneName, zoneName,
|
|
|
|
|
True, [])
|
|
|
|
|
ret = self.modMXRecord("@", zoneName, zoneName, True, [])
|
|
|
|
|
# Увеличиваем на 1 серийный номер зоны
|
|
|
|
|
if not self.incrementSerialNumberZone(zoneName):
|
|
|
|
|
return False
|
|
|
|
@ -18027,10 +18030,12 @@ the primary authoritative server for the zone"))
|
|
|
|
|
if self.searchZoneInLDAP(nsZoneName) and\
|
|
|
|
|
self.searchDomainNameInLDAP(nameServer):
|
|
|
|
|
self.printERROR(_('Command line option "--ipserver" \
|
|
|
|
|
is not needed, as the host name "%s" found in the DNS server')%nameServer)
|
|
|
|
|
is not needed, as the host name "%s" found in\
|
|
|
|
|
the DNS server')%nameServer)
|
|
|
|
|
else:
|
|
|
|
|
self.printERROR(_('Command line option "--ipserver" \
|
|
|
|
|
is not needed, as the host name "%s" does not belong to the existing zones on \
|
|
|
|
|
is not needed, as the host name "%s" does not\
|
|
|
|
|
belong to the existing zones on \
|
|
|
|
|
this DNS server')%nameServer)
|
|
|
|
|
return False
|
|
|
|
|
# Почтовый адрес администратора зоны
|
|
|
|
@ -18804,7 +18809,8 @@ incompatible with CNAME-record (option "-t")'))
|
|
|
|
|
self.printERROR(_("A-record %s exists in LDAP")\
|
|
|
|
|
%newDomainName)
|
|
|
|
|
self.printERROR("%s --> %s"\
|
|
|
|
|
%(newDomainName, foundNewDomain[0][0][1]['aRecord'][0].decode("UTF-8")))
|
|
|
|
|
%(newDomainName, foundNewDomain[0][0][1]['aRecord'][0]\
|
|
|
|
|
.decode("UTF-8")))
|
|
|
|
|
self.printERROR("")
|
|
|
|
|
return False
|
|
|
|
|
newIP = ""
|
|
|
|
|