|
|
ced1f5 |
From c6e02c84a567127b37b1c036abf7952f1d36783a Mon Sep 17 00:00:00 2001
|
|
|
ced1f5 |
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
|
|
|
ced1f5 |
Date: Thu, 2 Nov 2017 14:59:57 +0100
|
|
|
ced1f5 |
Subject: [PATCH 52/57] ifp: add method to refresh access control rules in
|
|
|
ced1f5 |
domain
|
|
|
ced1f5 |
MIME-Version: 1.0
|
|
|
ced1f5 |
Content-Type: text/plain; charset=UTF-8
|
|
|
ced1f5 |
Content-Transfer-Encoding: 8bit
|
|
|
ced1f5 |
|
|
|
ced1f5 |
Related:
|
|
|
ced1f5 |
https://pagure.io/SSSD/sssd/issue/2840
|
|
|
ced1f5 |
|
|
|
ced1f5 |
Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com>
|
|
|
ced1f5 |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
ced1f5 |
(cherry picked from commit c6cf752337f5977ce3753b7113dc1a2342c86319)
|
|
|
ced1f5 |
---
|
|
|
ced1f5 |
src/responder/ifp/ifp_domains.c | 22 ++++++++++++++++++++++
|
|
|
ced1f5 |
src/responder/ifp/ifp_domains.h | 3 +++
|
|
|
ced1f5 |
src/responder/ifp/ifp_iface.c | 3 ++-
|
|
|
ced1f5 |
src/responder/ifp/ifp_iface.xml | 3 +++
|
|
|
ced1f5 |
src/responder/ifp/ifp_iface_generated.c | 13 +++++++++++++
|
|
|
ced1f5 |
src/responder/ifp/ifp_iface_generated.h | 5 +++++
|
|
|
ced1f5 |
6 files changed, 48 insertions(+), 1 deletion(-)
|
|
|
ced1f5 |
|
|
|
ced1f5 |
diff --git a/src/responder/ifp/ifp_domains.c b/src/responder/ifp/ifp_domains.c
|
|
|
ced1f5 |
index 977bbfcbe818f08873ce072d34fdcf900cabf52f..cd7e2fc7aeff5467514269e5b078b0da88ab4f50 100644
|
|
|
ced1f5 |
--- a/src/responder/ifp/ifp_domains.c
|
|
|
ced1f5 |
+++ b/src/responder/ifp/ifp_domains.c
|
|
|
ced1f5 |
@@ -630,3 +630,25 @@ int ifp_domains_domain_list_servers(struct sbus_request *sbus_req,
|
|
|
ced1f5 |
|
|
|
ced1f5 |
return EOK;
|
|
|
ced1f5 |
}
|
|
|
ced1f5 |
+
|
|
|
ced1f5 |
+int ifp_domains_domain_refresh_access_rules(struct sbus_request *sbus_req,
|
|
|
ced1f5 |
+ void *data)
|
|
|
ced1f5 |
+{
|
|
|
ced1f5 |
+ struct ifp_ctx *ifp_ctx;
|
|
|
ced1f5 |
+ struct sss_domain_info *dom;
|
|
|
ced1f5 |
+
|
|
|
ced1f5 |
+ ifp_ctx = talloc_get_type(data, struct ifp_ctx);
|
|
|
ced1f5 |
+
|
|
|
ced1f5 |
+ dom = get_domain_info_from_req(sbus_req, data);
|
|
|
ced1f5 |
+ if (dom == NULL) {
|
|
|
ced1f5 |
+ sbus_request_reply_error(sbus_req, SBUS_ERROR_UNKNOWN_DOMAIN,
|
|
|
ced1f5 |
+ "Unknown domain");
|
|
|
ced1f5 |
+ return EOK;
|
|
|
ced1f5 |
+ }
|
|
|
ced1f5 |
+
|
|
|
ced1f5 |
+ rdp_message_send_and_reply(sbus_req, ifp_ctx->rctx, dom, DP_PATH,
|
|
|
ced1f5 |
+ IFACE_DP_ACCESS_CONTROL,
|
|
|
ced1f5 |
+ IFACE_DP_ACCESS_CONTROL_REFRESHRULES);
|
|
|
ced1f5 |
+
|
|
|
ced1f5 |
+ return EOK;
|
|
|
ced1f5 |
+}
|
|
|
ced1f5 |
diff --git a/src/responder/ifp/ifp_domains.h b/src/responder/ifp/ifp_domains.h
|
|
|
ced1f5 |
index 621ba6158e285911cb8298cef212219dfd3afec8..d8cc9d34c92cd04b6db432c1fc0e179a717001da 100644
|
|
|
ced1f5 |
--- a/src/responder/ifp/ifp_domains.h
|
|
|
ced1f5 |
+++ b/src/responder/ifp/ifp_domains.h
|
|
|
ced1f5 |
@@ -108,4 +108,7 @@ int ifp_domains_domain_list_servers(struct sbus_request *sbus_req,
|
|
|
ced1f5 |
void *data,
|
|
|
ced1f5 |
const char *service);
|
|
|
ced1f5 |
|
|
|
ced1f5 |
+int ifp_domains_domain_refresh_access_rules(struct sbus_request *sbus_req,
|
|
|
ced1f5 |
+ void *data);
|
|
|
ced1f5 |
+
|
|
|
ced1f5 |
#endif /* IFP_DOMAINS_H_ */
|
|
|
ced1f5 |
diff --git a/src/responder/ifp/ifp_iface.c b/src/responder/ifp/ifp_iface.c
|
|
|
ced1f5 |
index 3293b92d750d33b2ecf77a03098c5169d052c924..f995e28f99f9489ca17fbc51fa6894d458f9e21f 100644
|
|
|
ced1f5 |
--- a/src/responder/ifp/ifp_iface.c
|
|
|
ced1f5 |
+++ b/src/responder/ifp/ifp_iface.c
|
|
|
ced1f5 |
@@ -79,7 +79,8 @@ struct iface_ifp_domains_domain iface_ifp_domains_domain = {
|
|
|
ced1f5 |
.IsOnline = ifp_domains_domain_is_online,
|
|
|
ced1f5 |
.ListServices = ifp_domains_domain_list_services,
|
|
|
ced1f5 |
.ActiveServer = ifp_domains_domain_active_server,
|
|
|
ced1f5 |
- .ListServers = ifp_domains_domain_list_servers
|
|
|
ced1f5 |
+ .ListServers = ifp_domains_domain_list_servers,
|
|
|
ced1f5 |
+ .RefreshAccessRules = ifp_domains_domain_refresh_access_rules
|
|
|
ced1f5 |
};
|
|
|
ced1f5 |
|
|
|
ced1f5 |
struct iface_ifp_users iface_ifp_users = {
|
|
|
ced1f5 |
diff --git a/src/responder/ifp/ifp_iface.xml b/src/responder/ifp/ifp_iface.xml
|
|
|
ced1f5 |
index 39385e866f31131c7860001ae4d6e6b51105aa52..1aa7eac03f0a3dc86f1d25883ac37f2fabf6b9e8 100644
|
|
|
ced1f5 |
--- a/src/responder/ifp/ifp_iface.xml
|
|
|
ced1f5 |
+++ b/src/responder/ifp/ifp_iface.xml
|
|
|
ced1f5 |
@@ -112,6 +112,9 @@
|
|
|
ced1f5 |
<arg name="service_name" type="s" direction="in" />
|
|
|
ced1f5 |
<arg name="servers" type="as" direction="out" />
|
|
|
ced1f5 |
</method>
|
|
|
ced1f5 |
+
|
|
|
ced1f5 |
+ <method name="RefreshAccessRules">
|
|
|
ced1f5 |
+ </method>
|
|
|
ced1f5 |
</interface>
|
|
|
ced1f5 |
|
|
|
ced1f5 |
<interface name="org.freedesktop.sssd.infopipe.Cache">
|
|
|
ced1f5 |
diff --git a/src/responder/ifp/ifp_iface_generated.c b/src/responder/ifp/ifp_iface_generated.c
|
|
|
ced1f5 |
index 6943e38e3b6d2fc9e09ade1a863905c8d81a39ba..c2cdbf5b0ef3d59068aeed7a8f45099c14c4a94a 100644
|
|
|
ced1f5 |
--- a/src/responder/ifp/ifp_iface_generated.c
|
|
|
ced1f5 |
+++ b/src/responder/ifp/ifp_iface_generated.c
|
|
|
ced1f5 |
@@ -552,6 +552,12 @@ int iface_ifp_domains_domain_ListServers_finish(struct sbus_request *req, const
|
|
|
ced1f5 |
DBUS_TYPE_INVALID);
|
|
|
ced1f5 |
}
|
|
|
ced1f5 |
|
|
|
ced1f5 |
+int iface_ifp_domains_domain_RefreshAccessRules_finish(struct sbus_request *req)
|
|
|
ced1f5 |
+{
|
|
|
ced1f5 |
+ return sbus_request_return_and_finish(req,
|
|
|
ced1f5 |
+ DBUS_TYPE_INVALID);
|
|
|
ced1f5 |
+}
|
|
|
ced1f5 |
+
|
|
|
ced1f5 |
/* methods for org.freedesktop.sssd.infopipe.Domains.Domain */
|
|
|
ced1f5 |
const struct sbus_method_meta iface_ifp_domains_domain__methods[] = {
|
|
|
ced1f5 |
{
|
|
|
ced1f5 |
@@ -582,6 +588,13 @@ const struct sbus_method_meta iface_ifp_domains_domain__methods[] = {
|
|
|
ced1f5 |
offsetof(struct iface_ifp_domains_domain, ListServers),
|
|
|
ced1f5 |
invoke_s_method,
|
|
|
ced1f5 |
},
|
|
|
ced1f5 |
+ {
|
|
|
ced1f5 |
+ "RefreshAccessRules", /* name */
|
|
|
ced1f5 |
+ NULL, /* no in_args */
|
|
|
ced1f5 |
+ NULL, /* no out_args */
|
|
|
ced1f5 |
+ offsetof(struct iface_ifp_domains_domain, RefreshAccessRules),
|
|
|
ced1f5 |
+ NULL, /* no invoker */
|
|
|
ced1f5 |
+ },
|
|
|
ced1f5 |
{ NULL, }
|
|
|
ced1f5 |
};
|
|
|
ced1f5 |
|
|
|
ced1f5 |
diff --git a/src/responder/ifp/ifp_iface_generated.h b/src/responder/ifp/ifp_iface_generated.h
|
|
|
ced1f5 |
index 30752bf063de1f2530c7451f01cc22ad3e863185..f1e6c80bab27d0ed581abc566a178e6857794805 100644
|
|
|
ced1f5 |
--- a/src/responder/ifp/ifp_iface_generated.h
|
|
|
ced1f5 |
+++ b/src/responder/ifp/ifp_iface_generated.h
|
|
|
ced1f5 |
@@ -57,6 +57,7 @@
|
|
|
ced1f5 |
#define IFACE_IFP_DOMAINS_DOMAIN_LISTSERVICES "ListServices"
|
|
|
ced1f5 |
#define IFACE_IFP_DOMAINS_DOMAIN_ACTIVESERVER "ActiveServer"
|
|
|
ced1f5 |
#define IFACE_IFP_DOMAINS_DOMAIN_LISTSERVERS "ListServers"
|
|
|
ced1f5 |
+#define IFACE_IFP_DOMAINS_DOMAIN_REFRESHACCESSRULES "RefreshAccessRules"
|
|
|
ced1f5 |
|
|
|
ced1f5 |
/* constants for org.freedesktop.sssd.infopipe.Cache */
|
|
|
ced1f5 |
#define IFACE_IFP_CACHE "org.freedesktop.sssd.infopipe.Cache"
|
|
|
ced1f5 |
@@ -209,6 +210,7 @@ struct iface_ifp_domains_domain {
|
|
|
ced1f5 |
int (*ListServices)(struct sbus_request *req, void *data);
|
|
|
ced1f5 |
int (*ActiveServer)(struct sbus_request *req, void *data, const char *arg_service);
|
|
|
ced1f5 |
int (*ListServers)(struct sbus_request *req, void *data, const char *arg_service_name);
|
|
|
ced1f5 |
+ int (*RefreshAccessRules)(struct sbus_request *req, void *data);
|
|
|
ced1f5 |
};
|
|
|
ced1f5 |
|
|
|
ced1f5 |
/* finish function for IsOnline */
|
|
|
ced1f5 |
@@ -223,6 +225,9 @@ int iface_ifp_domains_domain_ActiveServer_finish(struct sbus_request *req, const
|
|
|
ced1f5 |
/* finish function for ListServers */
|
|
|
ced1f5 |
int iface_ifp_domains_domain_ListServers_finish(struct sbus_request *req, const char *arg_servers[], int len_servers);
|
|
|
ced1f5 |
|
|
|
ced1f5 |
+/* finish function for RefreshAccessRules */
|
|
|
ced1f5 |
+int iface_ifp_domains_domain_RefreshAccessRules_finish(struct sbus_request *req);
|
|
|
ced1f5 |
+
|
|
|
ced1f5 |
/* vtable for org.freedesktop.sssd.infopipe.Cache */
|
|
|
ced1f5 |
struct iface_ifp_cache {
|
|
|
ced1f5 |
struct sbus_vtable vtable; /* derive from sbus_vtable */
|
|
|
ced1f5 |
--
|
|
|
ced1f5 |
2.14.3
|
|
|
ced1f5 |
|