summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipalib/plugins/host.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py
index 300f4b8b3..73bad5f88 100644
--- a/ipalib/plugins/host.py
+++ b/ipalib/plugins/host.py
@@ -533,6 +533,8 @@ class host_mod(LDAPUpdate):
def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options):
# Once a principal name is set it cannot be changed
+ if 'cn' in entry_attrs:
+ raise errors.ACIError(info='cn is immutable')
if 'locality' in entry_attrs:
entry_attrs['l'] = entry_attrs['locality']
del entry_attrs['locality']