Blame SOURCES/0181-LDAP_ID_CLEANUP-Use-sysdb_search_-_by_timestamp.patch

ecf709
From b96c69f0ab0ecd55b734c167763c3bfe2357c448 Mon Sep 17 00:00:00 2001
ecf709
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
ecf709
Date: Wed, 7 Jun 2017 15:17:15 +0200
ecf709
Subject: [PATCH 181/181] LDAP_ID_CLEANUP: Use sysdb_search_*_by_timestamp()
ecf709
MIME-Version: 1.0
ecf709
Content-Type: text/plain; charset=UTF-8
ecf709
Content-Transfer-Encoding: 8bit
ecf709
ecf709
Use the appropriate methods for searching users and groups bv timestamp.
ecf709
ecf709
Resolves:
ecf709
https://pagure.io/SSSD/sssd/issue/3369
ecf709
ecf709
Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com>
ecf709
ecf709
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
ecf709
(cherry picked from commit 05e579691b51ac2f81ab0c828ff6fe57bd86a8b6)
ecf709
---
ecf709
 src/providers/ldap/ldap_id_cleanup.c | 6 ++++--
ecf709
 1 file changed, 4 insertions(+), 2 deletions(-)
ecf709
ecf709
diff --git a/src/providers/ldap/ldap_id_cleanup.c b/src/providers/ldap/ldap_id_cleanup.c
ecf709
index cde2ad81873d46edd5e05c4a701ea1742a012bd0..c85ce45918cf938a95ff85c31bfe0541f9ddd052 100644
ecf709
--- a/src/providers/ldap/ldap_id_cleanup.c
ecf709
+++ b/src/providers/ldap/ldap_id_cleanup.c
ecf709
@@ -219,7 +219,8 @@ static int cleanup_users(struct sdap_options *opts,
ecf709
         goto done;
ecf709
     }
ecf709
 
ecf709
-    ret = sysdb_search_users(tmpctx, dom, subfilter, attrs, &count, &msgs);
ecf709
+    ret = sysdb_search_users_by_timestamp(tmpctx, dom, subfilter, attrs,
ecf709
+                                          &count, &msgs);
ecf709
     if (ret == ENOENT) {
ecf709
         count = 0;
ecf709
     } else if (ret != EOK) {
ecf709
@@ -394,7 +395,8 @@ static int cleanup_groups(TALLOC_CTX *memctx,
ecf709
         goto done;
ecf709
     }
ecf709
 
ecf709
-    ret = sysdb_search_groups(tmpctx, domain, subfilter, attrs, &count, &msgs);
ecf709
+    ret = sysdb_search_groups_by_timestamp(tmpctx, domain, subfilter, attrs,
ecf709
+                                           &count, &msgs);
ecf709
     if (ret == ENOENT) {
ecf709
         count = 0;
ecf709
     } else if (ret != EOK) {
ecf709
-- 
ecf709
2.9.4
ecf709