URL: https://github.com/SSSD/sssd/pull/560 Title: #560: NSS: close files after mmap
mzidek-rh commented: """ Hi, I do not know what issue is this patch trying to solve (I do not have Suse bugzilla account and I get Bugzilla – Access Denied), but the patch is not correct.
We can not close the mmap cache file descriptor after the memory cache context is initialized. The reason why the mmap context keeps the FD open is so that it does not need to create a new FD every time when we do some operation on the mmap cache. So the fact that the sssd_nss responder is keeping the FD open in the context is by desing.
I am not sure why the file is marked as deleted, but note that the mmap cache context is created when the sssd_nss responder is starting up, so when you manually delete the files (for example using the rm command) SSSD needs to be restarted, the old FD will be closed and new one opened. Not restarting SSSD after the mmap cache was removed with "rm" will make the mmap cache not working.
Michal """
See the full comment at https://github.com/SSSD/sssd/pull/560#issuecomment-384339932