summaryrefslogtreecommitdiffstats
path: root/src/responder/nss/nsssrv_mmap_cache.c
Commit message (Collapse)AuthorAgeFilesLines
* File descriptor leak in nss responder.sssd-1.9.2-112.el6Michal Zidek2013-08-091-18/+43
| | | | | | | | | File descriptors leaked every time sss_mmap_cache_reinit was called and also the old memory cache was still maped in memory (munmap was not called). This patch adds destructor for memory cache context to call close() and munmap() automaticly. https://fedorahosted.org/sssd/ticket/1826
* Debug message in sss_mc_create_file.Michal Zidek2013-08-091-0/+5
| | | | | | This patch adds debug message for the case if sssd fails to open old mc file for some other reason than the file does not exist.
* mmap cache: invalidate cache on fatal errorSimo Sorce2012-12-201-6/+26
| | | | | | | | | | If a fatal EFAULT error is returned by the internal function that frees used memory invalidate the whole cache and reinit it. This way we avoid further corruption and insure clients see consistent data. Also insure we use the right context in init() and we use talloc_zfree() in reinit so that if the init() later fails we do not leave around a pointer to free memory in the callers.
* Carefully check records when forcibly invalidatingSimo Sorce2012-12-201-18/+101
| | | | | | | | | | | | We should never try to invalidate an already invalid record as internal pointers will not be consistent. Carefully test that the record really is valid when we are fishing for free space, and properly invalidate records or return a fatal error if something goes wrong. In order to make the code more robust always invalidate the whole data space on initialization by setting all bits to 1, and make sure to invalidate the whole last allocated slot by converting rec->len to the number of slots instead of just the space used.
* Update free table when records are invalidated.Simo Sorce2012-12-201-14/+23
| | | | | We were holding up slots when entries were invalidated directly an not through our primitive garbage collection scheme.
* nss_mc: Add extra checks when dereferencing recordsSimo Sorce2012-12-201-0/+12
| | | | | | | Although it should enver happen that we pass in an invalid hash it is always better to just not do anything than access memory ouf of the hash table. It can lead to segfaults, or worse referencing memory that should not be touched.
* NSS: Fix the error handler in sss_mc_create_fileJakub Hrozek2012-12-141-10/+16
| | | | | | | https://fedorahosted.org/sssd/ticket/1704 The function is short enough so that we can simply stick with return and release resources before returning as appropriate.
* mmap cache: public functions to invalidate recordsSimo Sorce2012-12-061-0/+125
| | | | | | These functions can be called from the nss responder to invalidate records that have ceased to exist or that need to be refreshed the first time an application needs them.
* sss_cache: Remove fastcache even if sssd is not running.Michal Zidek2012-11-061-3/+23
| | | | https://fedorahosted.org/sssd/ticket/1584
* sss_cache tool invalidates records in memory cache.Michal Zidek2012-09-241-0/+46
|
* Allow fast memcache timeout to be configurableJan Zeleny2012-06-101-2/+2
| | | | https://fedorahosted.org/sssd/ticket/1318
* Convert read and write operations to sss_atomic_readJakub Hrozek2012-04-201-10/+10
| | | | https://fedorahosted.org/sssd/ticket/1209
* NSS: Fix debug messageStephen Gallagher2012-03-201-0/+2
|
* nsssrv: add handling of memory cache group mapSimo Sorce2012-03-191-0/+70
|
* nsssrv: add handling of memory cache passwd mapSimo Sorce2012-03-191-0/+76
|
* nsssrv: Add memory cache record handling utilsSimo Sorce2012-03-191-0/+279
|
* nsssrv: shared memory cache server initializationSimo Sorce2012-03-191-0/+300