|
|
b2d430 |
From ec460578800d850e5a4f9d522920db1d79147dd6 Mon Sep 17 00:00:00 2001
|
|
|
b2d430 |
From: Sumit Bose <sbose@redhat.com>
|
|
|
b2d430 |
Date: Fri, 1 Jul 2016 17:58:02 +0200
|
|
|
b2d430 |
Subject: [PATCH 26/27] IPA: add ipa_init_get_krb5_auth_ctx()
|
|
|
b2d430 |
|
|
|
b2d430 |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
b2d430 |
(cherry picked from commit 17dccc24e4490dfda2820d46b62a029b14ba2359)
|
|
|
b2d430 |
---
|
|
|
b2d430 |
src/providers/ipa/ipa_common.h | 5 +++++
|
|
|
b2d430 |
src/providers/ipa/ipa_init.c | 13 +++++++++++++
|
|
|
b2d430 |
2 files changed, 18 insertions(+)
|
|
|
b2d430 |
|
|
|
b2d430 |
diff --git a/src/providers/ipa/ipa_common.h b/src/providers/ipa/ipa_common.h
|
|
|
b2d430 |
index 939c898e1a690806abd37493aabfb7bdec3e87a9..add9df87692c732b3567eee5584e7698991c66ca 100644
|
|
|
b2d430 |
--- a/src/providers/ipa/ipa_common.h
|
|
|
b2d430 |
+++ b/src/providers/ipa/ipa_common.h
|
|
|
b2d430 |
@@ -34,6 +34,8 @@ struct ipa_service {
|
|
|
b2d430 |
struct krb5_service *krb5_service;
|
|
|
b2d430 |
};
|
|
|
b2d430 |
|
|
|
b2d430 |
+struct ipa_init_ctx;
|
|
|
b2d430 |
+
|
|
|
b2d430 |
enum ipa_basic_opt {
|
|
|
b2d430 |
IPA_DOMAIN = 0,
|
|
|
b2d430 |
IPA_SERVER,
|
|
|
b2d430 |
@@ -287,4 +289,7 @@ errno_t ipa_idmap_get_ranges_from_sysdb(struct sdap_idmap_ctx *idmap_ctx,
|
|
|
b2d430 |
errno_t ipa_idmap_init(TALLOC_CTX *mem_ctx,
|
|
|
b2d430 |
struct sdap_id_ctx *id_ctx,
|
|
|
b2d430 |
struct sdap_idmap_ctx **_idmap_ctx);
|
|
|
b2d430 |
+
|
|
|
b2d430 |
+
|
|
|
b2d430 |
+struct krb5_ctx *ipa_init_get_krb5_auth_ctx(void *data);
|
|
|
b2d430 |
#endif /* _IPA_COMMON_H_ */
|
|
|
b2d430 |
diff --git a/src/providers/ipa/ipa_init.c b/src/providers/ipa/ipa_init.c
|
|
|
b2d430 |
index d3093b3b5d269e6acd29f35560cf8299017c72b5..959cdb4a7c40c1be03dd1e7c66dee6e65ca76607 100644
|
|
|
b2d430 |
--- a/src/providers/ipa/ipa_init.c
|
|
|
b2d430 |
+++ b/src/providers/ipa/ipa_init.c
|
|
|
b2d430 |
@@ -58,6 +58,19 @@ struct ipa_init_ctx {
|
|
|
b2d430 |
struct ipa_auth_ctx *auth_ctx;
|
|
|
b2d430 |
};
|
|
|
b2d430 |
|
|
|
b2d430 |
+
|
|
|
b2d430 |
+struct krb5_ctx *ipa_init_get_krb5_auth_ctx(void *data)
|
|
|
b2d430 |
+{
|
|
|
b2d430 |
+ struct ipa_init_ctx *ipa_init_ctx;
|
|
|
b2d430 |
+
|
|
|
b2d430 |
+ ipa_init_ctx = talloc_get_type(data, struct ipa_init_ctx);
|
|
|
b2d430 |
+ if (ipa_init_ctx == NULL || ipa_init_ctx->auth_ctx == NULL) {
|
|
|
b2d430 |
+ return NULL;
|
|
|
b2d430 |
+ }
|
|
|
b2d430 |
+
|
|
|
b2d430 |
+ return ipa_init_ctx->auth_ctx->krb5_auth_ctx;
|
|
|
b2d430 |
+}
|
|
|
b2d430 |
+
|
|
|
b2d430 |
static bool srv_in_server_list(const char *servers)
|
|
|
b2d430 |
{
|
|
|
b2d430 |
TALLOC_CTX *tmp_ctx;
|
|
|
b2d430 |
--
|
|
|
b2d430 |
2.4.11
|
|
|
b2d430 |
|