Patch 0001: I haven't used this one after all, but I still think it is nice to have. It reduces amount of code duplication.
Patch 0005:
- /* Try to get group SID and assign it a domain */
- group_sid = ldb_msg_find_attr_as_string(group, SYSDB_SID_STR, NULL);
- if (group_sid == NULL) {
I'm not sure if this branch isn't a dead code, but I kept it there because it mimics current behaviour.
/* We will look it up in main domain. */domain = state->ctx->domain;- } else {
domain = find_subdomain_by_sid(state->ctx->domain, group_sid);if (domain == NULL) {DEBUG(SSSDBG_CRIT_FAILURE, ("There is no domain information for ""SID %s\n", group_sid));return ENOENT;}- }