Blame SOURCES/0005-library-add-adcli_conn_is_writeable.patch

7ddab3
From d2cdc54b0e51436c30ffaf19b0530aa446440367 Mon Sep 17 00:00:00 2001
7ddab3
From: Sumit Bose <sbose@redhat.com>
7ddab3
Date: Wed, 1 Nov 2017 16:29:19 +0100
7ddab3
Subject: [PATCH 05/23] library: add adcli_conn_is_writeable()
7ddab3
7ddab3
---
7ddab3
 library/adconn.c | 6 ++++++
7ddab3
 library/adconn.h | 2 ++
7ddab3
 2 files changed, 8 insertions(+)
7ddab3
7ddab3
diff --git a/library/adconn.c b/library/adconn.c
7ddab3
index a294dfd..67bdfd9 100644
7ddab3
--- a/library/adconn.c
7ddab3
+++ b/library/adconn.c
7ddab3
@@ -1528,3 +1528,9 @@ adcli_conn_server_has_capability (adcli_conn *conn,
7ddab3
 
7ddab3
 	return 0;
7ddab3
 }
7ddab3
+
7ddab3
+bool adcli_conn_is_writeable (adcli_conn *conn)
7ddab3
+{
7ddab3
+    disco_dance_if_necessary (conn);
7ddab3
+    return ( (conn->domain_disco->flags & ADCLI_DISCO_WRITABLE) != 0);
7ddab3
+}
7ddab3
diff --git a/library/adconn.h b/library/adconn.h
7ddab3
index a0cb1f8..ed1cc58 100644
7ddab3
--- a/library/adconn.h
7ddab3
+++ b/library/adconn.h
7ddab3
@@ -144,4 +144,6 @@ void                adcli_conn_set_krb5_conf_dir     (adcli_conn *conn,
7ddab3
 int                 adcli_conn_server_has_capability (adcli_conn *conn,
7ddab3
                                                       const char *capability);
7ddab3
 
7ddab3
+bool                adcli_conn_is_writeable          (adcli_conn *conn);
7ddab3
+
7ddab3
 #endif /* ADCONN_H_ */
7ddab3
-- 
7ddab3
2.14.4
7ddab3