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