diff options
-rw-r--r-- | src/db/sysdb.c | 3 | ||||
-rw-r--r-- | src/db/sysdb.h | 1 | ||||
-rw-r--r-- | src/providers/ldap/sdap_async_initgroups.c | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c index 65a0140f..7d6ef190 100644 --- a/src/db/sysdb.c +++ b/src/db/sysdb.c @@ -1807,6 +1807,7 @@ done: errno_t sysdb_get_real_name(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, const char *name, const char **_cname) { @@ -1820,7 +1821,7 @@ errno_t sysdb_get_real_name(TALLOC_CTX *mem_ctx, return ENOMEM; } - ret = sysdb_getpwnam(tmp_ctx, sysdb, sysdb->domain, name, &res); + ret = sysdb_getpwnam(tmp_ctx, sysdb, domain, name, &res); if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, ("Cannot canonicalize username\n")); goto done; diff --git a/src/db/sysdb.h b/src/db/sysdb.h index df0e1d37..d22186cb 100644 --- a/src/db/sysdb.h +++ b/src/db/sysdb.h @@ -309,6 +309,7 @@ errno_t sysdb_attrs_primary_name_list(struct sysdb_ctx *sysdb, char ***name_list); errno_t sysdb_get_real_name(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, const char *name, const char **_cname); diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c index a489ca6d..698c9e1c 100644 --- a/src/providers/ldap/sdap_async_initgroups.c +++ b/src/providers/ldap/sdap_async_initgroups.c @@ -2711,7 +2711,8 @@ static void sdap_get_initgr_user(struct tevent_req *subreq) } in_transaction = false; - ret = sysdb_get_real_name(state, state->sysdb, state->name, &cname); + ret = sysdb_get_real_name(state, state->sysdb, + state->dom, state->name, &cname); if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, ("Cannot canonicalize username\n")); tevent_req_error(req, ret); |