Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# 2. Site (does not apply)
# 3. Domain
# 4. OUs from top to bottom
import ldap, ldap.sasl, re, os.path
import re, os.path
import xml.etree.ElementTree as ElementTree
from linuxmusterLinuxclient7 import logging, constants, config, user, ldapHelper, shares, computer, printers

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ldap, ldap.sasl, sys, getpass, subprocess
import sys, getpass, subprocess
from linuxmusterLinuxclient7 import logging, constants, config, user, computer

_currentLdapConnection = None
Expand Down Expand Up @@ -55,6 +55,7 @@ def searchOne(filter):
:return: Tuple (success, ldap object as dict)
:rtype: tuple
"""
import ldap
if conn() == None:
logging.error("Cannot talk to LDAP")
return False, None
Expand Down Expand Up @@ -129,6 +130,7 @@ def _connect():
return True

try:
import ldap.sasl
sasl_auth = ldap.sasl.sasl({} ,'GSSAPI')
_currentLdapConnection = ldap.initialize(serverUrl(), trace_level=0)
# TODO:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ldap, ldap.sasl, sys, getpass, subprocess, pwd, os, os.path
import sys, getpass, subprocess, pwd, os, os.path
from pathlib import Path
from linuxmusterLinuxclient7 import logging, constants, config, user, ldapHelper, shares, fileHelper, computer, localUserHelper

Expand Down
Loading