summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2016-07-01 17:58:02 +0200
committerJakub Hrozek <jhrozek@redhat.com>2016-07-18 17:10:59 +0200
commit17dccc24e4490dfda2820d46b62a029b14ba2359 (patch)
tree1339ac1aab70e8d60b9b95de12b410d5f542431c
parent35fa5a83ce8badf6bc868937047f44c3f32b7c28 (diff)
downloadsssd-17dccc24e4490dfda2820d46b62a029b14ba2359.tar.gz
sssd-17dccc24e4490dfda2820d46b62a029b14ba2359.tar.xz
sssd-17dccc24e4490dfda2820d46b62a029b14ba2359.zip
IPA: add ipa_init_get_krb5_auth_ctx()
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
-rw-r--r--src/providers/ipa/ipa_common.h5
-rw-r--r--src/providers/ipa/ipa_init.c13
2 files changed, 18 insertions, 0 deletions
diff --git a/src/providers/ipa/ipa_common.h b/src/providers/ipa/ipa_common.h
index 939c898e1..add9df876 100644
--- a/src/providers/ipa/ipa_common.h
+++ b/src/providers/ipa/ipa_common.h
@@ -34,6 +34,8 @@ struct ipa_service {
struct krb5_service *krb5_service;
};
+struct ipa_init_ctx;
+
enum ipa_basic_opt {
IPA_DOMAIN = 0,
IPA_SERVER,
@@ -287,4 +289,7 @@ errno_t ipa_idmap_get_ranges_from_sysdb(struct sdap_idmap_ctx *idmap_ctx,
errno_t ipa_idmap_init(TALLOC_CTX *mem_ctx,
struct sdap_id_ctx *id_ctx,
struct sdap_idmap_ctx **_idmap_ctx);
+
+
+struct krb5_ctx *ipa_init_get_krb5_auth_ctx(void *data);
#endif /* _IPA_COMMON_H_ */
diff --git a/src/providers/ipa/ipa_init.c b/src/providers/ipa/ipa_init.c
index 6cc34deda..5afda75cd 100644
--- a/src/providers/ipa/ipa_init.c
+++ b/src/providers/ipa/ipa_init.c
@@ -58,6 +58,19 @@ struct ipa_init_ctx {
struct ipa_auth_ctx *auth_ctx;
};
+
+struct krb5_ctx *ipa_init_get_krb5_auth_ctx(void *data)
+{
+ struct ipa_init_ctx *ipa_init_ctx;
+
+ ipa_init_ctx = talloc_get_type(data, struct ipa_init_ctx);
+ if (ipa_init_ctx == NULL || ipa_init_ctx->auth_ctx == NULL) {
+ return NULL;
+ }
+
+ return ipa_init_ctx->auth_ctx->krb5_auth_ctx;
+}
+
static bool srv_in_server_list(const char *servers)
{
TALLOC_CTX *tmp_ctx;