|
|
59dcbd |
From f2d54486b911974e396255a5e27003abbf7268ab Mon Sep 17 00:00:00 2001
|
|
|
59dcbd |
From: Sumit Bose <sbose@redhat.com>
|
|
|
59dcbd |
Date: Tue, 30 Jan 2018 18:23:03 +0100
|
|
|
59dcbd |
Subject: [PATCH 6/9] library: add adcli_conn_get_domain_sid()
|
|
|
59dcbd |
|
|
|
59dcbd |
https://bugs.freedesktop.org/show_bug.cgi?id=100118
|
|
|
59dcbd |
|
|
|
59dcbd |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
59dcbd |
---
|
|
|
59dcbd |
library/adconn.c | 8 ++++++++
|
|
|
59dcbd |
library/adconn.h | 2 ++
|
|
|
59dcbd |
tools/computer.c | 1 +
|
|
|
59dcbd |
3 files changed, 11 insertions(+)
|
|
|
59dcbd |
|
|
|
59dcbd |
diff --git a/library/adconn.c b/library/adconn.c
|
|
|
59dcbd |
index 6b84b88..d2fb1d5 100644
|
|
|
59dcbd |
--- a/library/adconn.c
|
|
|
59dcbd |
+++ b/library/adconn.c
|
|
|
59dcbd |
@@ -1355,6 +1355,14 @@ adcli_conn_get_domain_short (adcli_conn *conn)
|
|
|
59dcbd |
return conn->domain_short;
|
|
|
59dcbd |
}
|
|
|
59dcbd |
|
|
|
59dcbd |
+const char *
|
|
|
59dcbd |
+adcli_conn_get_domain_sid (adcli_conn *conn)
|
|
|
59dcbd |
+{
|
|
|
59dcbd |
+ return_val_if_fail (conn != NULL, NULL);
|
|
|
59dcbd |
+ return conn->domain_sid;
|
|
|
59dcbd |
+}
|
|
|
59dcbd |
+
|
|
|
59dcbd |
+
|
|
|
59dcbd |
LDAP *
|
|
|
59dcbd |
adcli_conn_get_ldap_connection (adcli_conn *conn)
|
|
|
59dcbd |
{
|
|
|
59dcbd |
diff --git a/library/adconn.h b/library/adconn.h
|
|
|
59dcbd |
index ed1cc58..13cfd32 100644
|
|
|
59dcbd |
--- a/library/adconn.h
|
|
|
59dcbd |
+++ b/library/adconn.h
|
|
|
59dcbd |
@@ -91,6 +91,8 @@ void adcli_conn_set_domain_controller (adcli_conn *conn,
|
|
|
59dcbd |
|
|
|
59dcbd |
const char * adcli_conn_get_domain_short (adcli_conn *conn);
|
|
|
59dcbd |
|
|
|
59dcbd |
+const char * adcli_conn_get_domain_sid (adcli_conn *conn);
|
|
|
59dcbd |
+
|
|
|
59dcbd |
LDAP * adcli_conn_get_ldap_connection (adcli_conn *conn);
|
|
|
59dcbd |
|
|
|
59dcbd |
krb5_context adcli_conn_get_krb5_context (adcli_conn *conn);
|
|
|
59dcbd |
diff --git a/tools/computer.c b/tools/computer.c
|
|
|
59dcbd |
index d8a58c9..a3d0f03 100644
|
|
|
59dcbd |
--- a/tools/computer.c
|
|
|
59dcbd |
+++ b/tools/computer.c
|
|
|
59dcbd |
@@ -43,6 +43,7 @@ dump_details (adcli_conn *conn,
|
|
|
59dcbd |
printf ("domain-realm = %s\n", adcli_conn_get_domain_realm (conn));
|
|
|
59dcbd |
printf ("domain-controller = %s\n", adcli_conn_get_domain_controller (conn));
|
|
|
59dcbd |
printf ("domain-short = %s\n", adcli_conn_get_domain_short (conn));
|
|
|
59dcbd |
+ printf ("domain-SID = %s\n", adcli_conn_get_domain_sid (conn));
|
|
|
59dcbd |
printf ("naming-context = %s\n", adcli_conn_get_default_naming_context (conn));
|
|
|
59dcbd |
printf ("domain-ou = %s\n", adcli_enroll_get_domain_ou (enroll));
|
|
|
59dcbd |
|
|
|
59dcbd |
--
|
|
|
59dcbd |
2.14.4
|
|
|
59dcbd |
|