|
|
f441eb |
From 2fc259a88be618871cea8ff8b8a13bd3e040aea4 Mon Sep 17 00:00:00 2001
|
|
|
f441eb |
From: Sumit Bose <sbose@redhat.com>
|
|
|
f441eb |
Date: Thu, 13 Jun 2019 17:23:47 +0200
|
|
|
f441eb |
Subject: [PATCH 2/4] adconn: add adcli_conn_set_krb5_context
|
|
|
f441eb |
|
|
|
f441eb |
Related to https://gitlab.freedesktop.org/realmd/adcli/issues/3
|
|
|
f441eb |
---
|
|
|
f441eb |
library/adconn.c | 13 +++++++++++++
|
|
|
f441eb |
library/adconn.h | 3 +++
|
|
|
f441eb |
2 files changed, 16 insertions(+)
|
|
|
f441eb |
|
|
|
f441eb |
diff --git a/library/adconn.c b/library/adconn.c
|
|
|
f441eb |
index f6c23d3..bcaced8 100644
|
|
|
f441eb |
--- a/library/adconn.c
|
|
|
f441eb |
+++ b/library/adconn.c
|
|
|
f441eb |
@@ -1406,6 +1406,19 @@ adcli_conn_get_krb5_context (adcli_conn *conn)
|
|
|
f441eb |
return conn->k5;
|
|
|
f441eb |
}
|
|
|
f441eb |
|
|
|
f441eb |
+void
|
|
|
f441eb |
+adcli_conn_set_krb5_context (adcli_conn *conn,
|
|
|
f441eb |
+ krb5_context k5)
|
|
|
f441eb |
+{
|
|
|
f441eb |
+ return_if_fail (conn != NULL);
|
|
|
f441eb |
+
|
|
|
f441eb |
+ if (conn->k5 != NULL) {
|
|
|
f441eb |
+ krb5_free_context (conn->k5);
|
|
|
f441eb |
+ }
|
|
|
f441eb |
+
|
|
|
f441eb |
+ conn->k5 = k5;
|
|
|
f441eb |
+}
|
|
|
f441eb |
+
|
|
|
f441eb |
const char *
|
|
|
f441eb |
adcli_conn_get_login_user (adcli_conn *conn)
|
|
|
f441eb |
{
|
|
|
f441eb |
diff --git a/library/adconn.h b/library/adconn.h
|
|
|
f441eb |
index 13cfd32..1ad5715 100644
|
|
|
f441eb |
--- a/library/adconn.h
|
|
|
f441eb |
+++ b/library/adconn.h
|
|
|
f441eb |
@@ -97,6 +97,9 @@ LDAP * adcli_conn_get_ldap_connection (adcli_conn *conn);
|
|
|
f441eb |
|
|
|
f441eb |
krb5_context adcli_conn_get_krb5_context (adcli_conn *conn);
|
|
|
f441eb |
|
|
|
f441eb |
+void adcli_conn_set_krb5_context (adcli_conn *conn,
|
|
|
f441eb |
+ krb5_context k5);
|
|
|
f441eb |
+
|
|
|
f441eb |
const char * adcli_conn_get_computer_name (adcli_conn *conn);
|
|
|
f441eb |
|
|
|
f441eb |
void adcli_conn_set_computer_name (adcli_conn *conn,
|
|
|
f441eb |
--
|
|
|
f441eb |
2.21.0
|
|
|
f441eb |
|