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

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