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

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