summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2013-02-11 10:19:53 +0100
committerRob Crittenden <rcritten@redhat.com>2013-02-19 16:56:55 -0500
commit9c50d6dbfc8c3080201583ac9dedd07139b247c0 (patch)
tree0a3dfbc2086534ea1cf95b1ee3027ba445091c36 /tests/test_xmlrpc
parente5ab5ebb79785262606821452f04e5c019d40c02 (diff)
downloadfreeipa.git-9c50d6dbfc8c3080201583ac9dedd07139b247c0.tar.gz
freeipa.git-9c50d6dbfc8c3080201583ac9dedd07139b247c0.tar.xz
freeipa.git-9c50d6dbfc8c3080201583ac9dedd07139b247c0.zip
Prevent changing protected group's name using --setattr
The name of any protected group now cannot be changed by modifing the cn attribute using --setattr. Unit tests have been added to make sure there is no regression. https://fedorahosted.org/freeipa/ticket/3354
Diffstat (limited to 'tests/test_xmlrpc')
-rw-r--r--tests/test_xmlrpc/test_group_plugin.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_group_plugin.py b/tests/test_xmlrpc/test_group_plugin.py
index a74a5e4c..2d6d2014 100644
--- a/tests/test_xmlrpc/test_group_plugin.py
+++ b/tests/test_xmlrpc/test_group_plugin.py
@@ -879,6 +879,13 @@ class test_group(Declarative):
),
dict(
+ desc='Try to rename the admins group via setattr',
+ command=('group_mod', [u'admins'], {'setattr': u'cn=loosers'}),
+ expected=errors.ProtectedEntryError(label=u'group',
+ key='admins', reason='Cannot be renamed'),
+ ),
+
+ dict(
desc='Try to modify the admins group to support external membership',
command=('group_mod', [u'admins'], dict(external=True)),
expected=errors.ProtectedEntryError(label=u'group',
@@ -900,6 +907,14 @@ class test_group(Declarative):
),
dict(
+ desc='Try to rename the trust admins group via setattr',
+ command=('group_mod', [u'trust admins'], {'setattr': u'cn=loosers'}),
+ expected=errors.ProtectedEntryError(label=u'group',
+ key='trust admins', reason='Cannot be renamed'),
+ ),
+
+
+ dict(
desc='Try to modify the trust admins group to support external membership',
command=('group_mod', [u'trust admins'], dict(external=True)),
expected=errors.ProtectedEntryError(label=u'group',