Blame SOURCES/0198-SDAP-Do-not-set-gid-0-twice.patch

e543c9
From 63209a5d62f2ef1a184b5d1799a27bab8278f43a Mon Sep 17 00:00:00 2001
e543c9
From: Lukas Slebodnik <lslebodn@redhat.com>
e543c9
Date: Fri, 10 Apr 2015 14:33:35 +0200
e543c9
Subject: [PATCH 198/200] SDAP: Do not set gid 0 twice
e543c9
e543c9
The gid o was added to sysdb attrs directly in sdap_save_group for 1st time
e543c9
and for second time in the function sdap_store_group_with_gid,
e543c9
which was called every time from function sdap_save_group
e543c9
e543c9
[sysdb_set_entry_attr] (0x0080): ldb_modify failed:
e543c9
    [Attribute or value exists](20)[attribute 'gidNumber': value #1
e543c9
    on 'name=domainlocalgroup1_dom2-493341@sssdad_tree.com,cn=groups,cn=sssdad_tree.com,cn=sysdb' provided more than once]
e543c9
[sysdb_set_entry_attr] (0x0040): Error: 17 (File exists)
e543c9
[sysdb_store_group] (0x1000): sysdb_set_group_attr failed.
e543c9
[sysdb_store_group] (0x0400): Error: 17 (File exists)
e543c9
[sdap_store_group_with_gid] (0x0040):
e543c9
    Could not store group domainlocalgroup1_dom2-493341@sssdad_tree.com
e543c9
[sdap_save_group] (0x0080): Could not store group with GID: [File exists]
e543c9
[sdap_save_group] (0x0080):
e543c9
    Failed to save group [domainlocalgroup1_dom2-493341@sssdad_tree.com]: [File exists]
e543c9
[sdap_save_groups] (0x0040): Failed to store group 0. Ignoring.
e543c9
e543c9
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
e543c9
(cherry picked from commit 5d864e7a9d0e1e6fb7dd8158c5b8bfb71040b908)
e543c9
---
e543c9
 src/providers/ldap/sdap_async_groups.c | 7 -------
e543c9
 1 file changed, 7 deletions(-)
e543c9
e543c9
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
e543c9
index 818f30b95d4a4707c32d16b9866b008d89141e4d..4be8c502ea77a3913ddac2a24fbacbc522b2ef6b 100644
e543c9
--- a/src/providers/ldap/sdap_async_groups.c
e543c9
+++ b/src/providers/ldap/sdap_async_groups.c
e543c9
@@ -608,13 +608,6 @@ static int sdap_save_group(TALLOC_CTX *memctx,
e543c9
             gid = 0;
e543c9
             DEBUG(SSSDBG_TRACE_FUNC, "Filtering AD group [%s].\n",
e543c9
                                       group_name);
e543c9
-            ret = sysdb_attrs_add_uint32(group_attrs,
e543c9
-                                         opts->group_map[SDAP_AT_GROUP_GID].sys_name, 0);
e543c9
-            if (ret != EOK) {
e543c9
-                DEBUG(SSSDBG_CRIT_FAILURE,
e543c9
-                      "Failed to add a GID to non-posix group!\n");
e543c9
-                return ret;
e543c9
-            }
e543c9
             ret = sysdb_attrs_add_bool(group_attrs, SYSDB_POSIX, false);
e543c9
             if (ret != EOK) {
e543c9
                 DEBUG(SSSDBG_OP_FAILURE,
e543c9
-- 
e543c9
2.1.0
e543c9