Pushed under the 1 liner rule
From 16b935169c556135dcab2908d102a884f803fda4 Mon Sep 17 00:00:00 2001
From: Adam Young <ayo...@redhat.com>
Date: Wed, 24 Nov 2010 16:36:36 -0500
Subject: [PATCH] whoami fix

recent changes to the scope mechanism weren't propigated to the whoami call
---
 ipalib/plugins/user.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py
index 5b6e03b66805de807f4b6007a41f732db7a3c8bc..64120fd2bcc6cad49785402730858d0a3294cb42 100644
--- a/ipalib/plugins/user.py
+++ b/ipalib/plugins/user.py
@@ -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):
-- 
1.7.2.3

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to