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

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