677a31351c80453d9ce006481364399a96312052 |
|
29-Jan-2018 |
René Genz <liebundartig@freenet.de> |
Fix minor spelling mistakes in responder/*
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
07452697a67902dc6876d2f40d364cf1eadf2431 |
|
06-Dec-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
NEGCACHE: Add API for setting and checking locate-account-domain requests
Extends the negative cache API with several request getsetters:
- sss_ncache_set/check_domain_locate_type - check if this request
type supports locating account domain or set that this request
type does not support the locator.
- sss_ncache_set/check_locate_gid/uid - check if it is time to call
the locator again or set that the locator should not be called
for IDs again for the duration of the negative cache.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Sumit Bose <sbose@redhat.com> |
3ad33ca77044f9a9d18f7def271b0beb180e567b |
|
28-Aug-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
NEGCACHE: Add root's uid/gid to ncache
As "root" is not handled by SSSD, let's add its uid and gid to the
negative cache as well. The reason it's added without specifying a
domain is to follow how the negative cache is used by cache req's code
when searching something by id.
As the negative cache check for uid/gid, in the cache req code, is done
after resolving the name, we can save one LDAP call to the data
provider.
Related: https://pagure.io/SSSD/sssd/issue/3460
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
9908bdc9755e744c3e2c7c746a4edf95f9083ef5 |
|
28-Aug-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
NEGCACHE: Descend to all subdomains when adding user/groups
When a user or group is added to the negative cache, we should descend
to all subdomains as well.
Related: https://pagure.io/SSSD/sssd/issue/3460
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
1e7b7da3aa56060c26f8ba1c08318cdee77753ea |
|
28-Aug-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
NEGCACHE: Always add "root" to the negative cache
The current code only adds "root" to the negative cache in case there's
any other user or group set up in to be added.
As SSSD doesn't handle "root", it should *always* be added to the
negative cache.
Related: https://pagure.io/SSSD/sssd/issue/3460
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
b54d79cf3c8017e186b5ea7cdc383746233db39b |
|
28-Aug-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
NEGCACHE: Add some comments about each step of sss_ncache_prepopulate()
The comments help to understand which part of the code is dealing with
users or groups of specific or non-specific domain filters.
Related: https://pagure.io/SSSD/sssd/issue/3460
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
54039570d26e29444c398aa4ad6ba638f1713566 |
|
02-Mar-2017 |
Sumit Bose <sbose@redhat.com> |
cache_req: use own namespace for UPNs
If the UPN use the same domain name as the configured domain an
unsuccessful lookup by name will already create an entry in the negative
cache. If the lookup by UPN would use the same namespace the lookup will
immediately be finished because there would already be an entry in the
negative cache.
Resolves:
https://pagure.io/SSSD/sssd/issue/3313
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
99a32e4f5164e174d5a3ffa5a1fe622075a8fe45 |
|
15-Feb-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
NEGCACHE: Add API to reset all users and groups
Adds a negative cache API to reset negatively cached users and groups.
This will be used when the files back end finishes enumeration to make
sure all results are available.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
950716d2087446205c84f00b371f468d6ead1ec2 |
|
09-Aug-2016 |
Lukas Slebodnik <lslebodn@redhat.com> |
NSS: Do not check local users with disabled local_negative_timeout
sssd_nss can set different negative timeout for local users
and groups. However, checking whether user/group is local
is quite expensive operation. We can avoid such operations
if local_negative_timeout is not set.
This fix improve performance(40%) of lookup non-existing
entries in offline mode and with disabled local_negative_timeout.
sh$ cat pok.sh
for i in {1..10000}; do
getent passwd -s sss temp$i
getent group -s sss temp$i
done
#without patch
sh $time /bin/bash pok.sh
real 0m41.534s
user 0m3.580s
sys 0m14.202s
#with patch
sh $time /bin/bash pok.sh
real 0m26.686s
user 0m3.292s
sys 0m13.165s
Resolves:
https://fedorahosted.org/sssd/ticket/3122
Reviewed-by: Petr Cech <pcech@redhat.com> |
27bf39ed3e197497cf4aca58038d788ea5b5ddbc |
|
07-Jul-2016 |
Jakub Hrozek <jhrozek@redhat.com> |
NCACHE: Store FQDNs internaly, check for shortnames in files
When storing users and groups by their name in the negative cache, store
them fully qualfied so that the responder only has to track the name in
the internal format once the input is converted.
Reviewed-by: Sumit Bose <sbose@redhat.com> |
e7ccfb139388c947ec2dee16cfe3005f5643b90d |
|
10-Jun-2016 |
Petr Cech <pcech@redhat.com> |
RESPONDERS: Negative caching of local users
This patch adds new option 'neg_cache_locals_timeout' into section
of NSS responder. It allows negative caching of local groups and
users. Default value is 0 which means no caching.
Resolves:
https://fedorahosted.org/sssd/ticket/2928
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
f77ba726e3f8bd1e3cabdee66f38c4ed7a771913 |
|
11-May-2016 |
Petr Cech <pcech@redhat.com> |
NEGCACHE: Adding getter for timeout
It adds new function to negative cache API:
* int sss_ncache_get_timeout(struct sss_nc_ctx *ctx);
Resolves:
https://fedorahosted.org/sssd/ticket/2317
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
0393f0d44ac92035de29a8bc8b2005db6d90b640 |
|
11-May-2016 |
Petr Cech <pcech@redhat.com> |
NEGCACHE: Removing timeout from sss_ncache_check_*
It removes timeout parameter from check functions of negative cache.
Timeout is set ny init function and it is handled internally.
API change:
* int sss_ncache_check_...(struct sss_nc_ctx *ctx,
int ttl, <----- timeout vanished
struct sss_domain_info *dom,
...);
Resolves:
https://fedorahosted.org/sssd/ticket/2317
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
39d36216a1692eee6cc5359f6c7ccaa7789be76d |
|
11-May-2016 |
Petr Cech <pcech@redhat.com> |
NEGCACHE: Adding timeout to struct sss_nc_ctx
It adds timeout of negative cache to handling
struct sss_nc_ctx.
There is one change in API of negatice cache:
* int sss_ncache_init(TALLOC_CTX *memctx,
uint32_t timeout, <----- new
struct sss_nc_ctx **_ctx);
There is also one new function in common/responder:
* errno_t responder_get_neg_timeout_from_confdb(struct confdb_ctx *cdb,
uint32_t *ncache_timeout);
Resolves:
https://fedorahosted.org/sssd/ticket/2317
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
85a9d31cb955fa2d6c6ec45b4bf04b00118829fb |
|
20-Apr-2016 |
Petr Cech <pcech@redhat.com> |
NEGCACHE: Removing of condition for ttl = -1
If ttl = -1 then function sss_ncache_check_str() returns EEXIST without
checking negcache. This behaviour is out of logic.
We use ttl = 0 for permanent caching.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
42604cc8d11743febf5aa892cb3a7d3c32bfed48 |
|
23-Feb-2016 |
Lukas Slebodnik <lslebodn@redhat.com> |
Fix typos reported by lintian
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
877b92e80bde510d5cd9f03dbf01e2bcf73ab072 |
|
23-Oct-2015 |
Michal Židek <mzidek@redhat.com> |
util: Update get_next_domain's interface
Update get next domain to be able to
include disbled domains and change the
interface to accept flags instead of
multiple booleans.
Ticket:
https://fedorahosted.org/sssd/ticket/2673
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
e1aed98d7c195f844ac8e85050d04f3ca5f899b3 |
|
27-Jul-2015 |
Sumit Bose <sbose@redhat.com> |
negcache: allow domain name for UID and GID
Related to https://fedorahosted.org/sssd/ticket/2731
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
8d4dedea12e2b71f83a1b0e5f0fc5cdb706dcf98 |
|
19-Jun-2015 |
Sumit Bose <sbose@redhat.com> |
ncache: add calls for certificate based searches
Related to https://fedorahosted.org/sssd/ticket/2596
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
75e4a7753c44e9f2a7a65fad77d95e394f81c125 |
|
22-May-2015 |
Lukas Slebodnik <lslebodn@redhat.com> |
negcache: Soften condition for expired entries
Type of timestamp for entries in negative cache is time_t
which is number of *seconds* that have elapsed since 1 January 1970.
The condition for ttl was to strict so entry could be valid
from "ttl-1" to ttl e.g.
* ttl is 1 second
* entry was stored to negative cache at 1432120871.999639
stored_timestamp = 1432120871
* entry was tested few miliseconds later 1432120872.001293
current_time = 1432120872
Entry was marked as expired becuase result of condition was false
stored_timestamp + ttl < current_time
1432120871 + 1 < 1432120872
This is a reason why ./test-negcache sometime fails.
It's quite easily reproducible on slow machine or when valgrind was used.
sh$ while libtool --mode=execute valgrind ./test-negcache ; do echo OK: done
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
0d19785f9ffd9c66df5b30d208ec7b0216a9555b |
|
09-Apr-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
ncache: Add sss_ncache_reset_repopulate_permanent
This new function resets the negative cache and then re-adds the
permanent entries.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
1aa492ce890f362564bfac21f3cfb0a3e38608bd |
|
09-Apr-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
ncache: Silence critical error from filter_users when default_domain_suffix is set
When default_domain_suffix is used and filter_users is set (at least
root is always, by default), SSSD tried to add the negcache entry to the
default domain. But since the default domain is not known after start
up, adding the entries fail with a verbose error message.
This patch handles EAGAIN returned from the parsing function while
setting negcache entries gracefully and also makes the debug message in
parsing function more precise.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
d338bb46b8c03c33e6182e725911af6d778bcf00 |
|
09-Apr-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
ncache: Fix sss_ncache_reset_permanent
There was an off-by-one error in sss_ncache_reset_permanent that
prevented the reset from working.
Reviewed-by: Lukáš Slebodník <lslebodn@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> |
92dc1f40c8241e980ade3db68ddc131230f266b3 |
|
07-Jan-2014 |
Pallavi Jha <pallavikumarijha@gmail.com> |
permament is corrected to permanent |
5cd4414fce1e0eb4133dfc6fc828bf25c8a959f9 |
|
24-Sep-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Include header file in implementation module.
Declarations of public functions was in header files,
but header files was not included in implementation file. |
4865dcbead699b861c24e87b16e20fc2f6698d3f |
|
20-Sep-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
RESPONDER: Use right function prototype
Protype of function sss_ncache_check_netgr was different than
definition of function sss_ncache_check_netgr. We did not catch it,
because header file "responder/common/negcache.h" was not included in
implementation file "responder/common/negcache.c" |
a4bf85ccc902490c3b75b44532010fbb32169801 |
|
11-Sep-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Fix formating of variables with type: gid_t |
f2c346eaa486431ffa2a3adc05356159de834e2e |
|
11-Sep-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Fix formating of variables with type: uid_t |
b5afbc39c09baaef57b5300b636307e277c59d66 |
|
02-May-2013 |
Sumit Bose <sbose@redhat.com> |
Add sss_ncache_set_sid() and sss_ncache_check_sid()
Two new calls are added to allow to add SID based lookups to the
negative cache. |
4668b4765530cf37289235e483f301100cc1ae21 |
|
02-May-2013 |
Sumit Bose <sbose@redhat.com> |
Remove unused TALLOC_CTX from responder_get_domain()
Recent refactoring removed the need to copy the domain info data of
sub-domains because the related objects will not be removed from memory
anymore. |
0232747f04b650796db56fd7b487aee8a96fab03 |
|
10-Feb-2013 |
Simo Sorce <simo@redhat.com> |
Add function get_next_domain()
Use this function instead of explicitly calling domain->next
This function allows to get the next primary domain or to descend into the
subdomains and replaces also get_next_dom_or_subdom() |
1542b85f13d72329685bdd97aa879c36d11f81be |
|
01-Oct-2012 |
Sumit Bose <sbose@redhat.com> |
Add new option default_domain_suffix |
3c60433641ce2e86b9b04778c8f8652ef0d097e4 |
|
13-Jun-2012 |
Stef Walter <stefw@gnome.org> |
Make re_expression and full_name_format per domain options
* Allows different user/domain qualified names for different
domains. For example Domain\User or user@domain.
* The global re_expression and full_name_format options remain
as defaults for the domains.
* Subdomains get the re_expression and full_name_format of
their parent domain.
https://bugzilla.redhat.com/show_bug.cgi?id=811663 |
6fdde3913a11cd6148627696fa8717c34e8460fc |
|
24-Apr-2012 |
Jan Zeleny <jzeleny@redhat.com> |
Modified responder_get_domain()
Now it checks for subdomains as well as for the domain itself |
5612634d63d6c07be2b4cb5faa25528b789136a6 |
|
16-Mar-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Free entry found in negative cache |
91034cafa31fcd8a625e7c8ad35029132ac40970 |
|
27-Jan-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
NSS: Add negative cache routines for services |
b3b42c49656e192787a983aaa8b9ec744ba4cb9d |
|
16-Dec-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Use the case sensitivity flag in responders |
95d3cb8d4ff2e3e8fdc186f2ebf617fd29ddfdec |
|
03-Oct-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Use explicit base 10 for converting strings to integers
https://fedorahosted.org/sssd/ticket/1013 |
87cc48df526d01e5085a1acf736e11219be34760 |
|
15-Apr-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Add debug logging to the negative cache |
a88dba637d6b65b92e0ac23b0e5ecadfe97adaf7 |
|
13-Oct-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Add negative cache features for netgroups |
e35fa36e5c005986978cc7463f54dc29d3eacd66 |
|
08-Sep-2010 |
Jan Zeleny <jzeleny@redhat.com> |
Dead assignments cleanup in NSS responder
Various dead assignments were deleted, some return value inspections
were added.
Ticket: #588 |
a56cdc811fec8d2c0e69fce3970a1032d1e3d2a8 |
|
17-Jun-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Move setup of filter_users and filter_groups to negcache.c
Creates a new function - sss_ncache_prepopulate() - that can be
shared with other responders, such as PAM. |
ae5716d87c7b126ab01b0d4fcacd4f519585e5fb |
|
17-Jun-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Refactor the negative cache
Rename functions from nss_ncache_* to sss_ncache_*
Move negative cache to responder/common and rename as negcache.c/h |