1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-23 17:34:17 +03:00

Merge remote-tracking branch 'origin/v2.1'

This commit is contained in:
Adolfo Gómez García 2017-03-29 11:00:32 +02:00
commit 897682eae4
2 changed files with 7 additions and 4 deletions

View File

@ -34,7 +34,7 @@ class WinDomainOsManager(WindowsOsManager):
domain = gui.TextField(length=64, label=_('Domain'), order=1, tooltip=_('Domain to join machines to (use FQDN form, Netbios name not allowed)'), required=True)
account = gui.TextField(length=64, label=_('Account'), order=2, tooltip=_('Account with rights to add machines to domain'), required=True)
password = gui.PasswordField(length=64, label=_('Password'), order=3, tooltip=_('Password of the account'), required=True)
ou = gui.TextField(length=64, label=_('OU'), order=4, tooltip=_('Organizational unit where to add machines in domain (check it before using it). i.e.: ou=MyMachines,dc=mydomain,dc=local'))
ou = gui.TextField(length=64, label=_('OU'), order=4, tooltip=_('Organizational unit where to add machines in domain (check it before using it). i.e.: ou=My Machines,dc=mydomain,dc=local'))
# Inherits base "onLogout"
onLogout = WindowsOsManager.onLogout
idle = WindowsOsManager.idle
@ -62,10 +62,10 @@ class WinDomainOsManager(WindowsOsManager):
self._account = ""
self._password = ""
# self._ou = self._ou.replace(' ', '')
# self._ou = self._ou.replace(' ', ''), do not remove spaces
if self._domain != '' and self._ou != '':
lpath = 'dc=' + ',dc='.join(self._domain.split('.')).lower()
if self._ou.replace(' ', '').lower().find(lpath) == -1:
lpath = 'dc=' + ',dc='.join((s.lower() for s in self._domain.split('.')))
if self._ou.lower().find(lpath) == -1:
self._ou += ',' + lpath
def __getLdapError(self, e):

View File

@ -106,6 +106,9 @@ class BaseSpiceTransport(Transport):
logger.debug('Connection data: {}'.format(con))
if con is None:
return False
port, secure_port = con['port'], con['secure_port']
port = -1 if port is None else port
secure_port = -1 if secure_port is None else secure_port