Collect memberof information for sudo commands.

We weren't searching the cn=sudo container so all members of a
sudocmdgroup looked indirect.

Add a label for sudo command groups.

Update the tests to include verifying that membership is done
properly.

ticket 1003
This commit is contained in:
Rob Crittenden
2011-02-23 17:10:08 -05:00
committed by Endi S. Dewata
parent 1770750b8a
commit af9f905239
4 changed files with 34 additions and 3 deletions

View File

@@ -1002,6 +1002,14 @@ class ldap2(CrudBackend, Encoder):
except errors.NotFound:
pbacresults = []
results = results + pbacresults
try:
(sudoresults, truncated) = self.find_entries(searchfilter,
attr_list, 'cn=sudo,%s' % api.env.basedn,
time_limit=time_limit, size_limit=size_limit,
normalize=normalize)
except errors.NotFound:
sudoresults = []
results = results + sudoresults
direct = []
indirect = []