|
|
|
@ -1296,7 +1296,7 @@ in a sambaDomainName',
|
|
|
|
|
splNet = strNetworks.replace(","," ").split(" ")
|
|
|
|
|
if checkNet:
|
|
|
|
|
checkIP = False
|
|
|
|
|
res=re.compile("^\d\d?\d?\.\d\d?\d?\.\d\d?\d?\.\d\d?\d?(\/\d\d?)?$")
|
|
|
|
|
res=re.compile("^\d\d?\d?\.\d\d?\d?\.\d\d?\d?\.\d\d?\d?\/\d\d?$")
|
|
|
|
|
else:
|
|
|
|
|
checkIP = True
|
|
|
|
|
res=re.compile("^\d\d?\d?\.\d\d?\d?\.\d\d?\d?\.\d\d?\d?$")
|
|
|
|
@ -1320,19 +1320,19 @@ in a sambaDomainName',
|
|
|
|
|
flagError = True
|
|
|
|
|
break
|
|
|
|
|
if checkNet:
|
|
|
|
|
checkIP = False
|
|
|
|
|
netList = r.split("/")
|
|
|
|
|
if netList and len(netList)>1:
|
|
|
|
|
if len(netList)==2:
|
|
|
|
|
if len(netList)==2:
|
|
|
|
|
try:
|
|
|
|
|
netMaskInt = int(netList[1])
|
|
|
|
|
if netMaskInt>31 or netMaskInt<4:
|
|
|
|
|
flagError = True
|
|
|
|
|
break
|
|
|
|
|
else:
|
|
|
|
|
except:
|
|
|
|
|
flagError = True
|
|
|
|
|
break
|
|
|
|
|
if netMaskInt>31 or netMaskInt<4:
|
|
|
|
|
flagError = True
|
|
|
|
|
break
|
|
|
|
|
else:
|
|
|
|
|
checkIP = True
|
|
|
|
|
flagError = True
|
|
|
|
|
break
|
|
|
|
|
if checkIP and splIP[3] and int(splIP[3]) == 0:
|
|
|
|
|
flagError = True
|
|
|
|
|
break
|
|
|
|
@ -16529,7 +16529,7 @@ incompatible with option "--ip" (PTR-record)'))
|
|
|
|
|
# ip адрес
|
|
|
|
|
typeRec = "ptr"
|
|
|
|
|
ip = options['ip']
|
|
|
|
|
if "/" in ip or "," in ip or not self.isCorrectStringNet(ip):
|
|
|
|
|
if "," in ip or not self.isCorrectStringNet(ip, False):
|
|
|
|
|
self.printERROR(_("IP address %s incorrectly")%ip)
|
|
|
|
|
return False
|
|
|
|
|
ret = False
|
|
|
|
@ -19874,7 +19874,7 @@ incompatible, use one of the options"))
|
|
|
|
|
return False
|
|
|
|
|
baseDN = options['b']
|
|
|
|
|
ip = options['ip']
|
|
|
|
|
if "/" in ip or "," in ip or not self.isCorrectStringNet(ip):
|
|
|
|
|
if "," in ip or not self.isCorrectStringNet(ip, False):
|
|
|
|
|
self.printERROR(_("IP address %s incorrectly")%ip)
|
|
|
|
|
return False
|
|
|
|
|
domain = options['domain']
|
|
|
|
|