diff options
author | Rob Crittenden <rcritten@redhat.com> | 2012-02-24 14:39:56 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2012-02-27 00:06:44 -0500 |
commit | 7d7322de2eb0de61ea917d03662452d3efa4c834 (patch) | |
tree | b553e8fa4180f59db38ea3b01fcbd73bba0f09b7 /ipalib/plugins/hostgroup.py | |
parent | a09063cbb83aa9c3c77886fe43d70ba15fe4ef48 (diff) | |
download | freeipa-7d7322de2eb0de61ea917d03662452d3efa4c834.tar.gz freeipa-7d7322de2eb0de61ea917d03662452d3efa4c834.tar.xz freeipa-7d7322de2eb0de61ea917d03662452d3efa4c834.zip |
Limit allowed characters in a netgroup name to alpha, digit, -, _ and .
Apply this to hostgroup names as well since they can be linked.
https://fedorahosted.org/freeipa/ticket/2221
Diffstat (limited to 'ipalib/plugins/hostgroup.py')
-rw-r--r-- | ipalib/plugins/hostgroup.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ipalib/plugins/hostgroup.py b/ipalib/plugins/hostgroup.py index 28e3ef5dd..2a9a0a533 100644 --- a/ipalib/plugins/hostgroup.py +++ b/ipalib/plugins/hostgroup.py @@ -20,6 +20,7 @@ from ipalib.plugins.baseldap import * from ipalib import api, Int, _, ngettext, errors +from ipalib.plugins.netgroup import NETGROUP_PATTERN, NETGROUP_PATTERN_ERRMSG from ipalib.dn import DN __doc__ = _(""" @@ -76,6 +77,8 @@ class hostgroup(LDAPObject): takes_params = ( Str('cn', + pattern=NETGROUP_PATTERN, + pattern_errmsg=NETGROUP_PATTERN_ERRMSG, cli_name='hostgroup_name', label=_('Host-group'), doc=_('Name of host-group'), |