The admins group cannot be renamed.

433880
This commit is contained in:
Rob Crittenden 2008-02-27 10:50:17 -05:00
parent f02b5c1962
commit f49ed705b3
2 changed files with 8 additions and 0 deletions

View File

@ -148,6 +148,11 @@ INPUT_NOT_DNS_A_RECORD = gen_error_code(
0x0003,
"The requested hostname is not a DNS A record. This is required by Kerberos.")
INPUT_ADMINS_IMMUTABLE = gen_error_code(
INPUT_CATEGORY,
0x0004,
"The admins group cannot be renamed.")
#
# Connection errors
#

View File

@ -1518,6 +1518,9 @@ class IPAServer:
if isinstance(newcn, str):
newcn = [newcn]
if "admins" in oldcn:
raise ipaerror.gen_exception(ipaerror.INPUT_ADMINS_IMMUTABLE)
oldcn.sort()
newcn.sort()
if oldcn != newcn: