diff options
author | Rob Crittenden <rcritten@redhat.com> | 2012-08-28 17:14:28 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-08-29 09:29:08 +0200 |
commit | 785e80c4fc0804812a148977cf42ea1f626ecece (patch) | |
tree | 6b0e478a55f777be5fc97f388f5c61c1998b4630 /tests/test_xmlrpc | |
parent | 5e277a97a6d115d52a840649626ed9537a23ba78 (diff) | |
download | freeipa-785e80c4fc0804812a148977cf42ea1f626ecece.tar.gz freeipa-785e80c4fc0804812a148977cf42ea1f626ecece.tar.xz freeipa-785e80c4fc0804812a148977cf42ea1f626ecece.zip |
Restrict the SELinux user map user MLS value to 0-1023
https://fedorahosted.org/freeipa/ticket/3001
Diffstat (limited to 'tests/test_xmlrpc')
-rw-r--r-- | tests/test_xmlrpc/test_selinuxusermap_plugin.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_selinuxusermap_plugin.py b/tests/test_xmlrpc/test_selinuxusermap_plugin.py index 06ad751ac..b44829413 100644 --- a/tests/test_xmlrpc/test_selinuxusermap_plugin.py +++ b/tests/test_xmlrpc/test_selinuxusermap_plugin.py @@ -644,6 +644,17 @@ class test_selinuxusermap(Declarative): dict( + desc='Create rule with invalid MLS xguest_u:s0:c0.c1028', + command=( + 'selinuxusermap_add', [rule1], dict(ipaselinuxuser=u'xguest_u:s0-s0:c0.c1028') + ), + expected=errors.ValidationError(name='selinuxuser', + error=u'Invalid MCS value, must match c[0-1023].c[0-1023] ' + + u'and/or c[0-1023]-c[0-c0123]'), + ), + + + dict( desc='Create rule with invalid user via setattr', command=( 'selinuxusermap_mod', [rule1], dict(setattr=u'ipaselinuxuser=deny') |