sdap_reinit.c revision 4fcc50e133f90cd4c5931a3ac48c84cb628b16fc
/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2012 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <talloc.h>
#include <tevent.h>
#include <string.h>
#include <ldb.h>
#include "providers/ldap/ldap_common.h"
#include "providers/ldap/sdap_async_enum.h"
#include "db/sysdb_services.h"
struct sdap_reinit_cleanup_state {
struct sss_domain_info *domain;
};
struct sss_domain_info *domain);
struct sdap_id_ctx *id_ctx)
{
struct sdap_reinit_cleanup_state *state;
int ret;
/*
* 1. remove entryUSN attribute from all entries
* 2. run enumeration
* 3. remove records that doesn't have entryUSN attribute updated
*
* We don't need to do this for sudo rules, they will be refreshed
* is deleted.
*/
return NULL;
}
/* enumeration is disabled, this whole process is meaningless */
goto immediately;
}
goto immediately;
}
goto immediately;
}
return req;
} else {
}
return req;
}
struct ldb_message **msgs,
{
int i;
for (i = 0; i < msgs_num; i++) {
if (ret) {
}
}
}
struct sss_domain_info *domain)
{
bool in_transaction = false;
int sret;
return ENOMEM;
}
goto done;
}
in_transaction = true;
/* reset users' usn */
goto done;
}
msgs_num = 0;
/* reset groups' usn */
goto done;
}
msgs_num = 0;
/* reset services' usn */
goto done;
}
msgs_num = 0;
in_transaction = false;
} else {
}
done:
if (in_transaction) {
}
}
return ret;
}
{
goto fail;
}
/* Ok, we've completed an enumeration. Save this to the
* sysdb so we can postpone starting up the enumeration
* process on the next SSSD service restart (to avoid
* slowing down system boot-up
*/
"enumerated.\n"));
/* This error is non-fatal, so continue */
}
goto fail;
}
return;
fail:
}
struct ldb_message **msgs,
{
int i;
for (i = 0; i < msgs_num; i++) {
if (ret) {
}
}
}
{
bool in_transaction = false;
int sret;
return ENOMEM;
}
goto done;
}
in_transaction = true;
/* purge untouched users */
goto done;
}
msgs_num = 0;
/* purge untouched groups */
goto done;
}
msgs_num = 0;
/* purge untouched services */
msgs_num = 0;
in_transaction = false;
} else {
}
done:
if (in_transaction) {
}
}
return ret;
}
{
return EOK;
}