From 100f13d95b51ab5b8a2a4b7dfb04c5f3b58015d4 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Tue, 25 Jun 2013 12:58:37 +0000 Subject: Use LDAP search instead of *group_show to check if a group exists. https://fedorahosted.org/freeipa/ticket/3706 --- ipalib/plugins/netgroup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipalib/plugins/netgroup.py') diff --git a/ipalib/plugins/netgroup.py b/ipalib/plugins/netgroup.py index a2cf442d8..84bc74981 100644 --- a/ipalib/plugins/netgroup.py +++ b/ipalib/plugins/netgroup.py @@ -179,7 +179,7 @@ class netgroup_add(LDAPCreate): # when enabled, a managed netgroup is created for every hostgroup # make sure that we don't create a collision if the plugin is # (temporarily) disabled - netgroup = api.Command['hostgroup_show'](keys[-1]) + api.Object['hostgroup'].get_dn_if_exists(keys[-1]) raise errors.DuplicateEntry(message=unicode(self.msg_collision % keys[-1])) except errors.NotFound: pass -- cgit