0e238c259c066cf997aaa940d33d6bda96c15925 |
|
27-Nov-2017 |
Sumit Bose <sbose@redhat.com> |
sysdb: do not use objectClass for users and groups
The majority of the object in the SSSD cache are users and groups. If
there are many user and groups in the cache the index objects of the
objectclass attributes 'user' and 'group' become large because the
must hold references to all objects of those object classes.
As a result the management of these index objects becomes costly because
they must be parsed and split apart quite often. Additionally they are
mostly useless because user and groups are lookup up by more specific
attributes in general.
Only when enumerating all user or groups this kind of index might be
useful.
There are two way of removing this kind of index from the user and group
objects. Either by removing objectClass from the list of indexes and add
a new attribute to all other type of object we want and index for. Or by
replacing objectClass with a different attribute for the user and group
objects. After some testing I think the latter one is the more reliable
one and implemented it in this patch.
Related to https://pagure.io/SSSD/sssd/issue/3503
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
05e579691b51ac2f81ab0c828ff6fe57bd86a8b6 |
|
15-Jun-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
LDAP_ID_CLEANUP: Use sysdb_search_*_by_timestamp()
Use the appropriate methods for searching users and groups bv timestamp.
Resolves:
https://pagure.io/SSSD/sssd/issue/3369
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
6cb5bad3c8e2f35ca9dce1800a506d626f90c079 |
|
18-Sep-2015 |
Lukas Slebodnik <lslebodn@redhat.com> |
LDAP: Sanitize group dn before using in filter
Each string should be sanitized(rfc4515) before using ldbsearch.
A group dn was not sanitized in the function cleanup_groups.
Resolves:
https://fedorahosted.org/sssd/ticket/2744
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
3d8b576bf49a79d5776574b96c6ef9535bbc46ac |
|
18-Sep-2015 |
Lukas Slebodnik <lslebodn@redhat.com> |
Partially revert "LDAP: sanitize group name when used in filter"
This reverts commit e2e334b2f51118cb14c7391c4e4e44ff247ef638.
+ temporary disable unit test
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
9c563db822758732b25a3c8c61ffac90a7deffc3 |
|
18-Sep-2015 |
Lukas Slebodnik <lslebodn@redhat.com> |
Revert "LDAP: end on ENOMEM"
This reverts commit f31a57321fc0a2390bb0d6030053c49787e5e587.
It blocked reverting commit e2e334b2f51118cb14c7391c4e4e44ff247ef638.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
4d8f0f92edccff1be52f2b505e76886708d32e26 |
|
03-Sep-2015 |
Michal Židek <mzidek@redhat.com> |
cleanup task: Expire all memberof targets when removing user
Ticket:
https://fedorahosted.org/sssd/ticket/2676
When user is removed from cache during cleanup task, mark all
his memberof targets as expired to refresh member/ghost
attributes on next request.
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
f31a57321fc0a2390bb0d6030053c49787e5e587 |
|
31-Aug-2015 |
Pavel Reichl <preichl@redhat.com> |
LDAP: end on ENOMEM
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
4772d3f1fe5015a25ba1fb4c3779ee3117ec6fcb |
|
17-Aug-2015 |
Pavel Reichl <preichl@redhat.com> |
LDAP: minor improvements in ldap id cleanup
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
e2e334b2f51118cb14c7391c4e4e44ff247ef638 |
|
17-Aug-2015 |
Pavel Reichl <preichl@redhat.com> |
LDAP: sanitize group name when used in filter
cleanup_groups() uses DN of group in filter for ldbsearch. But the name
might contain characters with special meaning for filtering
like - "*()\/"
Resolves:
https://fedorahosted.org/sssd/ticket/2744
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
4b1a46396caf656095e5f5e90d43996bdeaba0f3 |
|
31-Jul-2015 |
Pavel Reichl <preichl@redhat.com> |
SDAP: rename SDAP_CACHE_PURGE_TIMEOUT
Enum member SDAP_CACHE_PURGE_TIMEOUT has counter-intuitive name as it's used
to access 'ldap_purge_cache_timeout' option.
SDAP_CACHE_PURGE_TIMEOUT is more fitting name.
Reviewed-by: Petr Cech <pcech@redhat.com> |
5a56c7c6ee79ab6d9706be333a64c2c29b90e668 |
|
17-Feb-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Handle ENOENT better in the cleanup task
The cleanup task handled both count=0 and ret=ENOENT separately which
makes no sense, the count=0 handler was dead code previously. Set
count=0 on ENOENT instead to just bubble through the DEBUG message
gracefully as well.
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
eb85a718f4fd69ea1734b502f3d5f91758bd2020 |
|
17-Feb-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Add better DEBUG messages to the cleanup task
Some failures would shortcut to the done handler without telling us
anything about why it failed. This commit decorates the cleanup task
with more DEBUG statements.
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
b39098de5bbb7513d5509fb30a3096a3bd9d43f2 |
|
31-Jul-2014 |
Michal Zidek <mzidek@redhat.com> |
ptask: Add backoff feature to the ptask api.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com> |
ab0ab5a30379b84d6e05e1f2dc457bd1dd97401f |
|
31-Jul-2014 |
Michal Zidek <mzidek@redhat.com> |
ptask: Allow adding random_offset to scheduled execution time
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com> |
83bf46f4066e3d5e838a32357c201de9bd6ecdfd |
|
12-Feb-2014 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
Update DEBUG* invocations to use new levels
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> |
a3c8390d19593b1e5277d95bfb4ab206d4785150 |
|
12-Feb-2014 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
Make DEBUG macro invocations variadic
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> |
d115f40c7a3999e3cbe705a2ff9cf0fd493f80fb |
|
15-Nov-2013 |
Michal Zidek <mzidek@redhat.com> |
SYSDB: Drop the sysdb_ctx parameter - module sysdb_ops (part 2) |
6e3f79799ce7e736dd19ae2e05a60dc1901613f1 |
|
25-Oct-2013 |
Pavel Březina <pbrezina@redhat.com> |
dp: convert cleanup task to be_ptask
Resolves:
https://fedorahosted.org/sssd/ticket/1968 |
0e65abe5cf2abf5d4b431cf6bd161b419f07901d |
|
11-Sep-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Fix formating of variables with type: size_t |
fc6afb011198f84a30e6598c62923b5a588ccd54 |
|
11-Sep-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Store cleanup timestamp after initial cleanup
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. |
66edf42c51f8591c93204b6490c103fa51346f47 |
|
28-Aug-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Make the cleanup task reusable for subdomains
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. |
34a63c4a00096da7a8e09d49b5970bb1f807eddc |
|
28-Aug-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Make cleanup synchronous
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. |
df0596ec12bc5091608371e2977f3111241e8caf |
|
21-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Remove sysdb as a be context structure member
The sysdb context is already available through the 'domain' structure. |
a58ccee5afc802c7560624929614616aeefa9bd0 |
|
15-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Add domain argument to sysdb_delete_group()
Also remove sysdb_delete_domgroup() |
2b7ee2a760e7fcc70f4970a3bbee6fbf8f2ccb9d |
|
15-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Add domain argument to sysdb_search_groups() |
3412d14d65490c32414e72ac20fe21bad53ceb45 |
|
15-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Add domain argument to sysdb_delete_user()
Also remove sysdb_delete_domuser() |
044868b388b4e47499f12a9105310b247bbe1ce2 |
|
15-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Add domain arg to sysdb_search_users() |
2074780e4dc881028c06de6699d2967ef42ac4a9 |
|
11-Nov-2012 |
Sumit Bose <sbose@redhat.com> |
Do not remove a group if it has members from subdomains
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. |
21d485184df986e1a123f70c689517386e51a5ce |
|
23-Aug-2012 |
Michal Zidek <mzidek@redhat.com> |
Unify usage of sysdb transactions
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). |
0d492cf0d3bf44cac68e8606ac977da21f0628f6 |
|
31-May-2012 |
Jan Zeleny <jzeleny@redhat.com> |
Ghost members - various small changes |
ac3a1f3da772cf101101c31675c63dc3549b21b5 |
|
22-Nov-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Cleanup: Remove unused parameters |
e79d23932ef9d52cf4eb32ddec2d0a9b3af9a9eb |
|
15-Aug-2011 |
Jan Zeleny <jzeleny@redhat.com> |
sysdb refactoring: memory context deleted
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. |
8a1738f9379a1b8fb5c95c3df649e014ff5a1434 |
|
15-Aug-2011 |
Jan Zeleny <jzeleny@redhat.com> |
sysdb refactoring: deleted domain variables in sysdb API
The patch also updates code using modified functions. Tests have also
been adjusted. |
00142aba00a2adcf32f0741b8ea8a31c5a461675 |
|
02-Jun-2011 |
Jan Zeleny <jzeleny@redhat.com> |
Non-posix group processing - ldap provider and nss responder |
b467b593c344d7de5cc2bbf141bc959e5d248de1 |
|
11-Feb-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Fix cleanup transaction
Without setting in_transaction=true, if the sysdb operations threw
an error, we wouldn't cancel the transaction. |
f716f4d39d5165da873ac923c9832a16c9a97f55 |
|
03-Feb-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Wrap cleanup task in a sysdb transaction |
b3b327ada3a5db73c008ec8a7eeff2bfc5cc3d3e |
|
04-Nov-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Don't clean up groups for which a user has it as primary GID
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 |
c1d525a90f06a9414d0788857b271b80625a5858 |
|
15-Oct-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
sysdb interface for adding fake users |
476b2f491e248b182c0f6c3461028b61a8a87ab7 |
|
10-Jun-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Properly check that the timeout event was created for cleanup/enum
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 |
8a6449480e4be898248c1d35bbf5c24d91503e4e |
|
12-Apr-2010 |
Simo Sorce <ssorce@redhat.com> |
sysdb: convert sysdb_search_groups |
3b3dc1a8ad19100951d19abe4038791f01faa0b7 |
|
12-Apr-2010 |
Simo Sorce <ssorce@redhat.com> |
sysdb: delete sysdb_delete_group |
ed80c73efa51780a39dfc9c72821cf88e95d264c |
|
12-Apr-2010 |
Simo Sorce <ssorce@redhat.com> |
sysdb: convert sysdb_delete_user |
16ef1ec0d10d24703351d02bbd7d0c2255da4359 |
|
12-Apr-2010 |
Simo Sorce <ssorce@redhat.com> |
sysdb: convert sysdb_search_users |
52e080ee2d50b6439b503695fb12808b3d0cc30b |
|
25-Feb-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Remove a check that was left behind
When refactoring talloc_asprintf calls a check was left behind that
cased the backend to go offline immediately. |
af81aaa57f82eab78647113c391bd84247f96150 |
|
23-Feb-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Better cleanup task handling
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 |
170cd083e3a9738b35de03b8e63743a8f2516ca8 |
|
23-Feb-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Do not check entries during cleanup task
Do not attempt to validate expired entries in cache, just delete them.
Also increase the cache timeouts.
Fixes: #331 |
cbb4369808229180449152401459f896d390a083 |
|
23-Feb-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Do not schedule enumeration after a cleanup |
1c48b5a62f73234ed26bb20f0ab345ab61cda0ab |
|
18-Feb-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Rename server/ directory to src/
Also update BUILD.txt |