Blame SOURCES/0006-library-add-adcli_conn_get_domain_sid.patch

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