URL: https://github.com/SSSD/sssd/pull/485
Title: #485:  Support alternative sources for the files provider 

pbrezina commented:
"""
> @pbrezina I updated the PR to remove the call to sf_enum_groups() inside 
> sf_enum_users().

I think you misunderstood me. I meant that the code should be kept because it 
solves a valid use case (see @jhrozek's comment) and a ticket should be created 
to resolve the negative cache issue.

Also I noticed this: The following code should be in sysdb transation (same for 
users). By moving `delete_all_groups` from `sf_enum_groups` to the `inotify` 
callback, you removed the code out of transaction. So if something goes wrong 
when storing users, we end up with empty cache.
```c
    ret = delete_all_groups(id_ctx->domain);
    if (ret != EOK) {
        return ret;
    }

    /* All users were deleted, therefore we need to enumerate each file again */
    for (size_t i = 0; i < id_ctx->num_group_files; i++)
    {
        ret = sf_enum_groups(id_ctx, id_ctx->group_files[i]);
    }
```
Also now the existing groups/users are not deleted in `startup_enum_files` for 
the same reason.
"""

See the full comment at 
https://github.com/SSSD/sssd/pull/485#issuecomment-360416955
_______________________________________________
sssd-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to