diff options
author | Sumit Bose <sbose@redhat.com> | 2014-12-10 15:02:15 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-01-13 18:17:16 +0100 |
commit | d32b165fad7b89462f49c82349e1df5a2343afa2 (patch) | |
tree | fa9956f323ffcdc61bad18d0634127a2ea9267db | |
parent | ccff8e75940963a0f68f86efcddc37133318abfa (diff) | |
download | sssd-d32b165fad7b89462f49c82349e1df5a2343afa2.tar.gz sssd-d32b165fad7b89462f49c82349e1df5a2343afa2.tar.xz sssd-d32b165fad7b89462f49c82349e1df5a2343afa2.zip |
IPA: add get_be_acct_req_for_user_name()
Related to https://fedorahosted.org/sssd/ticket/2481
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
-rw-r--r-- | src/providers/ipa/ipa_id.h | 5 | ||||
-rw-r--r-- | src/providers/ipa/ipa_views.c | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/providers/ipa/ipa_id.h b/src/providers/ipa/ipa_id.h index 9d219f281..2bb5e0d38 100644 --- a/src/providers/ipa/ipa_id.h +++ b/src/providers/ipa/ipa_id.h @@ -87,6 +87,11 @@ errno_t get_be_acct_req_for_uuid(TALLOC_CTX *mem_ctx, const char *uuid, const char *domain_name, struct be_acct_req **_ar); +errno_t get_be_acct_req_for_user_name(TALLOC_CTX *mem_ctx, + const char *user_name, + const char *domain_name, + struct be_acct_req **_ar); + struct tevent_req *ipa_get_ad_override_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct sdap_id_ctx *sdap_id_ctx, diff --git a/src/providers/ipa/ipa_views.c b/src/providers/ipa/ipa_views.c index c768186d7..ccaea6956 100644 --- a/src/providers/ipa/ipa_views.c +++ b/src/providers/ipa/ipa_views.c @@ -177,6 +177,10 @@ static errno_t get_be_acct_req_for_xyz(TALLOC_CTX *mem_ctx, const char *val, ar->entry_type = BE_REQ_BY_UUID; ar->filter_type = BE_FILTER_UUID; break; + case BE_REQ_USER: + ar->entry_type = BE_REQ_USER; + ar->filter_type = BE_FILTER_NAME; + break; default: DEBUG(SSSDBG_CRIT_FAILURE, "Unsupported request type [%d].\n", type); talloc_free(ar); @@ -213,6 +217,15 @@ errno_t get_be_acct_req_for_uuid(TALLOC_CTX *mem_ctx, const char *uuid, _ar); } +errno_t get_be_acct_req_for_user_name(TALLOC_CTX *mem_ctx, + const char *user_name, + const char *domain_name, + struct be_acct_req **_ar) +{ + return get_be_acct_req_for_xyz(mem_ctx, user_name, domain_name, BE_REQ_USER, + _ar); +} + struct ipa_get_ad_override_state { struct tevent_context *ev; struct sdap_id_ctx *sdap_id_ctx; |