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

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