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

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