diff options
author | Petr Viktorin <pviktori@redhat.com> | 2013-01-08 04:10:35 -0500 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-03-11 17:07:07 +0100 |
commit | 91606e6679f3a18b1c1789efd240eed982a563d4 (patch) | |
tree | a002e8fbc837058f6c1d9178cbefadcd03b7d6f2 /ipalib/plugins/group.py | |
parent | 8d432353cc1e66b235e928650764f879c24d19f7 (diff) | |
download | freeipa-91606e6679f3a18b1c1789efd240eed982a563d4.tar.gz freeipa-91606e6679f3a18b1c1789efd240eed982a563d4.tar.xz freeipa-91606e6679f3a18b1c1789efd240eed982a563d4.zip |
Change DNA magic value to -1 to make UID 999 usable
Change user-add's uid & gid parameters from autofill to optional.
Change the DNA magic value to -1.
For old clients, which will still send 999 when they want DNA
assignment, translate the 999 to -1. This is done via a new
capability, optional_uid_params.
Tests included
https://fedorahosted.org/freeipa/ticket/2886
Diffstat (limited to 'ipalib/plugins/group.py')
-rw-r--r-- | ipalib/plugins/group.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ipalib/plugins/group.py b/ipalib/plugins/group.py index 19b127e16..bde002a8d 100644 --- a/ipalib/plugins/group.py +++ b/ipalib/plugins/group.py @@ -21,6 +21,7 @@ from ipalib import api from ipalib import Int, Str from ipalib.plugins.baseldap import * +from ipalib.plugins import baseldap from ipalib import _, ngettext if api.env.in_server and api.env.context in ['lite', 'server']: try: @@ -202,7 +203,7 @@ class group_add(LDAPCreate): elif not options['nonposix']: entry_attrs['objectclass'].append('posixgroup') if not 'gidnumber' in options: - entry_attrs['gidnumber'] = 999 + entry_attrs['gidnumber'] = baseldap.DNA_MAGIC return dn @@ -281,7 +282,7 @@ class group_mod(LDAPUpdate): old_entry_attrs['objectclass'].append('posixgroup') entry_attrs['objectclass'] = old_entry_attrs['objectclass'] if not 'gidnumber' in options: - entry_attrs['gidnumber'] = 999 + entry_attrs['gidnumber'] = baseldap.DNA_MAGIC if options['external']: if is_protected_group: |