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

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