ehlo,
The simple reproducer is to use getent passwd,group with non-existing entry.
Without the patch you will see that "/var/lib/sss/mc/passwd" is opened
twice. Onece with mode "rw" opened by sssd_nss and the 2nd time
with "r-" opened by sssd-client (getpwnam, getpwuid, getgrnam, getgrgid)
LS