URL: https://github.com/freeipa/freeipa/pull/761
Author: felipevolpone
 Title: #761: Fixing adding authenticator indicators to host
Action: opened

PR body:
"""
The check for krbprincipalaux in the entries is now made case-insensitively.

https://pagure.io/freeipa/issue/6911
https://bugzilla.redhat.com/show_bug.cgi?id=1441593#c2
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/761/head:pr761
git checkout pr761
From 8f3fae380f7df959eb2bfbc38b26966cfd0e8a21 Mon Sep 17 00:00:00 2001
From: felipe barreto <fbarreto@localhost.localdomain>
Date: Wed, 3 May 2017 14:25:05 -0300
Subject: [PATCH] Fixing adding authenticator indicators to host

The check for krbprincipalaux in the entries is now made
case-insensitively.

https://pagure.io/freeipa/issue/6911
---
 ipaserver/plugins/host.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ipaserver/plugins/host.py b/ipaserver/plugins/host.py
index dcadd54..cff0674 100644
--- a/ipaserver/plugins/host.py
+++ b/ipaserver/plugins/host.py
@@ -884,7 +884,8 @@ def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options):
                 msg = 'Principal name already set, it is unchangeable.'
                 raise errors.ACIError(info=msg)
             obj_classes = entry_attrs_old['objectclass']
-            if 'krbprincipalaux' not in obj_classes:
+            if 'krbprincipalaux' not in set(item.lower() for item in          
+                                            entry_attrs['objectclass']):
                 obj_classes.append('krbprincipalaux')
                 entry_attrs['objectclass'] = obj_classes
 
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to