[SSSD] [PATCHES] sss_userdel and sss_groupdel remove entries from fastcache
Jakub Hrozek
jhrozek at redhat.com
Thu Dec 13 19:55:05 UTC 2012
On Thu, Dec 13, 2012 at 02:16:25PM -0500, Simo Sorce wrote:
> On Thu, 2012-12-13 at 13:19 -0500, Simo Sorce wrote:
> > On Thu, 2012-12-13 at 18:06 +0100, Michal Židek wrote:
> > > Patch 1: (sssd_nss part) In functions nss_cmd_getXXnam, if working with
> > > a local domain and no results were found in sysdb, the entries are
> > > invalidated in memory cache too.
> >
> > Ok in the general case this patch would be sort of useless because if
> > you reach sssd_nss it means the mmap cache is already expired and not
> > used. But I see you use this in patch 2, see comments below on that.
> >
> > > Patch 2: (tools part) Tools sss_userdel and sss_groupdel send
> > > SSS_NSS_GETXXNAM requests after the entry was removed from sysdb. With
> > > the first patch, this invalidates the entry in memory cache.
> > >
> > > Patches are in attachment.
> >
> > Hi Michal I see wht you use getpwnam/getgrnam, but doesn't it kind of
> > defeat the purpose of userdel/groupdel ?
> >
> > If you use those functions then in most cases you are going to actually
> > update the user in the cache, not delete it. Is this intentional ? It
> > looks backwards given you are calling a 'del' function.
> >
> > It looks to me that what you really want is an explicit delete function
> > in sssd_nss that you can call from the cmdline, is that correct ?
>
> Ha now I get what I was missing.
> Jakub reminded me this is for the LOCAL provider. So in that case there
> is obviously nothing to refresh.
>
> With that in mind, full ACK.
>
> Simo.
Pushed to master and sssd-1-9
More information about the sssd-devel
mailing list