History log of /sssd/src/tests/cmocka/test_negcache.c
Revision Date Author Comments Expand
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>

c02b8482375837b57cb618ed56d4bede0e006d9d 18-Jun-2016 Pavel Březina <pbrezina@redhat.com>

Remove braces from DEBUG statements Reviewed-by: Lukáš Slebodník <lslebodn@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>

c34f3f7d2a4d9f50109d13cd7c9f2cbb9a11b3d0 11-May-2016 Petr Cech <pcech@redhat.com>

RESPONDER: Removing ncache from nss_ctx This patch switches ncache from nss_ctx to resp_ctx. Reviewed-by: Pavel Březina <pbrezina@redhat.com>

4f87f99f95891ebc0814e4566fa2defb4359b008 11-May-2016 Petr Cech <pcech@redhat.com>

RESPONDER: Removing neg_timeout from nss responder Timeout of negative cahce is handled by internal negative cache context. This patch removes neg_timeout from struct nss_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>

9face844e3063b61ab19e1d82bbf3d9f9de76ac7 05-May-2016 Petr Cech <pcech@redhat.com>

TEST: Removing duplication of mock_rctx There were duplicaton of mock_rctx(). Reviewed-by: Lukáš Slebodník <lslebodn@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>

ee4be57409e157af0a57228605ef8e07f6d4fa1b 20-Apr-2016 Petr Cech <pcech@redhat.com>

NEGCACHE: Fixing typo in test_sss_ncache_gid() There were sss_ncache_*_uid() functions instead of sss_ncache_*_gid() functions. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>

50c9d542e8bf641412debaa82a4dcf67ddb72258 18-Sep-2015 Lukas Slebodnik <lslebodn@redhat.com>

tests: Use unique name for TEST_PATH We had a cases in patch where two tests were using the same TEST_PATH and therefore they were stepping each other to the same files which caused failures. These failures are not easy to reproduce. This patch uses macro BASE_FILE_STEM for unique name. It should prevent copy&paste problem resulting to intermittent failures. @see also https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html 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>

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>

4e5e846de22407f825fe3b4040d79606818a2419 11-Mar-2015 Jakub Hrozek <jhrozek@redhat.com>

tests: convert all unit tests to cmocka 1.0 or later All tests now use the cmocka-1.0-compatible API. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>

cb4742876508a08ba90c82466c9dba708e4bf999 09-Jan-2015 Pavel Březina <pbrezina@redhat.com>

tests: remove code duplication in single domain cleanup Reviewed-by: Michal Židek <mzidek@redhat.com>

1d3cb26bfcd482e8b9718933eea1037eba1c49d7 12-Mar-2014 Lukas Slebodnik <lslebodn@redhat.com>

TESTS: Remove unused macros Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

dd191498f56ce10f596308cdd0fad344af0d86b9 12-Mar-2014 Lukas Slebodnik <lslebodn@redhat.com>

TEST: Do not clean up if test fail. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

1f5a03646ce55efa2ea415248ed5fe6375139305 12-Mar-2014 Lukas Slebodnik <lslebodn@redhat.com>

TEST: Use right domain name in negcache test Directory tests_ncache was not removed after negcache test, because sysdb cache had different name and was not removed in the function test_dom_suite_cleanup. [sssd] [test_dom_suite_cleanup] (0x0020): Could not delete the test dir (39) (Directory not empty) Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

a95c006f748fa9df0dd81509b51974133d2786af 12-Mar-2014 Lukas Slebodnik <lslebodn@redhat.com>

TEST: Remove unused argument sysdb_path Name of sysdb file is automatically generated from domain name and db_path in function sysdb_domain_init. talloc_asprintf is called with arguments "%s/cache_%s.ldb", db_path, dom->name Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

b93fe4ec821f997fba5058bf5e76ff77c3a39026 06-Mar-2014 Lukas Slebodnik <lslebodn@redhat.com>

TEST: Use unique directory for negcache test nss-srv-tests and test-negcache wrote temporary files to the same subdirectory 'tests_nss'. There could be a race condition when tests ran in parallel. The first test could remove directory which the second one wanted to use. [ldb] (0x0020): Unable to open tdb 'tests_nss/test_nss_conf.ldb' [ldb] (0x0020): Failed to connect to 'tests_nss/test_nss_conf.ldb' with backend 'tdb': Unable to open tdb 'tests_nss/test_nss_conf.ldb' [confdb_init] (0x0010): Unable to open config database [tests_nss/test_nss_conf.ldb] [create_dom_test_ctx] (0x0020): confdb_init failed: 5 Reviewed-by: Michal Žídek <mzidek@redhat.com>

d00ffd2cb4e2f17c75b466178bb645b5c9317909 05-Mar-2014 Pallavi Jha <pallavikumarijha@gmail.com>

Unit-test-for-negcache-module-added Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>