diff options
author | Rob Crittenden <rcritten@redhat.com> | 2011-02-23 17:10:08 -0500 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-02-23 18:44:23 -0500 |
commit | af9f9052393697383c79576490127a4426452ba8 (patch) | |
tree | 68ccfa8cb3c50a51eadc5962f3882038f211125c /ipalib | |
parent | 1770750b8adad6d9f2d98c0c9debc54d61f341cf (diff) | |
download | freeipa-af9f9052393697383c79576490127a4426452ba8.tar.gz freeipa-af9f9052393697383c79576490127a4426452ba8.tar.xz freeipa-af9f9052393697383c79576490127a4426452ba8.zip |
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
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/plugins/baseldap.py | 3 | ||||
-rw-r--r-- | ipalib/plugins/sudocmd.py | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py index 3cb72d7b..0581ea3a 100644 --- a/ipalib/plugins/baseldap.py +++ b/ipalib/plugins/baseldap.py @@ -65,6 +65,9 @@ global_output_params = ( Str('memberof_role?', label=_('Roles'), ), + Str('memberof_sudocmdgroup?', + label=_('Sudo Command Groups'), + ), Str('member_privilege?', label='Granted to Privilege', ), diff --git a/ipalib/plugins/sudocmd.py b/ipalib/plugins/sudocmd.py index 50da7225..528d7907 100644 --- a/ipalib/plugins/sudocmd.py +++ b/ipalib/plugins/sudocmd.py @@ -55,8 +55,11 @@ class sudocmd(LDAPObject): 'sudocmd', 'description', ] default_attributes = [ - 'sudocmd', 'description', + 'sudocmd', 'description', 'memberof', ] + attribute_members = { + 'memberof': ['sudocmdgroup'], + } uuid_attribute = 'ipauniqueid' label = _('SUDO Commands') |