summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/ldap_id_cleanup.c
Commit message (Collapse)AuthorAgeFilesLines
* ptask: Add backoff feature to the ptask api.Michal Zidek2014-07-311-1/+1
| | | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* ptask: Allow adding random_offset to scheduled execution timeMichal Zidek2014-07-311-3/+4
| | | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Update DEBUG* invocations to use new levelsNikolai Kondrashov2014-02-121-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a script to update DEBUG* macro invocations, which use literal numbers for levels, to use bitmask macros instead: grep -rl --include '*.[hc]' DEBUG . | while read f; do mv "$f"{,.orig} perl -e 'use strict; use File::Slurp; my @map=qw" SSSDBG_FATAL_FAILURE SSSDBG_CRIT_FAILURE SSSDBG_OP_FAILURE SSSDBG_MINOR_FAILURE SSSDBG_CONF_SETTINGS SSSDBG_FUNC_DATA SSSDBG_TRACE_FUNC SSSDBG_TRACE_LIBS SSSDBG_TRACE_INTERNAL SSSDBG_TRACE_ALL "; my $text=read_file(\*STDIN); my $repl; $text=~s/ ^ ( .* \b (DEBUG|DEBUG_PAM_DATA|DEBUG_GR_MEM) \s* \(\s* )( [0-9] )( \s*, ) ( \s* ) ( .* ) $ / $repl = $1.$map[$3].$4.$5.$6, length($repl) <= 80 ? $repl : $1.$map[$3].$4."\n".(" " x length($1)).$6 /xmge; print $text; ' < "$f.orig" > "$f" rm "$f.orig" done Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Make DEBUG macro invocations variadicNikolai Kondrashov2014-02-121-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | Use a script to update DEBUG macro invocations to use it as a variadic macro, supplying format string and its arguments directly, instead of wrapping them in parens. This script was used to update the code: grep -rwl --include '*.[hc]' DEBUG . | while read f; do mv "$f"{,.orig} perl -e \ 'use strict; use File::Slurp; my $text=read_file(\*STDIN); $text=~s#(\bDEBUG\s*\([^(]+)\((.*?)\)\s*\)\s*;#$1$2);#gs; print $text;' < "$f.orig" > "$f" rm "$f.orig" done Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* SYSDB: Drop the sysdb_ctx parameter - module sysdb_ops (part 2)Michal Zidek2013-11-151-7/+4
|
* dp: convert cleanup task to be_ptaskPavel Březina2013-10-251-54/+53
| | | | | Resolves: https://fedorahosted.org/sssd/ticket/1968
* Fix formating of variables with type: size_tLukas Slebodnik2013-09-111-2/+2
|
* LDAP: Store cleanup timestamp after initial cleanupJakub Hrozek2013-09-111-8/+8
| | | | | | When the SSSD changes serves (and hence lastUSN) we perform a cleanup as well. However, after recent changes, we didn't set the cleanup timestamp correctly, which made the lastUSN logic fail.
* LDAP: Make the cleanup task reusable for subdomainsJakub Hrozek2013-08-281-34/+62
| | | | | | Instead of always performing the cleanup on the main domain, the task now accepts a sdap_domain structure to perform the cleanup on. This change will make the cleanup task reusable for subdomains.
* LDAP: Make cleanup synchronousJakub Hrozek2013-08-281-130/+27
| | | | | | The LDAP cleanup request was asynchronous for no good reason, probably a leftover from the days of async sysdb. This patch makes it sychronous again, removing a lot of uneeded code.
* Remove sysdb as a be context structure memberSimo Sorce2013-01-211-5/+5
| | | | The sysdb context is already available through the 'domain' structure.
* Add domain argument to sysdb_delete_group()Simo Sorce2013-01-151-1/+1
| | | | Also remove sysdb_delete_domgroup()
* Add domain argument to sysdb_search_groups()Simo Sorce2013-01-151-4/+7
|
* Add domain argument to sysdb_delete_user()Simo Sorce2013-01-151-1/+1
| | | | Also remove sysdb_delete_domuser()
* Add domain arg to sysdb_search_users()Simo Sorce2013-01-151-1/+1
|
* Do not remove a group if it has members from subdomainsSumit Bose2012-11-101-4/+15
| | | | | | | Currently it is only checked if an expired group still has members of the local domain. If not, the group is delete from the cache. With this patch the whole cache, i.e. including subdomains, is searched for members.
* Unify usage of sysdb transactionsMichal Zidek2012-08-231-0/+3
| | | | | | Removing bad examples of usage of sysdb_transaction_start/commit/end functions and making it more consistent (all files except of src/db/sysdb_*.c).
* Ghost members - various small changesJan Zeleny2012-05-311-1/+1
|
* Cleanup: Remove unused parametersJakub Hrozek2011-11-221-6/+3
|
* sysdb refactoring: memory context deletedJan Zeleny2011-08-151-2/+2
| | | | | | This patch deletes memory context parameter in those places in sysdb where it is not necessary. The code using modified functions has been updated. Tests updated as well.
* sysdb refactoring: deleted domain variables in sysdb APIJan Zeleny2011-08-151-6/+5
| | | | | The patch also updates code using modified functions. Tests have also been adjusted.
* Non-posix group processing - ldap provider and nss responderJan Zeleny2011-06-021-12/+12
|
* Fix cleanup transactionStephen Gallagher2011-02-111-0/+1
| | | | | Without setting in_transaction=true, if the sysdb operations threw an error, we wouldn't cancel the transaction.
* Wrap cleanup task in a sysdb transactionStephen Gallagher2011-02-031-0/+20
|
* Don't clean up groups for which a user has it as primary GIDStephen Gallagher2010-11-041-2/+15
| | | | | | | | | | We were cleaning up all groups that were expired and for which there existed no user with memberOf: <thegroup> as an attribute. This patch modifies the search to also check for cached users with this group's GID as their primary GID. Fixes https://fedorahosted.org/sssd/ticket/624
* sysdb interface for adding fake usersJakub Hrozek2010-10-151-3/+4
|
* Properly check that the timeout event was created for cleanup/enumStephen Gallagher2010-06-101-1/+23
| | | | | | | | | We need to make sure that if we didn't create the timeout, that we cancel the request so there's no chance of ending up with two enumerations/cleanups running simultaneously. We'll attempt to reschedule later, if possible. https://fedorahosted.org/sssd/ticket/524
* sysdb: convert sysdb_search_groupsSimo Sorce2010-04-121-133/+57
|
* sysdb: delete sysdb_delete_groupSimo Sorce2010-04-121-92/+45
|
* sysdb: convert sysdb_delete_userSimo Sorce2010-04-121-162/+60
|
* sysdb: convert sysdb_search_usersSimo Sorce2010-04-121-67/+37
|
* Remove a check that was left behindJakub Hrozek2010-02-251-7/+1
| | | | | When refactoring talloc_asprintf calls a check was left behind that cased the backend to go offline immediately.
* Better cleanup task handlingJakub Hrozek2010-02-231-36/+192
| | | | | | | | | | | | | | | | Implements a different mechanism for cleanup task. Instead of just deleting expired entries, this patch adds a new option account_cache_expiration for domains. If an entry is expired and the last login was more days in the past that account_cache_expiration, the entry is deleted. Groups are deleted if they are expired and and no user references them (no user has memberof: attribute pointing at that group). The parameter account_cache_expiration is not LDAP-specific, so that other future backends might use the same timeout setting. Fixes: #391
* Do not check entries during cleanup taskJakub Hrozek2010-02-231-79/+57
| | | | | | | Do not attempt to validate expired entries in cache, just delete them. Also increase the cache timeouts. Fixes: #331
* Do not schedule enumeration after a cleanupJakub Hrozek2010-02-231-2/+2
|
* Rename server/ directory to src/Stephen Gallagher2010-02-181-0/+555
Also update BUILD.txt