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> |
b4b2115bbfd2a6af88e1f18c5147f3c2a5389a5d |
|
18-May-2015 |
Lukas Slebodnik <lslebodn@redhat.com> |
LDAP: Remove dead assignment
The variable ret was not read when function sysdb_has_enumerated
returned ENOENT. Just boolean variable has_enumerated need to be changed.
This dead assignment caused warning from clang static analyser
Value stored to 'ret' is never read
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
601d193feba2d9859661b979c2a0d1d479d5cee8 |
|
12-May-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: disable the cleanup task by default
Resolves:
https://fedorahosted.org/sssd/ticket/2627
The cleanup task was designed to keep the cache size within certain
limits. This is how it roughly works now:
- find users who have never logged in by default. If
account_cache_expiration is set, find users who loggged in later
than account_cache_expiration
- delete the matching set of users
- find groups that have no members
- delete the matching set of groups
So unless account_cache_expiration is set to something sensible, only empty
groups and expired users who never logged in are removed and that's quite
a corner case. The above effectivelly walks the whole database, especially
the groups step is quite slow with a huge database. The whole cleanup task
also runs in a single sysdb transaction, which means all other transactions
are blocked while the cleanup task crunches the database.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
725bb2a9901c4f673b107ed179f5d68ec443ca63 |
|
08-Apr-2015 |
Pavel Březina <pbrezina@redhat.com> |
enumeration: fix talloc context
If for some reason ptask fails (e.g. timeout), req is talloc freed
but because subreq is attached to ectx which is permanent it is
finished anyway. Then a crash occures when we are trying to access
callback data.
The same happens in sdap_dom_enum_ex_send.
Resolves:
https://fedorahosted.org/sssd/ticket/2611
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
c9eaf8c1e02c155b7ca7ffb2b1edade8a23ce1ff |
|
02-Dec-2014 |
Pavel Reichl <preichl@redhat.com> |
SYSDB: sysdb_get_bool() return ENOENT & unit tests
sysdb_get_bool() return ENOENT if no result is found.
Unit test for sysdb_get_bool() & sysdb_set_bool() was added.
This patch also fixes ldap_setup_enumeration() to handle ENOENT returned by
sysdb_has_enumerated().
Resolves:
https://fedorahosted.org/sssd/ticket/1991
Reviewed-by: Lukáš Slebodník <lslebodn@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> |
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> |
f8407faaeb6726bef6463d84f183f2b0ad1f99d4 |
|
29-Jan-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Pass a private context to enumeration ptask instead of hardcoded connection
Previously, the sdap-domain enumeration request used a single connection context to
download all the data. Now we'd like to use different connections to
download different objects, so the ID context is passed in and the
request itself decides which connection to use for the sdap-domain
enumeration. |
e2ac9be4f293b96f3c8992f1171e44bc1da5cfca |
|
15-Nov-2013 |
Michal Zidek <mzidek@redhat.com> |
SYSDB: Drop redundant sysdb_ctx parameter from sysdb.c |
74802794554e0f87d1354b6788f1719cd7d80a6c |
|
18-Sep-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
AD: Download master domain info when enumerating
https://fedorahosted.org/sssd/ticket/2068
With the current design, downloading master domain data was tied to
subdomains refresh, triggered by responders. But because enumeration is
a background task that can't be triggered on its own, we can't rely on
responders to download the master domain data and we need to check the
master domain on each enumeration request. |
21f749c9300a1a51f3eb83d7f1483ec2fe15b3cc |
|
18-Sep-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: sdap_id_setup_tasks accepts a custom enum request
AD provider will override the default with its own. |
5894f059b6f97a9dfd63f6e9ab544c636dd58665 |
|
28-Aug-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Convert enumeration to the ptask API
https://fedorahosted.org/sssd/ticket/1942
Identity providers other than LDAP need to customize the enumeration in
different ways while sharing the way the task is scheduled etc. The
easiest way to accomplish it is to leverage the recently introduced
ptask framework. |
8ca73915a3bf60331468fed6b3b38652c979f95d |
|
28-Aug-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Move the ldap enum request to its own reusable module
The LDAP enumeration was too closely tied to the LDAP identity provider.
Because some providers might need special handling such as refresh the
master domain record before proceeding with the enumeration itself, this
patch splits the request itself to a separate async request and lets the
ldap_id_enum.c module only configure this new request.
Also move the enum timestamp to sdap_domain to make the enum tracking
per sdap domain. The cleanup timestamp will be moved in another patch. |
25e64abcac8db1d6a9efc7195259f760cebede54 |
|
28-Aug-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Remove unused constant
The constant was not used since Euegene came up with his reconnection
logic. |
4c63d8ae272923a734e3772f1cad49cbc1ee6e34 |
|
28-Aug-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Add enum_{users,groups}_recv to follow the tevent_req style
The enum code was quite old and predated the tevent_req style. In
particular, the enum code was checking tevent state direcly and not
using _recv functions or the helper macros we added later.
As a consequence, it was not easy to read. This patch adds the standard
_recv functions to read the status of the enum requests. |
b56b06e199f15a8a840b36bc7cb8010e39ae761d |
|
28-Jun-2013 |
Sumit Bose <sbose@redhat.com> |
Replace SDAP_ID_MAPPING checks with sdap_idmap_domain_has_algorithmic_mapping
Currently the decision if external or algorithmic mapping should be used
in the LDAP or AD provider was based on the value of the ldap_id_mapping
config option. Since now all information about ID mapping is handled by
libsss_idmap the check for this options can be replace with a call which
checks the state via libss_idmap.
https://fedorahosted.org/sssd/ticket/1961 |
749cfb5d3270b5daf389d51a0dbd3fd2aec6e05d |
|
07-Jun-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: new SDAP domain structure
Previously an sdap_id_ctx was always tied to one domain with a single
set of search bases. But with the introduction of Global Catalog
lookups, primary domain and subdomains might have different search
bases.
This patch introduces a new structure sdap_domain that contains an sssd
domain or subdomain and a set of search bases. With this patch, there is
only one sdap_domain that describes the primary domain. |
dcb44c39dda9699cdd6488fd116a51ced0687de3 |
|
07-Jun-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: sdap_id_ctx might contain several connections
With some LDAP server implementations, one server might provide
different "views" of the identites on different ports. One example is
the Active Directory Global catalog. The provider would contact
different view depending on which operation it is performing and against
which SSSD domain.
At the same time, these views run on the same server, which means the same
server options, enumeration, cleanup or Kerberos service should be used.
So instead of using several different failover ports or several
instances of sdap_id_ctx, this patch introduces a new "struct
sdap_id_conn_ctx" that contains the connection cache to the particular
view and an instance of "struct sdap_options" that contains the URI.
No functional changes are present in this patch, currently all providers
use a single connection. Multiple connections will be used later in the
upcoming patches. |
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. |
80c6afa474d8a1e0198832bddfe5da75a9818b29 |
|
15-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Add domain argument to sysdb_has/set_enumerated() |
41be4e3976cf66823ad2c6880671ac7fbafdc640 |
|
23-Aug-2012 |
Pavel Březina <pbrezina@redhat.com> |
Clean up cache on server reinitialization
https://fedorahosted.org/sssd/ticket/734
We successfully detect when the server is reinitialized by testing
the new lastUSN value. The maximum USN values are set to zero, but
the current cache content remains.
This patch removes records that were deleted from the server.
It uses the following approach:
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
automatically during next smart/full refresh, or when an expired rule
is deleted. |
64ddff90c7fcc02ccb06824ac93af7d5f361a88f |
|
31-May-2012 |
Jan Zeleny <jzeleny@redhat.com> |
Add support for filtering atributes
This patch adds support for filtering attributes when constructing
attribute list from a map for LDAP query. |
ca4b7b92738f3dd463914e3de5757cd98d37a983 |
|
10-May-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
LDAP: Add attr_count return value to build_attrs_from_map()
This is necessary because in several places in the code, we are
appending to the attrs returned from this value, and if we relied
on the map size macro, we would be appending after the NULL
terminator if one or more attributes were defined as NULL. |
aef21bb77289a61796436eff7a08f64480f813ce |
|
03-May-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
LDAP: Add support for enumeration of ID-mapped users and groups |
e2925c2d7d10cbb51098402233784044168f1a77 |
|
31-Jan-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
LDAP: Add enumeration support for services |
1bbd4c57fc31cec302244725e698413623818d19 |
|
02-Nov-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
LDAP: Add support for multiple search bases for group enumeration |
f26b61dfe246c750a42f1f9fb28f9df5981bc841 |
|
02-Nov-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
LDAP: Add support for multiple search bases for user enumeration |
357efd33759fd1297723d9956a7f77226fe26871 |
|
02-Nov-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
LDAP: Convert ldap_*_search_filter
Instead of making this a global option for all user lookups, make
it only used if the search base is passed without an explicit
filter. |
86e00b950eae9884702ad535e3030b238ec451e3 |
|
02-Nov-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
LDAP: Support multiple group search bases (non-enumeration, RFC2307) |
a0e406e5219068aec1a531e2b09ee30309b266cf |
|
02-Nov-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
LDAP: Support multiple user search bases (non-enumeration) |
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. |
86d77907310fa939fe89884fbbdf2142c06a420e |
|
04-Aug-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Fix returning groups when gidNumber attribute is not ordered
https://fedorahosted.org/sssd/ticket/951 |
772764e048dcd15c6d9732574126eb83b53a60e2 |
|
04-May-2011 |
Jan Zeleny <jzeleny@redhat.com> |
Fixed lastUSN checking improvements
This patch fixes some issues with setting lastUSN attribute and it adds
check against the highest user/group USN after enumeration to keep
better track of the real highest USN. Optimal solution here would be to
schedule a check of rootDSE entry right after the enumeration finishes,
but for the moment this is good enough. |
361b29ff4cc0eac948074cb0f54fdc7bd556a1b6 |
|
19-Apr-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Add user and group search LDAP filter options
https://fedorahosted.org/sssd/ticket/647 |
b46a9e1db77faceece974575e236da76dae3c159 |
|
14-Mar-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Require existence of username, uid and gid for user enumeration
We will ignore users that do not have these three values. |
0112cf9f4a48494f1527018f86f762f2aff63f07 |
|
14-Mar-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Require existence of GID number and name in group searches
https://fedorahosted.org/sssd/ticket/824 |
29993ce4fbdf08f28077f4b6824c8b6b8d616cb8 |
|
17-Jan-2011 |
Sumit Bose <sbose@redhat.com> |
Add ldap_search_enumeration_timeout config option |
a530a96721d8106a6839b6b643b0abc5d7a7b9e0 |
|
17-Jan-2011 |
Sumit Bose <sbose@redhat.com> |
Add timeout parameter to sdap_get_generic_send() |
6c4661b78edafbd5b44e0c6319243e6671260bd0 |
|
17-Dec-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Start first enumeration immediately
Previously, we would wait for ten seconds before starting an
enumeration. However, this meant that on the first startup (before
we had run our first enumeration) there was a ten-second window
where clients would immediately get back a response with no
entries instead of blocking until the enumeration completed.
With this patch, SSSD will now run an enumeration immediately upon
startup. Further startups will retain the ten-second delay so as
not to slow down system bootups.
https://fedorahosted.org/sssd/ticket/616 |
85abff7f43e8006de2c2fa35612884d377b9a036 |
|
07-Dec-2010 |
Simo Sorce <ssorce@redhat.com> |
ldap: Use USN entries if available.
Otherwise fallback to the default modifyTimestamp indicator |
87f2bb60510f31fec012d126411f09a99c72140e |
|
08-Sep-2010 |
Jan Zeleny <jzeleny@redhat.com> |
Dead assignments cleanup in providers code
Dead assignments were deleted. Also prototype of function
sdap_access_decide_offline() has been changed, since its return
code was never used.
Ticket: #586 |
9e67de38894e0fb6f82d66c62683e9dc2d030aa0 |
|
09-Jul-2010 |
eindenbom <eindenbom@gmail.com> |
Use new LDAP connection framework for LDAP user and group enumeration. |
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 |
9e99e3c5c45b20189e76e4d2546966ff1fb3ce40 |
|
07-May-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Fix segfault in GSSAPI reconnect code
Also clean up some duplicated code into a single common routine
sdap_account_info_common_done() |
270a0a1b6182ef1fbff2a93af6731788cf954874 |
|
03-May-2010 |
Simo Sorce <ssorce@redhat.com> |
Better handle sdap_handle memory from callers.
Always just mark the sdap_handle as not connected and let later _send()
functions to take care of freeing the handle before reconnecting.
Introduce restart functions to avoid calling _send() functions in _done()
functions error paths as this would have the same effect as directly freeing
the sdap_handle and cause access to freed memory in sdap_handle_release()
By freeing sdap_handle only in the connection _recv() function we
guarantee it can never be done within sdap_handle_release() but only
in a following event. |
1c48b5a62f73234ed26bb20f0ab345ab61cda0ab |
|
18-Feb-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Rename server/ directory to src/
Also update BUILD.txt |