forked from shaba/openuds
Fixed for machine deletion on ou change
This commit is contained in:
parent
6db1fdb86d
commit
0648a27daf
@ -141,10 +141,10 @@ class WinDomainOsManager(WindowsOsManager):
|
||||
return res[0][0] # Returns the DN
|
||||
|
||||
def __getMachine(self, l, machineName):
|
||||
if self._ou:
|
||||
ou = self._ou
|
||||
else:
|
||||
ou = ','.join(['DC=' + i for i in self._domain.split('.')])
|
||||
# if self._ou:
|
||||
# ou = self._ou
|
||||
# else:
|
||||
ou = ','.join(['DC=' + i for i in self._domain.split('.')])
|
||||
|
||||
fltr = '(&(objectClass=computer)(sAMAccountName={}$))'.format(machineName)
|
||||
res = l.search_ext_s(base=ou, scope=ldap.SCOPE_SUBTREE, filterstr=fltr, attrlist=[b'dn'])
|
||||
@ -248,7 +248,6 @@ class WinDomainOsManager(WindowsOsManager):
|
||||
if self.__getGroup(l) is None:
|
||||
return _('Check Error: group "{}" not found (using "cn" to locate it)').format(self._group)
|
||||
|
||||
|
||||
return _('Server check was successful')
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user