Blame SOURCES/0078-Fix-uuid-defaults.patch

905b4d
From 2d9a33aaa3ecae4af7fb64c64fc2ada176b26a02 Mon Sep 17 00:00:00 2001
905b4d
From: Sumit Bose <sbose@redhat.com>
905b4d
Date: Wed, 5 Nov 2014 18:01:07 +0100
905b4d
Subject: [PATCH 78/79] Fix uuid defaults
905b4d
MIME-Version: 1.0
905b4d
Content-Type: text/plain; charset=UTF-8
905b4d
Content-Transfer-Encoding: 8bit
905b4d
905b4d
Recently the uuid attributes for user and groups were removed because
905b4d
it was found that there are not used at all and that some of them where
905b4d
causing issues (https://fedorahosted.org/sssd/ticket/2383).
905b4d
905b4d
The new views/overrides feature of FreeIPA uses the ipaUniqueID attribute
905b4d
to relate overrides with the original IPA objects. The previous two
905b4d
patches revert the removal of the uuid attributes from users and groups
905b4d
with this patch set the default value of these attributes to
905b4d
ipaUniqueID from the IPA provider, to objectGUID for the AD provider and
905b4d
leaves them unset for the general LDAP case to avoid issues like the one
905b4d
from ticket #2383.
905b4d
905b4d
Related to https://fedorahosted.org/sssd/ticket/2481
905b4d
905b4d
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
905b4d
---
905b4d
 src/man/sssd-ldap.5.xml        | 6 ++++--
905b4d
 src/providers/ipa/ipa_opts.h   | 4 ++--
905b4d
 src/providers/ldap/ldap_opts.h | 6 ++----
905b4d
 3 files changed, 8 insertions(+), 8 deletions(-)
905b4d
905b4d
diff --git a/src/man/sssd-ldap.5.xml b/src/man/sssd-ldap.5.xml
905b4d
index f45522bd5f6c599bce7a38d8821cb0a08f6b5df3..dad6f27933ced506fed7cd040e9fe91968295632 100644
905b4d
--- a/src/man/sssd-ldap.5.xml
905b4d
+++ b/src/man/sssd-ldap.5.xml
905b4d
@@ -345,7 +345,8 @@
905b4d
                             an LDAP user object.
905b4d
                         </para>
905b4d
                         <para>
905b4d
-                            Default: nsUniqueId
905b4d
+                            Default: not set in the general case, objectGUID for
905b4d
+                            AD and ipaUniqueID for IPA
905b4d
                         </para>
905b4d
                     </listitem>
905b4d
                 </varlistentry>
905b4d
@@ -866,7 +867,8 @@
905b4d
                             an LDAP group object.
905b4d
                         </para>
905b4d
                         <para>
905b4d
-                            Default: nsUniqueId
905b4d
+                            Default: not set in the general case, objectGUID for
905b4d
+                            AD and ipaUniqueID for IPA
905b4d
                         </para>
905b4d
                     </listitem>
905b4d
                 </varlistentry>
905b4d
diff --git a/src/providers/ipa/ipa_opts.h b/src/providers/ipa/ipa_opts.h
905b4d
index e0478db39913b87c071d8f4daf9c2a0b33a0b0f4..59282e8699091fbccf08ddfc6825034d4f81a87f 100644
905b4d
--- a/src/providers/ipa/ipa_opts.h
905b4d
+++ b/src/providers/ipa/ipa_opts.h
905b4d
@@ -178,7 +178,7 @@ struct sdap_attr_map ipa_user_map[] = {
905b4d
     { "ldap_user_principal", "krbPrincipalName", SYSDB_UPN, NULL },
905b4d
     { "ldap_user_fullname", "cn", SYSDB_FULLNAME, NULL },
905b4d
     { "ldap_user_member_of", "memberOf", SYSDB_MEMBEROF, NULL },
905b4d
-    { "ldap_user_uuid", "nsUniqueId", SYSDB_UUID, NULL },
905b4d
+    { "ldap_user_uuid", "ipaUniqueID", SYSDB_UUID, NULL },
905b4d
     { "ldap_user_objectsid", "ipaNTSecurityIdentifier", SYSDB_SID_STR, NULL },
905b4d
     { "ldap_user_primary_group", NULL, SYSDB_PRIMARY_GROUP, NULL },
905b4d
     { "ldap_user_modify_timestamp", "modifyTimestamp", SYSDB_ORIG_MODSTAMP, NULL },
905b4d
@@ -212,7 +212,7 @@ struct sdap_attr_map ipa_group_map[] = {
905b4d
     { "ldap_group_pwd", "userPassword", SYSDB_PWD, NULL },
905b4d
     { "ldap_group_gid_number", "gidNumber", SYSDB_GIDNUM, NULL },
905b4d
     { "ldap_group_member", "member", SYSDB_MEMBER, NULL },
905b4d
-    { "ldap_group_uuid", "nsUniqueId", SYSDB_UUID, NULL },
905b4d
+    { "ldap_group_uuid", "ipaUniqueID", SYSDB_UUID, NULL },
905b4d
     { "ldap_group_objectsid", "ipaNTSecurityIdentifier", SYSDB_SID_STR, NULL },
905b4d
     { "ldap_group_modify_timestamp", "modifyTimestamp", SYSDB_ORIG_MODSTAMP, NULL },
905b4d
     { "ldap_group_entry_usn", NULL, SYSDB_USN, NULL },
905b4d
diff --git a/src/providers/ldap/ldap_opts.h b/src/providers/ldap/ldap_opts.h
905b4d
index 096a63bd53918ba79378c01257a18e543597209a..29d9faf99784bfc3526398488be837a2716ee11d 100644
905b4d
--- a/src/providers/ldap/ldap_opts.h
905b4d
+++ b/src/providers/ldap/ldap_opts.h
905b4d
@@ -209,8 +209,7 @@ struct sdap_attr_map rfc2307bis_user_map[] = {
905b4d
     { "ldap_user_principal", "krbPrincipalName", SYSDB_UPN, NULL },
905b4d
     { "ldap_user_fullname", "cn", SYSDB_FULLNAME, NULL },
905b4d
     { "ldap_user_member_of", "memberOf", SYSDB_MEMBEROF, NULL },
905b4d
-    /* FIXME: this is 389ds specific */
905b4d
-    { "ldap_user_uuid", "nsUniqueId", SYSDB_UUID, NULL },
905b4d
+    { "ldap_user_uuid", NULL, SYSDB_UUID, NULL },
905b4d
     { "ldap_user_objectsid", "objectSID", SYSDB_SID, NULL },
905b4d
     { "ldap_user_primary_group", NULL, SYSDB_PRIMARY_GROUP, NULL },
905b4d
     { "ldap_user_modify_timestamp", "modifyTimestamp", SYSDB_ORIG_MODSTAMP, NULL },
905b4d
@@ -244,8 +243,7 @@ struct sdap_attr_map rfc2307bis_group_map[] = {
905b4d
     { "ldap_group_pwd", "userPassword", SYSDB_PWD, NULL },
905b4d
     { "ldap_group_gid_number", "gidNumber", SYSDB_GIDNUM, NULL },
905b4d
     { "ldap_group_member", "member", SYSDB_MEMBER, NULL },
905b4d
-    /* FIXME: this is 389ds specific */
905b4d
-    { "ldap_group_uuid", "nsUniqueId", SYSDB_UUID, NULL },
905b4d
+    { "ldap_group_uuid", NULL, SYSDB_UUID, NULL },
905b4d
     { "ldap_group_objectsid", "objectSID", SYSDB_SID, NULL },
905b4d
     { "ldap_group_modify_timestamp", "modifyTimestamp", SYSDB_ORIG_MODSTAMP, NULL },
905b4d
     { "ldap_group_entry_usn", NULL, SYSDB_USN, NULL },
905b4d
-- 
905b4d
1.9.3
905b4d