whoami fix

recent changes to the scope mechanism weren't propigated to the whoami call
This commit is contained in:
Adam Young 2010-11-24 16:36:36 -05:00
parent 091099480f
commit 16b935169c

View File

@ -253,8 +253,9 @@ class user_find(LDAPSearch):
)
def pre_callback(self, ldap, filter, attrs_list, base_dn, scope, *keys, **options):
if options.get('whoami'):
return "(&(objectclass=posixaccount)(krbprincipalname=%s))"%\
getattr(context, 'principal')
return ("(&(objectclass=posixaccount)(krbprincipalname=%s))"%\
getattr(context, 'principal'), base_dn, scope)
return (filter, base_dn, scope)
def post_callback(self, ldap, entries, truncated, *args, **options):