URL:
https://github.com/SSSD/sssd/pull/39
Title: #39: RESPONDER: Enable sudoRule in case insen. domains
celestian commented:
"""
Hi,
I have question on cache_req_recv():
https://github.com/SSSD/sssd/blob/master/src/responder/common/responder_c...
```
errno_t cache_req_recv(TALLOC_CTX *mem_ctx,
struct tevent_req *req,
struct ldb_result **_result,
struct sss_domain_info **_domain,
char **_name)
```
How you can see the function has three return parameters.
Is there any connection between _result and _name?
I assume that _result is whole data set and _name could be only name from this data set.
What I see (in implemenation), _name is created like
```
name = talloc_strdup(mem_ctx, state->cr->data->name.lookup);
```
So we take it from state->cr, and it is connected to input data by this definition:
```
struct cache_req_state {
/* input data */
struct tevent_context *ev;
struct resp_ctx *rctx;
struct sss_nc_ctx *ncache;
int cache_refresh_percent;
struct cache_req *cr;
/* work data */
struct ldb_result *result;
struct sss_domain_info *domain;
struct sss_domain_info *selected_domain;
bool check_next;
};
```
Is there a bug and _name should be created from result?
Explanation why am I asking. I see that this function is used for obtaining the user name.
It returns (via _name) login name, which is lower cased. But if we look to the _result (it
is not used in code now), there is real user name (i.e. Administrator@...).
"""
See the full comment at
https://github.com/SSSD/sssd/pull/39#issuecomment-252177317