View | Details | Raw Unified | Return to bug 42310 | Differences between
and this patch

Collapse All | Expand All

(-)a/management/univention-management-console/src/univention/management/console/auth.py (-2 / +2 lines)
 Lines 42-49    Link Here 
42
import notifier.signals as signals
42
import notifier.signals as signals
43
import notifier.threads as threads
43
import notifier.threads as threads
44
44
45
from univention.uldap import getMachineConnection
46
from univention.management.console.log import AUTH
45
from univention.management.console.log import AUTH
46
from univention.management.console.ldap import get_machine_connection
47
from univention.management.console.pam import PamAuth, AuthenticationError, AuthenticationFailed, AuthenticationInformationMissing, PasswordExpired, AccountExpired, PasswordChangeFailed
47
from univention.management.console.pam import PamAuth, AuthenticationError, AuthenticationFailed, AuthenticationInformationMissing, PasswordExpired, AccountExpired, PasswordChangeFailed
48
48
49
49
 Lines 127-133   def __authenticate_thread(self, username, password, new_password, **custom_promp Link Here 
127
127
128
	def __canonicalize_username(self, username):
128
	def __canonicalize_username(self, username):
129
		try:
129
		try:
130
			lo = getMachineConnection()
130
			lo, po = get_machine_connection(write=False)
131
			attr = 'mailPrimaryAddress' if '@' in username else 'uid'
131
			attr = 'mailPrimaryAddress' if '@' in username else 'uid'
132
			result = lo.search('%s=%s' % (attr, escape_filter_chars(username)), attr=['uid'], unique=True)
132
			result = lo.search('%s=%s' % (attr, escape_filter_chars(username)), attr=['uid'], unique=True)
133
			if result and result[0][1].get('uid'):
133
			if result and result[0][1].get('uid'):

Return to bug 42310