From d2637ddddc73f66f8ad874a511b4880884d36950 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Sep 10 2013 20:05:28 +0000 Subject: Ticket 47507 - automember rebuild task not working as expected Bug Description: If the basedn specified in the task is not beneath the automember scope, the entry is skipped. Example: automember scope: ou=people,dc=example,dc=com task basedn: dc=example,dc=com --> using this dn will cause all the candidate entries to be skipped. Fix Description: Regardless what the task basedn is, the candidate entry dn needs to be checked against the scope of the autommeber config. https://fedorahosted.org/389/ticket/47507 Revewied by: nhosoi(Thanks!!) --- diff --git a/ldap/servers/plugins/automember/automember.c b/ldap/servers/plugins/automember/automember.c index 2ba3314..02dcc0d 100644 --- a/ldap/servers/plugins/automember/automember.c +++ b/ldap/servers/plugins/automember/automember.c @@ -2192,7 +2192,7 @@ void automember_rebuild_task_thread(void *arg){ while (list != g_automember_config) { config = (struct configEntry *)list; /* Does the entry meet scope and filter requirements? */ - if (slapi_dn_issuffix(slapi_sdn_get_dn(td->base_dn), config->scope) && + if (slapi_dn_issuffix(slapi_entry_get_dn(entries[i]), config->scope) && (slapi_filter_test_simple(entries[i], config->filter) == 0)) { automember_update_membership(config, entries[i], NULL);