summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorJr Aquino <jr.aquino@citrix.com>2010-11-02 09:00:40 -0700
committerRob Crittenden <rcritten@redhat.com>2010-11-03 10:23:40 -0400
commitc99fda0d1e880a444a1b3f92465fdf11539a8154 (patch)
tree4c6c1a1909dc7e1950997c207992af9e8af997e9 /ipalib
parent813dfe501348a671eeb3655cc7406c8e37a3860c (diff)
downloadfreeipa-c99fda0d1e880a444a1b3f92465fdf11539a8154.tar.gz
freeipa-c99fda0d1e880a444a1b3f92465fdf11539a8154.tar.xz
freeipa-c99fda0d1e880a444a1b3f92465fdf11539a8154.zip
Added fixes to adjust for sudocmd attribute for sudocmds. Added fix for sudorule to allow for cmdCategory all Added fixes for xmlrpc tests to reflect sudocmd changes.
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugins/sudocmd.py9
-rw-r--r--ipalib/plugins/sudorule.py6
2 files changed, 10 insertions, 5 deletions
diff --git a/ipalib/plugins/sudocmd.py b/ipalib/plugins/sudocmd.py
index a7ccd325d..1fef17217 100644
--- a/ipalib/plugins/sudocmd.py
+++ b/ipalib/plugins/sudocmd.py
@@ -51,20 +51,19 @@ class sudocmd(LDAPObject):
object_class = ['ipaobject', 'ipasudocmd']
# object_class_config = 'ipahostobjectclasses'
search_attributes = [
- 'cn', 'description',
+ 'sudocmd', 'description',
]
default_attributes = [
- 'cn', 'description',
+ 'sudocmd', 'description',
]
uuid_attribute = 'ipauniqueid'
label = _('SudoCmds')
takes_params = (
- Str('cn',
+ Str('sudocmd',
cli_name='command',
label=_('Sudo Command'),
primary_key=True,
- #normalizer=lambda value: value.lower(),
),
Str('description?',
cli_name='desc',
@@ -82,7 +81,7 @@ class sudocmd(LDAPObject):
except errors.NotFound:
try:
(dn, entry_attrs) = self.backend.find_entry_by_attr(
- 'cn', keys[-1], self.object_class, [''],
+ 'sudocmd', keys[-1], self.object_class, [''],
self.container_dn
)
except errors.NotFound:
diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py
index 0bdf982e2..df0ae5c4d 100644
--- a/ipalib/plugins/sudorule.py
+++ b/ipalib/plugins/sudorule.py
@@ -58,6 +58,12 @@ class sudorule(LDAPObject):
cli_name='desc',
label=_('Description'),
),
+ StrEnum('cmdcategory?',
+ cli_name='cmdcat',
+ label=_('Command category'),
+ doc=_('Command category the rule applies to'),
+ values=(u'all', ),
+ ),
Str('memberuser_user?',
label=_('Users'),
flags=['no_create', 'no_update', 'no_search'],