|
|
905b4d |
From 6c8052a571a74ab67d371a624e561ecdc50744af Mon Sep 17 00:00:00 2001
|
|
|
905b4d |
From: Sumit Bose <sbose@redhat.com>
|
|
|
905b4d |
Date: Wed, 10 Dec 2014 15:02:15 +0100
|
|
|
905b4d |
Subject: [PATCH 157/160] IPA: add get_be_acct_req_for_user_name()
|
|
|
905b4d |
|
|
|
905b4d |
Related to https://fedorahosted.org/sssd/ticket/2481
|
|
|
905b4d |
|
|
|
905b4d |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
905b4d |
(cherry picked from commit d32b165fad7b89462f49c82349e1df5a2343afa2)
|
|
|
905b4d |
---
|
|
|
905b4d |
src/providers/ipa/ipa_id.h | 5 +++++
|
|
|
905b4d |
src/providers/ipa/ipa_views.c | 13 +++++++++++++
|
|
|
905b4d |
2 files changed, 18 insertions(+)
|
|
|
905b4d |
|
|
|
905b4d |
diff --git a/src/providers/ipa/ipa_id.h b/src/providers/ipa/ipa_id.h
|
|
|
905b4d |
index 9d219f281847df0ba4ac24061e598eb6915f9c38..2bb5e0d38f42d4bbb04854dfb04804fecf6257e8 100644
|
|
|
905b4d |
--- a/src/providers/ipa/ipa_id.h
|
|
|
905b4d |
+++ b/src/providers/ipa/ipa_id.h
|
|
|
905b4d |
@@ -87,6 +87,11 @@ errno_t get_be_acct_req_for_uuid(TALLOC_CTX *mem_ctx, const char *uuid,
|
|
|
905b4d |
const char *domain_name,
|
|
|
905b4d |
struct be_acct_req **_ar);
|
|
|
905b4d |
|
|
|
905b4d |
+errno_t get_be_acct_req_for_user_name(TALLOC_CTX *mem_ctx,
|
|
|
905b4d |
+ const char *user_name,
|
|
|
905b4d |
+ const char *domain_name,
|
|
|
905b4d |
+ struct be_acct_req **_ar);
|
|
|
905b4d |
+
|
|
|
905b4d |
struct tevent_req *ipa_get_ad_override_send(TALLOC_CTX *mem_ctx,
|
|
|
905b4d |
struct tevent_context *ev,
|
|
|
905b4d |
struct sdap_id_ctx *sdap_id_ctx,
|
|
|
905b4d |
diff --git a/src/providers/ipa/ipa_views.c b/src/providers/ipa/ipa_views.c
|
|
|
905b4d |
index c768186d7cf5e5a997e2ca27a167b62c8dc99b3f..ccaea69563728a5cecc202709da5dab51747c040 100644
|
|
|
905b4d |
--- a/src/providers/ipa/ipa_views.c
|
|
|
905b4d |
+++ b/src/providers/ipa/ipa_views.c
|
|
|
905b4d |
@@ -177,6 +177,10 @@ static errno_t get_be_acct_req_for_xyz(TALLOC_CTX *mem_ctx, const char *val,
|
|
|
905b4d |
ar->entry_type = BE_REQ_BY_UUID;
|
|
|
905b4d |
ar->filter_type = BE_FILTER_UUID;
|
|
|
905b4d |
break;
|
|
|
905b4d |
+ case BE_REQ_USER:
|
|
|
905b4d |
+ ar->entry_type = BE_REQ_USER;
|
|
|
905b4d |
+ ar->filter_type = BE_FILTER_NAME;
|
|
|
905b4d |
+ break;
|
|
|
905b4d |
default:
|
|
|
905b4d |
DEBUG(SSSDBG_CRIT_FAILURE, "Unsupported request type [%d].\n", type);
|
|
|
905b4d |
talloc_free(ar);
|
|
|
905b4d |
@@ -213,6 +217,15 @@ errno_t get_be_acct_req_for_uuid(TALLOC_CTX *mem_ctx, const char *uuid,
|
|
|
905b4d |
_ar);
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
+errno_t get_be_acct_req_for_user_name(TALLOC_CTX *mem_ctx,
|
|
|
905b4d |
+ const char *user_name,
|
|
|
905b4d |
+ const char *domain_name,
|
|
|
905b4d |
+ struct be_acct_req **_ar)
|
|
|
905b4d |
+{
|
|
|
905b4d |
+ return get_be_acct_req_for_xyz(mem_ctx, user_name, domain_name, BE_REQ_USER,
|
|
|
905b4d |
+ _ar);
|
|
|
905b4d |
+}
|
|
|
905b4d |
+
|
|
|
905b4d |
struct ipa_get_ad_override_state {
|
|
|
905b4d |
struct tevent_context *ev;
|
|
|
905b4d |
struct sdap_id_ctx *sdap_id_ctx;
|
|
|
905b4d |
--
|
|
|
905b4d |
2.1.0
|
|
|
905b4d |
|