summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-02-23 10:25:22 +0100
committerRob Crittenden <rcritten@redhat.com>2012-02-23 21:00:15 -0500
commit16d88d79ad251e353059d18a4020a96e52ee9363 (patch)
tree1cb16326e8823ab62330fe2d98533a3049f88774 /ipalib
parentb241e828a9b47a6c706a3ac8378fd6e57b8202fb (diff)
downloadfreeipa-16d88d79ad251e353059d18a4020a96e52ee9363.tar.gz
freeipa-16d88d79ad251e353059d18a4020a96e52ee9363.tar.xz
freeipa-16d88d79ad251e353059d18a4020a96e52ee9363.zip
Add gidnumber minvalue
Do not accept invalid GID values in IPA user/group plugins. https://fedorahosted.org/freeipa/ticket/2335
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugins/group.py1
-rw-r--r--ipalib/plugins/user.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/ipalib/plugins/group.py b/ipalib/plugins/group.py
index 49bc82328..b101d1285 100644
--- a/ipalib/plugins/group.py
+++ b/ipalib/plugins/group.py
@@ -119,6 +119,7 @@ class group(LDAPObject):
cli_name='gid',
label=_('GID'),
doc=_('GID (use this option to set it manually)'),
+ minvalue=1,
),
)
diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py
index ad9805bec..d8da3a373 100644
--- a/ipalib/plugins/user.py
+++ b/ipalib/plugins/user.py
@@ -263,6 +263,7 @@ class user(LDAPObject):
Int('gidnumber',
label=_('GID'),
doc=_('Group ID Number'),
+ minvalue=1,
default_from=lambda uidnumber: uidnumber,
autofill=True,
),