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

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