summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async_initgroups_ad.c
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2014-08-01 12:11:54 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-08-09 11:57:47 +0200
commit983983dd1629ab33eab340a40d9ee83965a339c6 (patch)
treeebb004f628cbe8e32d47c8ec2b96257bb7f137d8 /src/providers/ldap/sdap_async_initgroups_ad.c
parent6e51d44a65b15c2f0491b0a8b452caac0bc00584 (diff)
downloadsssd-983983dd1629ab33eab340a40d9ee83965a339c6.tar.gz
sssd-983983dd1629ab33eab340a40d9ee83965a339c6.tar.xz
sssd-983983dd1629ab33eab340a40d9ee83965a339c6.zip
ad initgroups: continue if resolved SID is still missing
https://fedorahosted.org/sssd/ticket/2389 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/providers/ldap/sdap_async_initgroups_ad.c')
-rw-r--r--src/providers/ldap/sdap_async_initgroups_ad.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/providers/ldap/sdap_async_initgroups_ad.c b/src/providers/ldap/sdap_async_initgroups_ad.c
index 425c0245c..08e012d0f 100644
--- a/src/providers/ldap/sdap_async_initgroups_ad.c
+++ b/src/providers/ldap/sdap_async_initgroups_ad.c
@@ -1215,13 +1215,20 @@ sdap_ad_tokengroups_update_posix_members(TALLOC_CTX *mem_ctx,
goto done;
}
num_valid_groups++;
- } else if (ret == ENOENT && _missing != NULL) {
- /* we need to download this group */
- missing_sids[num_missing_sids] = talloc_steal(missing_sids, sid);
- num_missing_sids++;
+ } else if (ret == ENOENT) {
+ if (_missing != NULL) {
+ /* we need to download this group */
+ missing_sids[num_missing_sids] = talloc_steal(missing_sids,
+ sid);
+ num_missing_sids++;
+
+ DEBUG(SSSDBG_TRACE_FUNC, "Missing SID %s will be downloaded\n",
+ sid);
+ }
- DEBUG(SSSDBG_TRACE_FUNC, "Missing SID %s will be downloaded\n",
- sid);
+ /* else: We have downloaded missing groups but some of them may
+ * remained missing because they are outside of search base. We
+ * will just ignore them and continue with the next group. */
} else {
DEBUG(SSSDBG_MINOR_FAILURE, "Could not look up SID %s in sysdb: "
"[%s]\n", sid, strerror(ret));