From 1fcc2ccb99dd1c91e5f5502957cfa834b93e9884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= Date: Wed, 4 Oct 2023 14:01:52 +0200 Subject: [PATCH] sbus: convert calls in dp_resp_client.c into signals We do not require any reply from the destination so signals are much better format for these calls. Resolves: https://github.com/SSSD/sssd/issues/6286 --- src/providers/data_provider/dp.c | 35 +++ src/providers/data_provider/dp_resp_client.c | 152 +---------- src/responder/common/responder_iface.c | 37 +-- src/responder/nss/nss_iface.c | 31 ++- src/sss_iface/sbus_sss_client_async.c | 264 ++++++++----------- src/sss_iface/sbus_sss_client_async.h | 134 +++------- src/sss_iface/sbus_sss_interface.h | 214 ++++++++------- src/sss_iface/sbus_sss_symbols.c | 102 +++---- src/sss_iface/sbus_sss_symbols.h | 34 +-- src/sss_iface/sss_iface.xml | 24 +- 10 files changed, 416 insertions(+), 611 deletions(-) diff --git a/src/providers/data_provider/dp.c b/src/providers/data_provider/dp.c index 3fcfe7f7a92..72bc34130de 100644 --- a/src/providers/data_provider/dp.c +++ b/src/providers/data_provider/dp.c @@ -98,6 +98,38 @@ dp_init_interface(struct data_provider *provider) SBUS_PROPERTIES(SBUS_NO_PROPERTIES) ); + SBUS_INTERFACE(iface_responder_domain, + sssd_Responder_Domain, + SBUS_METHODS(SBUS_NO_METHODS), + SBUS_SIGNALS( + SBUS_EMITS(sssd_Responder_Domain, SetActive), + SBUS_EMITS(sssd_Responder_Domain, SetInconsistent) + ), + SBUS_PROPERTIES(SBUS_NO_PROPERTIES) + ); + + SBUS_INTERFACE(iface_responder_negativecache, + sssd_Responder_NegativeCache, + SBUS_METHODS(SBUS_NO_METHODS), + SBUS_SIGNALS( + SBUS_EMITS(sssd_Responder_NegativeCache, ResetUsers), + SBUS_EMITS(sssd_Responder_NegativeCache, ResetGroups) + ), + SBUS_PROPERTIES(SBUS_NO_PROPERTIES) + ); + + SBUS_INTERFACE(iface_nss_memorycache, + sssd_nss_MemoryCache, + SBUS_METHODS(SBUS_NO_METHODS), + SBUS_SIGNALS( + SBUS_EMITS(sssd_nss_MemoryCache, InvalidateAllUsers), + SBUS_EMITS(sssd_nss_MemoryCache, InvalidateAllGroups), + SBUS_EMITS(sssd_nss_MemoryCache, InvalidateAllInitgroups), + SBUS_EMITS(sssd_nss_MemoryCache, InvalidateGroupById) + ), + SBUS_PROPERTIES(SBUS_NO_PROPERTIES) + ); + struct sbus_path paths[] = { {SSS_BUS_PATH, &iface_dp_client}, {SSS_BUS_PATH, &iface_dp_backend}, @@ -105,6 +137,9 @@ dp_init_interface(struct data_provider *provider) {SSS_BUS_PATH, &iface_dp_access}, {SSS_BUS_PATH, &iface_dp}, {SSS_BUS_PATH, &iface_autofs}, + {SSS_BUS_PATH, &iface_responder_domain}, + {SSS_BUS_PATH, &iface_responder_negativecache}, + {SSS_BUS_PATH, &iface_nss_memorycache}, {NULL, NULL} }; diff --git a/src/providers/data_provider/dp_resp_client.c b/src/providers/data_provider/dp_resp_client.c index f9161d45f8e..a50ce3269bf 100644 --- a/src/providers/data_provider/dp_resp_client.c +++ b/src/providers/data_provider/dp_resp_client.c @@ -26,41 +26,9 @@ #include "providers/data_provider/dp_private.h" #include "sss_iface/sss_iface_async.h" - -/* List of DP clients that deal with users or groups */ -/* FIXME - it would be much cleaner to implement sbus signals - * and let the responder subscribe to these messages rather than - * keep a list here.. - * https://fedorahosted.org/sssd/ticket/2233 - */ -static const char *user_clients[] = { - SSS_BUS_NSS, - SSS_BUS_PAM, - SSS_BUS_IFP, - SSS_BUS_PAC, - SSS_BUS_SUDO, - NULL -}; - -static const char *all_clients[] = { - SSS_BUS_NSS, - SSS_BUS_PAM, - SSS_BUS_IFP, - SSS_BUS_PAC, - SSS_BUS_SUDO, - SSS_BUS_SSH, - SSS_BUS_AUTOFS, - NULL -}; - void dp_sbus_domain_active(struct data_provider *provider, struct sss_domain_info *dom) { - const char *bus; - struct tevent_req *subreq; - struct sbus_connection *conn; - int i; - if (provider == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "No provider pointer\n"); return; @@ -69,29 +37,13 @@ void dp_sbus_domain_active(struct data_provider *provider, DEBUG(SSSDBG_TRACE_FUNC, "Ordering responders to enable domain %s\n", dom->name); - conn = provider->sbus_conn; - for (i = 0; all_clients[i] != NULL; i++) { - bus = all_clients[i]; - - subreq = sbus_call_resp_domain_SetActive_send(provider, conn, - bus, SSS_BUS_PATH, dom->name); - if (subreq == NULL) { - DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create subrequest!\n"); - return; - } - - tevent_req_set_callback(subreq, sbus_unwanted_reply, NULL); - } + sbus_emit_resp_domain_SetActive(provider->sbus_conn, SSS_BUS_PATH, + dom->name); } void dp_sbus_domain_inconsistent(struct data_provider *provider, struct sss_domain_info *dom) { - const char *bus; - struct tevent_req *subreq; - struct sbus_connection *conn; - int i; - if (provider == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "No provider pointer\n"); return; @@ -100,28 +52,13 @@ void dp_sbus_domain_inconsistent(struct data_provider *provider, DEBUG(SSSDBG_TRACE_FUNC, "Ordering responders to disable domain %s\n", dom->name); - conn = provider->sbus_conn; - for (i = 0; all_clients[i] != NULL; i++) { - bus = all_clients[i]; - subreq = sbus_call_resp_domain_SetInconsistent_send(provider, conn, - bus, SSS_BUS_PATH, dom->name); - if (subreq == NULL) { - DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create subrequest!\n"); - return; - } - - tevent_req_set_callback(subreq, sbus_unwanted_reply, NULL); - } + sbus_emit_resp_domain_SetInconsistent(provider->sbus_conn, SSS_BUS_PATH, + dom->name); } void dp_sbus_reset_users_ncache(struct data_provider *provider, struct sss_domain_info *dom) { - const char *bus; - struct tevent_req *subreq; - struct sbus_connection *conn; - int i; - if (provider == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "No provider pointer\n"); return; @@ -130,28 +67,12 @@ void dp_sbus_reset_users_ncache(struct data_provider *provider, DEBUG(SSSDBG_TRACE_FUNC, "Ordering responders to reset user negative cache\n"); - conn = provider->sbus_conn; - for (i = 0; user_clients[i] != NULL; i++) { - bus = user_clients[i]; - subreq = sbus_call_resp_negcache_ResetUsers_send(provider, conn, bus, - SSS_BUS_PATH); - if (subreq == NULL) { - DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create subrequest!\n"); - return; - } - - tevent_req_set_callback(subreq, sbus_unwanted_reply, NULL); - } + sbus_emit_resp_negcache_ResetUsers(provider->sbus_conn, SSS_BUS_PATH); } void dp_sbus_reset_groups_ncache(struct data_provider *provider, struct sss_domain_info *dom) { - const char *bus; - struct tevent_req *subreq; - struct sbus_connection *conn; - int i; - if (provider == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "No provider pointer\n"); return; @@ -160,25 +81,11 @@ void dp_sbus_reset_groups_ncache(struct data_provider *provider, DEBUG(SSSDBG_TRACE_FUNC, "Ordering responders to reset group negative cache\n"); - conn = provider->sbus_conn; - for (i = 0; user_clients[i] != NULL; i++) { - bus = user_clients[i]; - - subreq = sbus_call_resp_negcache_ResetGroups_send(provider, conn, bus, - SSS_BUS_PATH); - if (subreq == NULL) { - DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create subrequest!\n"); - return; - } - - tevent_req_set_callback(subreq, sbus_unwanted_reply, NULL); - } + sbus_emit_resp_negcache_ResetGroups(provider->sbus_conn, SSS_BUS_PATH); } void dp_sbus_reset_users_memcache(struct data_provider *provider) { - struct tevent_req *subreq; - if (provider == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "No provider pointer\n"); return; @@ -187,22 +94,12 @@ void dp_sbus_reset_users_memcache(struct data_provider *provider) DEBUG(SSSDBG_TRACE_FUNC, "Ordering NSS responder to invalidate the users\n"); - subreq = sbus_call_nss_memcache_InvalidateAllUsers_send(provider, - provider->sbus_conn, SSS_BUS_NSS, SSS_BUS_PATH); - if (subreq == NULL) { - DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create subrequest!\n"); - return; - } - - tevent_req_set_callback(subreq, sbus_unwanted_reply, NULL); - + sbus_emit_nss_memcache_InvalidateAllUsers(provider->sbus_conn, SSS_BUS_PATH); return; } void dp_sbus_reset_groups_memcache(struct data_provider *provider) { - struct tevent_req *subreq; - if (provider == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "No provider pointer\n"); return; @@ -211,22 +108,12 @@ void dp_sbus_reset_groups_memcache(struct data_provider *provider) DEBUG(SSSDBG_TRACE_FUNC, "Ordering NSS responder to invalidate the groups\n"); - subreq = sbus_call_nss_memcache_InvalidateAllGroups_send(provider, - provider->sbus_conn, SSS_BUS_NSS, SSS_BUS_PATH); - if (subreq == NULL) { - DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create subrequest!\n"); - return; - } - - tevent_req_set_callback(subreq, sbus_unwanted_reply, NULL); - + sbus_emit_nss_memcache_InvalidateAllGroups(provider->sbus_conn, SSS_BUS_PATH); return; } void dp_sbus_reset_initgr_memcache(struct data_provider *provider) { - struct tevent_req *subreq; - if (provider == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "No provider pointer\n"); return; @@ -235,23 +122,13 @@ void dp_sbus_reset_initgr_memcache(struct data_provider *provider) DEBUG(SSSDBG_TRACE_FUNC, "Ordering NSS responder to invalidate the initgroups\n"); - subreq = sbus_call_nss_memcache_InvalidateAllInitgroups_send(provider, - provider->sbus_conn, SSS_BUS_NSS, SSS_BUS_PATH); - if (subreq == NULL) { - DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create subrequest!\n"); - return; - } - - tevent_req_set_callback(subreq, sbus_unwanted_reply, NULL); - + sbus_emit_nss_memcache_InvalidateAllInitgroups(provider->sbus_conn, SSS_BUS_PATH); return; } void dp_sbus_invalidate_group_memcache(struct data_provider *provider, gid_t gid) { - struct tevent_req *subreq; - if (provider == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "No provider pointer\n"); return; @@ -261,15 +138,6 @@ void dp_sbus_invalidate_group_memcache(struct data_provider *provider, "Ordering NSS responder to invalidate the group %"PRIu32" \n", gid); - subreq = sbus_call_nss_memcache_InvalidateGroupById_send(provider, - provider->sbus_conn, SSS_BUS_NSS, SSS_BUS_PATH, - (uint32_t)gid); - if (subreq == NULL) { - DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create subrequest!\n"); - return; - } - - tevent_req_set_callback(subreq, sbus_unwanted_reply, NULL); - + sbus_emit_nss_memcache_InvalidateGroupById(provider->sbus_conn, SSS_BUS_PATH, (uint32_t)gid); return; } diff --git a/src/responder/common/responder_iface.c b/src/responder/common/responder_iface.c index 5ef579769da..3211d38e366 100644 --- a/src/responder/common/responder_iface.c +++ b/src/responder/common/responder_iface.c @@ -99,35 +99,20 @@ sss_resp_register_sbus_iface(struct sbus_connection *conn, { errno_t ret; - SBUS_INTERFACE(iface_resp_domain, - sssd_Responder_Domain, - SBUS_METHODS( - SBUS_SYNC(METHOD, sssd_Responder_Domain, SetActive, sss_resp_domain_active, rctx), - SBUS_SYNC(METHOD, sssd_Responder_Domain, SetInconsistent, sss_resp_domain_inconsistent, rctx) - ), - SBUS_SIGNALS(SBUS_NO_SIGNALS), - SBUS_PROPERTIES(SBUS_NO_PROPERTIES) + struct sbus_listener listeners[] = SBUS_LISTENERS( + SBUS_LISTEN_SYNC(sssd_Responder_Domain, SetActive, + SSS_BUS_PATH, sss_resp_domain_active, rctx), + SBUS_LISTEN_SYNC(sssd_Responder_Domain, SetInconsistent, + SSS_BUS_PATH, sss_resp_domain_inconsistent, rctx), + SBUS_LISTEN_SYNC(sssd_Responder_NegativeCache, ResetUsers, + SSS_BUS_PATH, sss_resp_reset_ncache_users, rctx), + SBUS_LISTEN_SYNC(sssd_Responder_NegativeCache, ResetGroups, + SSS_BUS_PATH, sss_resp_reset_ncache_groups, rctx) ); - SBUS_INTERFACE(iface_resp_negcache, - sssd_Responder_NegativeCache, - SBUS_METHODS( - SBUS_SYNC(METHOD, sssd_Responder_NegativeCache, ResetUsers, sss_resp_reset_ncache_users, rctx), - SBUS_SYNC(METHOD, sssd_Responder_NegativeCache, ResetGroups, sss_resp_reset_ncache_groups, rctx) - ), - SBUS_SIGNALS(SBUS_NO_SIGNALS), - SBUS_PROPERTIES(SBUS_NO_PROPERTIES) - ); - - struct sbus_path paths[] = { - {SSS_BUS_PATH, &iface_resp_domain}, - {SSS_BUS_PATH, &iface_resp_negcache}, - {NULL, NULL} - }; - - ret = sbus_connection_add_path_map(conn, paths); + ret = sbus_router_listen_map(conn, listeners); if (ret != EOK) { - DEBUG(SSSDBG_FATAL_FAILURE, "Unable to add paths [%d]: %s\n", + DEBUG(SSSDBG_FATAL_FAILURE, "Unable to add listeners [%d]: %s\n", ret, sss_strerror(ret)); } diff --git a/src/responder/nss/nss_iface.c b/src/responder/nss/nss_iface.c index db743f8b7e6..35f27740b0c 100644 --- a/src/responder/nss/nss_iface.c +++ b/src/responder/nss/nss_iface.c @@ -222,13 +222,15 @@ sss_nss_register_backend_iface(struct sbus_connection *conn, SBUS_INTERFACE(iface, sssd_nss_MemoryCache, SBUS_METHODS( - SBUS_SYNC(METHOD, sssd_nss_MemoryCache, UpdateInitgroups, sss_nss_memorycache_update_initgroups, nss_ctx), - SBUS_SYNC(METHOD, sssd_nss_MemoryCache, InvalidateAllUsers, sss_nss_memorycache_invalidate_users, nss_ctx), - SBUS_SYNC(METHOD, sssd_nss_MemoryCache, InvalidateAllGroups, sss_nss_memorycache_invalidate_groups, nss_ctx), - SBUS_SYNC(METHOD, sssd_nss_MemoryCache, InvalidateAllInitgroups, sss_nss_memorycache_invalidate_initgroups, nss_ctx), - SBUS_SYNC(METHOD, sssd_nss_MemoryCache, InvalidateGroupById, sss_nss_memorycache_invalidate_group_by_id, nss_ctx) + SBUS_SYNC(METHOD, sssd_nss_MemoryCache, UpdateInitgroups, + sss_nss_memorycache_update_initgroups, nss_ctx) + ), + SBUS_SIGNALS( + SBUS_EMITS(sssd_nss_MemoryCache, InvalidateAllUsers), + SBUS_EMITS(sssd_nss_MemoryCache, InvalidateAllGroups), + SBUS_EMITS(sssd_nss_MemoryCache, InvalidateAllInitgroups), + SBUS_EMITS(sssd_nss_MemoryCache, InvalidateGroupById) ), - SBUS_SIGNALS(SBUS_NO_SIGNALS), SBUS_PROPERTIES(SBUS_NO_PROPERTIES) ); @@ -238,5 +240,22 @@ sss_nss_register_backend_iface(struct sbus_connection *conn, "[%d]: %s\n", ret, sss_strerror(ret)); } + struct sbus_listener listeners[] = SBUS_LISTENERS( + SBUS_LISTEN_SYNC(sssd_nss_MemoryCache, InvalidateAllUsers, + SSS_BUS_PATH, sss_nss_memorycache_invalidate_users, nss_ctx), + SBUS_LISTEN_SYNC(sssd_nss_MemoryCache, InvalidateAllGroups, + SSS_BUS_PATH, sss_nss_memorycache_invalidate_groups, nss_ctx), + SBUS_LISTEN_SYNC(sssd_nss_MemoryCache, InvalidateAllInitgroups, + SSS_BUS_PATH, sss_nss_memorycache_invalidate_initgroups, nss_ctx), + SBUS_LISTEN_SYNC(sssd_nss_MemoryCache, InvalidateGroupById, + SSS_BUS_PATH, sss_nss_memorycache_invalidate_group_by_id, nss_ctx) + ); + + ret = sbus_router_listen_map(conn, listeners); + if (ret != EOK) { + DEBUG(SSSDBG_FATAL_FAILURE, "Unable to add listeners [%d]: %s\n", + ret, sss_strerror(ret)); + } + return ret; } diff --git a/src/sss_iface/sbus_sss_client_async.c b/src/sss_iface/sbus_sss_client_async.c index 5ca925283a3..c8d8934a163 100644 --- a/src/sss_iface/sbus_sss_client_async.c +++ b/src/sss_iface/sbus_sss_client_async.c @@ -2057,80 +2057,6 @@ sbus_call_proxy_client_Register_recv return sbus_method_in_u_out__recv(req); } -struct tevent_req * -sbus_call_resp_domain_SetActive_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path, - const char * arg_name) -{ - return sbus_method_in_s_out__send(mem_ctx, conn, _sbus_sss_key_s_0, - busname, object_path, "sssd.Responder.Domain", "SetActive", arg_name); -} - -errno_t -sbus_call_resp_domain_SetActive_recv - (struct tevent_req *req) -{ - return sbus_method_in_s_out__recv(req); -} - -struct tevent_req * -sbus_call_resp_domain_SetInconsistent_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path, - const char * arg_name) -{ - return sbus_method_in_s_out__send(mem_ctx, conn, _sbus_sss_key_s_0, - busname, object_path, "sssd.Responder.Domain", "SetInconsistent", arg_name); -} - -errno_t -sbus_call_resp_domain_SetInconsistent_recv - (struct tevent_req *req) -{ - return sbus_method_in_s_out__recv(req); -} - -struct tevent_req * -sbus_call_resp_negcache_ResetGroups_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path) -{ - return sbus_method_in__out__send(mem_ctx, conn, _sbus_sss_key_, - busname, object_path, "sssd.Responder.NegativeCache", "ResetGroups"); -} - -errno_t -sbus_call_resp_negcache_ResetGroups_recv - (struct tevent_req *req) -{ - return sbus_method_in__out__recv(req); -} - -struct tevent_req * -sbus_call_resp_negcache_ResetUsers_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path) -{ - return sbus_method_in__out__send(mem_ctx, conn, _sbus_sss_key_, - busname, object_path, "sssd.Responder.NegativeCache", "ResetUsers"); -} - -errno_t -sbus_call_resp_negcache_ResetUsers_recv - (struct tevent_req *req) -{ - return sbus_method_in__out__recv(req); -} - struct tevent_req * sbus_call_dp_dp_getAccountDomain_send (TALLOC_CTX *mem_ctx, @@ -2324,79 +2250,6 @@ sbus_call_monitor_RegisterService_recv return sbus_method_in_sqq_out_q_recv(req, _monitor_version); } -struct tevent_req * -sbus_call_nss_memcache_InvalidateAllGroups_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path) -{ - return sbus_method_in__out__send(mem_ctx, conn, _sbus_sss_key_, - busname, object_path, "sssd.nss.MemoryCache", "InvalidateAllGroups"); -} - -errno_t -sbus_call_nss_memcache_InvalidateAllGroups_recv - (struct tevent_req *req) -{ - return sbus_method_in__out__recv(req); -} - -struct tevent_req * -sbus_call_nss_memcache_InvalidateAllInitgroups_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path) -{ - return sbus_method_in__out__send(mem_ctx, conn, _sbus_sss_key_, - busname, object_path, "sssd.nss.MemoryCache", "InvalidateAllInitgroups"); -} - -errno_t -sbus_call_nss_memcache_InvalidateAllInitgroups_recv - (struct tevent_req *req) -{ - return sbus_method_in__out__recv(req); -} - -struct tevent_req * -sbus_call_nss_memcache_InvalidateAllUsers_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path) -{ - return sbus_method_in__out__send(mem_ctx, conn, _sbus_sss_key_, - busname, object_path, "sssd.nss.MemoryCache", "InvalidateAllUsers"); -} - -errno_t -sbus_call_nss_memcache_InvalidateAllUsers_recv - (struct tevent_req *req) -{ - return sbus_method_in__out__recv(req); -} - -struct tevent_req * -sbus_call_nss_memcache_InvalidateGroupById_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path, - uint32_t arg_gid) -{ - return sbus_method_in_u_out__send(mem_ctx, conn, _sbus_sss_key_u_0, - busname, object_path, "sssd.nss.MemoryCache", "InvalidateGroupById", arg_gid); -} - -errno_t -sbus_call_nss_memcache_InvalidateGroupById_recv - (struct tevent_req *req) -{ - return sbus_method_in_u_out__recv(req); -} - struct tevent_req * sbus_call_nss_memcache_UpdateInitgroups_send (TALLOC_CTX *mem_ctx, @@ -2543,3 +2396,120 @@ sbus_call_service_sysbusReconnect_recv { return sbus_method_in__out__recv(req); } + +static void +sbus_emit_signal_ + (struct sbus_connection *conn, + const char *path, + const char *iface, + const char *signal_name) +{ + sbus_call_signal_send(conn, NULL, NULL, path, iface, signal_name, NULL); +} + +static void +sbus_emit_signal_s + (struct sbus_connection *conn, + const char *path, + const char *iface, + const char *signal_name, + const char * arg0) +{ + struct _sbus_sss_invoker_args_s args; + + args.arg0 = arg0; + + sbus_call_signal_send(conn, NULL, (sbus_invoker_writer_fn)_sbus_sss_invoker_write_s, + path, iface, signal_name, &args); +} + +static void +sbus_emit_signal_u + (struct sbus_connection *conn, + const char *path, + const char *iface, + const char *signal_name, + uint32_t arg0) +{ + struct _sbus_sss_invoker_args_u args; + + args.arg0 = arg0; + + sbus_call_signal_send(conn, NULL, (sbus_invoker_writer_fn)_sbus_sss_invoker_write_u, + path, iface, signal_name, &args); +} + +void +sbus_emit_resp_domain_SetActive + (struct sbus_connection *conn, + const char *object_path, + const char * arg_name) +{ + sbus_emit_signal_s(conn, object_path, + "sssd.Responder.Domain", "SetActive", arg_name); +} + +void +sbus_emit_resp_domain_SetInconsistent + (struct sbus_connection *conn, + const char *object_path, + const char * arg_name) +{ + sbus_emit_signal_s(conn, object_path, + "sssd.Responder.Domain", "SetInconsistent", arg_name); +} + +void +sbus_emit_resp_negcache_ResetGroups + (struct sbus_connection *conn, + const char *object_path) +{ + sbus_emit_signal_(conn, object_path, + "sssd.Responder.NegativeCache", "ResetGroups"); +} + +void +sbus_emit_resp_negcache_ResetUsers + (struct sbus_connection *conn, + const char *object_path) +{ + sbus_emit_signal_(conn, object_path, + "sssd.Responder.NegativeCache", "ResetUsers"); +} + +void +sbus_emit_nss_memcache_InvalidateAllGroups + (struct sbus_connection *conn, + const char *object_path) +{ + sbus_emit_signal_(conn, object_path, + "sssd.nss.MemoryCache", "InvalidateAllGroups"); +} + +void +sbus_emit_nss_memcache_InvalidateAllInitgroups + (struct sbus_connection *conn, + const char *object_path) +{ + sbus_emit_signal_(conn, object_path, + "sssd.nss.MemoryCache", "InvalidateAllInitgroups"); +} + +void +sbus_emit_nss_memcache_InvalidateAllUsers + (struct sbus_connection *conn, + const char *object_path) +{ + sbus_emit_signal_(conn, object_path, + "sssd.nss.MemoryCache", "InvalidateAllUsers"); +} + +void +sbus_emit_nss_memcache_InvalidateGroupById + (struct sbus_connection *conn, + const char *object_path, + uint32_t arg_gid) +{ + sbus_emit_signal_u(conn, object_path, + "sssd.nss.MemoryCache", "InvalidateGroupById", arg_gid); +} diff --git a/src/sss_iface/sbus_sss_client_async.h b/src/sss_iface/sbus_sss_client_async.h index 10cdaf7010a..c96d134ae95 100644 --- a/src/sss_iface/sbus_sss_client_async.h +++ b/src/sss_iface/sbus_sss_client_async.h @@ -189,52 +189,6 @@ errno_t sbus_call_proxy_client_Register_recv (struct tevent_req *req); -struct tevent_req * -sbus_call_resp_domain_SetActive_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path, - const char * arg_name); - -errno_t -sbus_call_resp_domain_SetActive_recv - (struct tevent_req *req); - -struct tevent_req * -sbus_call_resp_domain_SetInconsistent_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path, - const char * arg_name); - -errno_t -sbus_call_resp_domain_SetInconsistent_recv - (struct tevent_req *req); - -struct tevent_req * -sbus_call_resp_negcache_ResetGroups_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path); - -errno_t -sbus_call_resp_negcache_ResetGroups_recv - (struct tevent_req *req); - -struct tevent_req * -sbus_call_resp_negcache_ResetUsers_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path); - -errno_t -sbus_call_resp_negcache_ResetUsers_recv - (struct tevent_req *req); - struct tevent_req * sbus_call_dp_dp_getAccountDomain_send (TALLOC_CTX *mem_ctx, @@ -373,51 +327,6 @@ sbus_call_monitor_RegisterService_recv (struct tevent_req *req, uint16_t* _monitor_version); -struct tevent_req * -sbus_call_nss_memcache_InvalidateAllGroups_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path); - -errno_t -sbus_call_nss_memcache_InvalidateAllGroups_recv - (struct tevent_req *req); - -struct tevent_req * -sbus_call_nss_memcache_InvalidateAllInitgroups_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path); - -errno_t -sbus_call_nss_memcache_InvalidateAllInitgroups_recv - (struct tevent_req *req); - -struct tevent_req * -sbus_call_nss_memcache_InvalidateAllUsers_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path); - -errno_t -sbus_call_nss_memcache_InvalidateAllUsers_recv - (struct tevent_req *req); - -struct tevent_req * -sbus_call_nss_memcache_InvalidateGroupById_send - (TALLOC_CTX *mem_ctx, - struct sbus_connection *conn, - const char *busname, - const char *object_path, - uint32_t arg_gid); - -errno_t -sbus_call_nss_memcache_InvalidateGroupById_recv - (struct tevent_req *req); - struct tevent_req * sbus_call_nss_memcache_UpdateInitgroups_send (TALLOC_CTX *mem_ctx, @@ -509,4 +418,47 @@ errno_t sbus_call_service_sysbusReconnect_recv (struct tevent_req *req); +void +sbus_emit_resp_domain_SetActive + (struct sbus_connection *conn, + const char *object_path, + const char * arg_name); + +void +sbus_emit_resp_domain_SetInconsistent + (struct sbus_connection *conn, + const char *object_path, + const char * arg_name); + +void +sbus_emit_resp_negcache_ResetGroups + (struct sbus_connection *conn, + const char *object_path); + +void +sbus_emit_resp_negcache_ResetUsers + (struct sbus_connection *conn, + const char *object_path); + +void +sbus_emit_nss_memcache_InvalidateAllGroups + (struct sbus_connection *conn, + const char *object_path); + +void +sbus_emit_nss_memcache_InvalidateAllInitgroups + (struct sbus_connection *conn, + const char *object_path); + +void +sbus_emit_nss_memcache_InvalidateAllUsers + (struct sbus_connection *conn, + const char *object_path); + +void +sbus_emit_nss_memcache_InvalidateGroupById + (struct sbus_connection *conn, + const char *object_path, + uint32_t arg_gid); + #endif /* _SBUS_SSS_CLIENT_ASYNC_H_ */ diff --git a/src/sss_iface/sbus_sss_interface.h b/src/sss_iface/sbus_sss_interface.h index 5b4d1c362a1..baf2ba742b2 100644 --- a/src/sss_iface/sbus_sss_interface.h +++ b/src/sss_iface/sbus_sss_interface.h @@ -415,45 +415,49 @@ (methods), (signals), (properties)); \ }) -/* Method: sssd.Responder.Domain.SetActive */ -#define SBUS_METHOD_SYNC_sssd_Responder_Domain_SetActive(handler, data) ({ \ +/* Signal: sssd.Responder.Domain.SetActive */ +#define SBUS_SIGNAL_EMITS_sssd_Responder_Domain_SetActive() ({ \ + sbus_signal("SetActive", \ + _sbus_sss_args_sssd_Responder_Domain_SetActive, \ + NULL); \ +}) + +#define SBUS_SIGNAL_SYNC_sssd_Responder_Domain_SetActive(path, handler, data) ({ \ SBUS_CHECK_SYNC((handler), (data), const char *); \ - sbus_method_sync("SetActive", \ - &_sbus_sss_args_sssd_Responder_Domain_SetActive, \ - NULL, \ + sbus_listener_sync("sssd.Responder.Domain", "SetActive", (path), \ _sbus_sss_invoke_in_s_out__send, \ _sbus_sss_key_s_0, \ (handler), (data)); \ }) -#define SBUS_METHOD_ASYNC_sssd_Responder_Domain_SetActive(handler_send, handler_recv, data) ({ \ +#define SBUS_SIGNAL_ASYNC_sssd_Responder_Domain_SetActive(path, handler_send, handler_recv, data) ({ \ SBUS_CHECK_SEND((handler_send), (data), const char *); \ SBUS_CHECK_RECV((handler_recv)); \ - sbus_method_async("SetActive", \ - &_sbus_sss_args_sssd_Responder_Domain_SetActive, \ - NULL, \ + sbus_listener_async("sssd.Responder.Domain", "SetActive", (path), \ _sbus_sss_invoke_in_s_out__send, \ _sbus_sss_key_s_0, \ (handler_send), (handler_recv), (data)); \ }) -/* Method: sssd.Responder.Domain.SetInconsistent */ -#define SBUS_METHOD_SYNC_sssd_Responder_Domain_SetInconsistent(handler, data) ({ \ +/* Signal: sssd.Responder.Domain.SetInconsistent */ +#define SBUS_SIGNAL_EMITS_sssd_Responder_Domain_SetInconsistent() ({ \ + sbus_signal("SetInconsistent", \ + _sbus_sss_args_sssd_Responder_Domain_SetInconsistent, \ + NULL); \ +}) + +#define SBUS_SIGNAL_SYNC_sssd_Responder_Domain_SetInconsistent(path, handler, data) ({ \ SBUS_CHECK_SYNC((handler), (data), const char *); \ - sbus_method_sync("SetInconsistent", \ - &_sbus_sss_args_sssd_Responder_Domain_SetInconsistent, \ - NULL, \ + sbus_listener_sync("sssd.Responder.Domain", "SetInconsistent", (path), \ _sbus_sss_invoke_in_s_out__send, \ _sbus_sss_key_s_0, \ (handler), (data)); \ }) -#define SBUS_METHOD_ASYNC_sssd_Responder_Domain_SetInconsistent(handler_send, handler_recv, data) ({ \ +#define SBUS_SIGNAL_ASYNC_sssd_Responder_Domain_SetInconsistent(path, handler_send, handler_recv, data) ({ \ SBUS_CHECK_SEND((handler_send), (data), const char *); \ SBUS_CHECK_RECV((handler_recv)); \ - sbus_method_async("SetInconsistent", \ - &_sbus_sss_args_sssd_Responder_Domain_SetInconsistent, \ - NULL, \ + sbus_listener_async("sssd.Responder.Domain", "SetInconsistent", (path), \ _sbus_sss_invoke_in_s_out__send, \ _sbus_sss_key_s_0, \ (handler_send), (handler_recv), (data)); \ @@ -465,45 +469,49 @@ (methods), (signals), (properties)); \ }) -/* Method: sssd.Responder.NegativeCache.ResetGroups */ -#define SBUS_METHOD_SYNC_sssd_Responder_NegativeCache_ResetGroups(handler, data) ({ \ +/* Signal: sssd.Responder.NegativeCache.ResetGroups */ +#define SBUS_SIGNAL_EMITS_sssd_Responder_NegativeCache_ResetGroups() ({ \ + sbus_signal("ResetGroups", \ + _sbus_sss_args_sssd_Responder_NegativeCache_ResetGroups, \ + NULL); \ +}) + +#define SBUS_SIGNAL_SYNC_sssd_Responder_NegativeCache_ResetGroups(path, handler, data) ({ \ SBUS_CHECK_SYNC((handler), (data)); \ - sbus_method_sync("ResetGroups", \ - &_sbus_sss_args_sssd_Responder_NegativeCache_ResetGroups, \ - NULL, \ + sbus_listener_sync("sssd.Responder.NegativeCache", "ResetGroups", (path), \ _sbus_sss_invoke_in__out__send, \ _sbus_sss_key_, \ (handler), (data)); \ }) -#define SBUS_METHOD_ASYNC_sssd_Responder_NegativeCache_ResetGroups(handler_send, handler_recv, data) ({ \ +#define SBUS_SIGNAL_ASYNC_sssd_Responder_NegativeCache_ResetGroups(path, handler_send, handler_recv, data) ({ \ SBUS_CHECK_SEND((handler_send), (data)); \ SBUS_CHECK_RECV((handler_recv)); \ - sbus_method_async("ResetGroups", \ - &_sbus_sss_args_sssd_Responder_NegativeCache_ResetGroups, \ - NULL, \ + sbus_listener_async("sssd.Responder.NegativeCache", "ResetGroups", (path), \ _sbus_sss_invoke_in__out__send, \ _sbus_sss_key_, \ (handler_send), (handler_recv), (data)); \ }) -/* Method: sssd.Responder.NegativeCache.ResetUsers */ -#define SBUS_METHOD_SYNC_sssd_Responder_NegativeCache_ResetUsers(handler, data) ({ \ +/* Signal: sssd.Responder.NegativeCache.ResetUsers */ +#define SBUS_SIGNAL_EMITS_sssd_Responder_NegativeCache_ResetUsers() ({ \ + sbus_signal("ResetUsers", \ + _sbus_sss_args_sssd_Responder_NegativeCache_ResetUsers, \ + NULL); \ +}) + +#define SBUS_SIGNAL_SYNC_sssd_Responder_NegativeCache_ResetUsers(path, handler, data) ({ \ SBUS_CHECK_SYNC((handler), (data)); \ - sbus_method_sync("ResetUsers", \ - &_sbus_sss_args_sssd_Responder_NegativeCache_ResetUsers, \ - NULL, \ + sbus_listener_sync("sssd.Responder.NegativeCache", "ResetUsers", (path), \ _sbus_sss_invoke_in__out__send, \ _sbus_sss_key_, \ (handler), (data)); \ }) -#define SBUS_METHOD_ASYNC_sssd_Responder_NegativeCache_ResetUsers(handler_send, handler_recv, data) ({ \ +#define SBUS_SIGNAL_ASYNC_sssd_Responder_NegativeCache_ResetUsers(path, handler_send, handler_recv, data) ({ \ SBUS_CHECK_SEND((handler_send), (data)); \ SBUS_CHECK_RECV((handler_recv)); \ - sbus_method_async("ResetUsers", \ - &_sbus_sss_args_sssd_Responder_NegativeCache_ResetUsers, \ - NULL, \ + sbus_listener_async("sssd.Responder.NegativeCache", "ResetUsers", (path), \ _sbus_sss_invoke_in__out__send, \ _sbus_sss_key_, \ (handler_send), (handler_recv), (data)); \ @@ -703,113 +711,121 @@ (methods), (signals), (properties)); \ }) -/* Method: sssd.nss.MemoryCache.InvalidateAllGroups */ -#define SBUS_METHOD_SYNC_sssd_nss_MemoryCache_InvalidateAllGroups(handler, data) ({ \ - SBUS_CHECK_SYNC((handler), (data)); \ - sbus_method_sync("InvalidateAllGroups", \ - &_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllGroups, \ +/* Method: sssd.nss.MemoryCache.UpdateInitgroups */ +#define SBUS_METHOD_SYNC_sssd_nss_MemoryCache_UpdateInitgroups(handler, data) ({ \ + SBUS_CHECK_SYNC((handler), (data), const char *, const char *, uint32_t *); \ + sbus_method_sync("UpdateInitgroups", \ + &_sbus_sss_args_sssd_nss_MemoryCache_UpdateInitgroups, \ + NULL, \ + _sbus_sss_invoke_in_ssau_out__send, \ NULL, \ - _sbus_sss_invoke_in__out__send, \ - _sbus_sss_key_, \ (handler), (data)); \ }) -#define SBUS_METHOD_ASYNC_sssd_nss_MemoryCache_InvalidateAllGroups(handler_send, handler_recv, data) ({ \ - SBUS_CHECK_SEND((handler_send), (data)); \ +#define SBUS_METHOD_ASYNC_sssd_nss_MemoryCache_UpdateInitgroups(handler_send, handler_recv, data) ({ \ + SBUS_CHECK_SEND((handler_send), (data), const char *, const char *, uint32_t *); \ SBUS_CHECK_RECV((handler_recv)); \ - sbus_method_async("InvalidateAllGroups", \ - &_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllGroups, \ + sbus_method_async("UpdateInitgroups", \ + &_sbus_sss_args_sssd_nss_MemoryCache_UpdateInitgroups, \ + NULL, \ + _sbus_sss_invoke_in_ssau_out__send, \ NULL, \ - _sbus_sss_invoke_in__out__send, \ - _sbus_sss_key_, \ (handler_send), (handler_recv), (data)); \ }) -/* Method: sssd.nss.MemoryCache.InvalidateAllInitgroups */ -#define SBUS_METHOD_SYNC_sssd_nss_MemoryCache_InvalidateAllInitgroups(handler, data) ({ \ +/* Signal: sssd.nss.MemoryCache.InvalidateAllGroups */ +#define SBUS_SIGNAL_EMITS_sssd_nss_MemoryCache_InvalidateAllGroups() ({ \ + sbus_signal("InvalidateAllGroups", \ + _sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllGroups, \ + NULL); \ +}) + +#define SBUS_SIGNAL_SYNC_sssd_nss_MemoryCache_InvalidateAllGroups(path, handler, data) ({ \ SBUS_CHECK_SYNC((handler), (data)); \ - sbus_method_sync("InvalidateAllInitgroups", \ - &_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllInitgroups, \ - NULL, \ + sbus_listener_sync("sssd.nss.MemoryCache", "InvalidateAllGroups", (path), \ _sbus_sss_invoke_in__out__send, \ - _sbus_sss_key_, \ + NULL, \ (handler), (data)); \ }) -#define SBUS_METHOD_ASYNC_sssd_nss_MemoryCache_InvalidateAllInitgroups(handler_send, handler_recv, data) ({ \ +#define SBUS_SIGNAL_ASYNC_sssd_nss_MemoryCache_InvalidateAllGroups(path, handler_send, handler_recv, data) ({ \ SBUS_CHECK_SEND((handler_send), (data)); \ SBUS_CHECK_RECV((handler_recv)); \ - sbus_method_async("InvalidateAllInitgroups", \ - &_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllInitgroups, \ - NULL, \ + sbus_listener_async("sssd.nss.MemoryCache", "InvalidateAllGroups", (path), \ _sbus_sss_invoke_in__out__send, \ - _sbus_sss_key_, \ + NULL, \ (handler_send), (handler_recv), (data)); \ }) -/* Method: sssd.nss.MemoryCache.InvalidateAllUsers */ -#define SBUS_METHOD_SYNC_sssd_nss_MemoryCache_InvalidateAllUsers(handler, data) ({ \ +/* Signal: sssd.nss.MemoryCache.InvalidateAllInitgroups */ +#define SBUS_SIGNAL_EMITS_sssd_nss_MemoryCache_InvalidateAllInitgroups() ({ \ + sbus_signal("InvalidateAllInitgroups", \ + _sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllInitgroups, \ + NULL); \ +}) + +#define SBUS_SIGNAL_SYNC_sssd_nss_MemoryCache_InvalidateAllInitgroups(path, handler, data) ({ \ SBUS_CHECK_SYNC((handler), (data)); \ - sbus_method_sync("InvalidateAllUsers", \ - &_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllUsers, \ - NULL, \ + sbus_listener_sync("sssd.nss.MemoryCache", "InvalidateAllInitgroups", (path), \ _sbus_sss_invoke_in__out__send, \ - _sbus_sss_key_, \ + NULL, \ (handler), (data)); \ }) -#define SBUS_METHOD_ASYNC_sssd_nss_MemoryCache_InvalidateAllUsers(handler_send, handler_recv, data) ({ \ +#define SBUS_SIGNAL_ASYNC_sssd_nss_MemoryCache_InvalidateAllInitgroups(path, handler_send, handler_recv, data) ({ \ SBUS_CHECK_SEND((handler_send), (data)); \ SBUS_CHECK_RECV((handler_recv)); \ - sbus_method_async("InvalidateAllUsers", \ - &_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllUsers, \ - NULL, \ + sbus_listener_async("sssd.nss.MemoryCache", "InvalidateAllInitgroups", (path), \ _sbus_sss_invoke_in__out__send, \ - _sbus_sss_key_, \ + NULL, \ (handler_send), (handler_recv), (data)); \ }) -/* Method: sssd.nss.MemoryCache.InvalidateGroupById */ -#define SBUS_METHOD_SYNC_sssd_nss_MemoryCache_InvalidateGroupById(handler, data) ({ \ - SBUS_CHECK_SYNC((handler), (data), uint32_t); \ - sbus_method_sync("InvalidateGroupById", \ - &_sbus_sss_args_sssd_nss_MemoryCache_InvalidateGroupById, \ +/* Signal: sssd.nss.MemoryCache.InvalidateAllUsers */ +#define SBUS_SIGNAL_EMITS_sssd_nss_MemoryCache_InvalidateAllUsers() ({ \ + sbus_signal("InvalidateAllUsers", \ + _sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllUsers, \ + NULL); \ +}) + +#define SBUS_SIGNAL_SYNC_sssd_nss_MemoryCache_InvalidateAllUsers(path, handler, data) ({ \ + SBUS_CHECK_SYNC((handler), (data)); \ + sbus_listener_sync("sssd.nss.MemoryCache", "InvalidateAllUsers", (path), \ + _sbus_sss_invoke_in__out__send, \ NULL, \ - _sbus_sss_invoke_in_u_out__send, \ - _sbus_sss_key_u_0, \ (handler), (data)); \ }) -#define SBUS_METHOD_ASYNC_sssd_nss_MemoryCache_InvalidateGroupById(handler_send, handler_recv, data) ({ \ - SBUS_CHECK_SEND((handler_send), (data), uint32_t); \ +#define SBUS_SIGNAL_ASYNC_sssd_nss_MemoryCache_InvalidateAllUsers(path, handler_send, handler_recv, data) ({ \ + SBUS_CHECK_SEND((handler_send), (data)); \ SBUS_CHECK_RECV((handler_recv)); \ - sbus_method_async("InvalidateGroupById", \ - &_sbus_sss_args_sssd_nss_MemoryCache_InvalidateGroupById, \ + sbus_listener_async("sssd.nss.MemoryCache", "InvalidateAllUsers", (path), \ + _sbus_sss_invoke_in__out__send, \ NULL, \ - _sbus_sss_invoke_in_u_out__send, \ - _sbus_sss_key_u_0, \ (handler_send), (handler_recv), (data)); \ }) -/* Method: sssd.nss.MemoryCache.UpdateInitgroups */ -#define SBUS_METHOD_SYNC_sssd_nss_MemoryCache_UpdateInitgroups(handler, data) ({ \ - SBUS_CHECK_SYNC((handler), (data), const char *, const char *, uint32_t *); \ - sbus_method_sync("UpdateInitgroups", \ - &_sbus_sss_args_sssd_nss_MemoryCache_UpdateInitgroups, \ - NULL, \ - _sbus_sss_invoke_in_ssau_out__send, \ - NULL, \ +/* Signal: sssd.nss.MemoryCache.InvalidateGroupById */ +#define SBUS_SIGNAL_EMITS_sssd_nss_MemoryCache_InvalidateGroupById() ({ \ + sbus_signal("InvalidateGroupById", \ + _sbus_sss_args_sssd_nss_MemoryCache_InvalidateGroupById, \ + NULL); \ +}) + +#define SBUS_SIGNAL_SYNC_sssd_nss_MemoryCache_InvalidateGroupById(path, handler, data) ({ \ + SBUS_CHECK_SYNC((handler), (data), uint32_t); \ + sbus_listener_sync("sssd.nss.MemoryCache", "InvalidateGroupById", (path), \ + _sbus_sss_invoke_in_u_out__send, \ + _sbus_sss_key_u_0, \ (handler), (data)); \ }) -#define SBUS_METHOD_ASYNC_sssd_nss_MemoryCache_UpdateInitgroups(handler_send, handler_recv, data) ({ \ - SBUS_CHECK_SEND((handler_send), (data), const char *, const char *, uint32_t *); \ +#define SBUS_SIGNAL_ASYNC_sssd_nss_MemoryCache_InvalidateGroupById(path, handler_send, handler_recv, data) ({ \ + SBUS_CHECK_SEND((handler_send), (data), uint32_t); \ SBUS_CHECK_RECV((handler_recv)); \ - sbus_method_async("UpdateInitgroups", \ - &_sbus_sss_args_sssd_nss_MemoryCache_UpdateInitgroups, \ - NULL, \ - _sbus_sss_invoke_in_ssau_out__send, \ - NULL, \ + sbus_listener_async("sssd.nss.MemoryCache", "InvalidateGroupById", (path), \ + _sbus_sss_invoke_in_u_out__send, \ + _sbus_sss_key_u_0, \ (handler_send), (handler_recv), (data)); \ }) diff --git a/src/sss_iface/sbus_sss_symbols.c b/src/sss_iface/sbus_sss_symbols.c index 90454dce400..43dabd1a857 100644 --- a/src/sss_iface/sbus_sss_symbols.c +++ b/src/sss_iface/sbus_sss_symbols.c @@ -204,46 +204,26 @@ _sbus_sss_args_sssd_ProxyChild_Client_Register = { } }; -const struct sbus_method_arguments -_sbus_sss_args_sssd_Responder_Domain_SetActive = { - .input = (const struct sbus_argument[]){ - {.type = "s", .name = "name"}, - {NULL} - }, - .output = (const struct sbus_argument[]){ - {NULL} - } +const struct sbus_argument +_sbus_sss_args_sssd_Responder_Domain_SetActive[] = { + {.type = "s", .name = "name"}, + {NULL} }; -const struct sbus_method_arguments -_sbus_sss_args_sssd_Responder_Domain_SetInconsistent = { - .input = (const struct sbus_argument[]){ - {.type = "s", .name = "name"}, - {NULL} - }, - .output = (const struct sbus_argument[]){ - {NULL} - } +const struct sbus_argument +_sbus_sss_args_sssd_Responder_Domain_SetInconsistent[] = { + {.type = "s", .name = "name"}, + {NULL} }; -const struct sbus_method_arguments -_sbus_sss_args_sssd_Responder_NegativeCache_ResetGroups = { - .input = (const struct sbus_argument[]){ - {NULL} - }, - .output = (const struct sbus_argument[]){ - {NULL} - } +const struct sbus_argument +_sbus_sss_args_sssd_Responder_NegativeCache_ResetGroups[] = { + {NULL} }; -const struct sbus_method_arguments -_sbus_sss_args_sssd_Responder_NegativeCache_ResetUsers = { - .input = (const struct sbus_argument[]){ - {NULL} - }, - .output = (const struct sbus_argument[]){ - {NULL} - } +const struct sbus_argument +_sbus_sss_args_sssd_Responder_NegativeCache_ResetUsers[] = { + {NULL} }; const struct sbus_method_arguments @@ -371,8 +351,11 @@ _sbus_sss_args_sssd_monitor_RegisterService = { }; const struct sbus_method_arguments -_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllGroups = { +_sbus_sss_args_sssd_nss_MemoryCache_UpdateInitgroups = { .input = (const struct sbus_argument[]){ + {.type = "s", .name = "user"}, + {.type = "s", .name = "domain"}, + {.type = "au", .name = "groups"}, {NULL} }, .output = (const struct sbus_argument[]){ @@ -380,48 +363,25 @@ _sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllGroups = { } }; -const struct sbus_method_arguments -_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllInitgroups = { - .input = (const struct sbus_argument[]){ - {NULL} - }, - .output = (const struct sbus_argument[]){ - {NULL} - } +const struct sbus_argument +_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllGroups[] = { + {NULL} }; -const struct sbus_method_arguments -_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllUsers = { - .input = (const struct sbus_argument[]){ - {NULL} - }, - .output = (const struct sbus_argument[]){ - {NULL} - } +const struct sbus_argument +_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllInitgroups[] = { + {NULL} }; -const struct sbus_method_arguments -_sbus_sss_args_sssd_nss_MemoryCache_InvalidateGroupById = { - .input = (const struct sbus_argument[]){ - {.type = "u", .name = "gid"}, - {NULL} - }, - .output = (const struct sbus_argument[]){ - {NULL} - } +const struct sbus_argument +_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllUsers[] = { + {NULL} }; -const struct sbus_method_arguments -_sbus_sss_args_sssd_nss_MemoryCache_UpdateInitgroups = { - .input = (const struct sbus_argument[]){ - {.type = "s", .name = "user"}, - {.type = "s", .name = "domain"}, - {.type = "au", .name = "groups"}, - {NULL} - }, - .output = (const struct sbus_argument[]){ - {NULL} - } +const struct sbus_argument +_sbus_sss_args_sssd_nss_MemoryCache_InvalidateGroupById[] = { + {.type = "u", .name = "gid"}, + {NULL} }; const struct sbus_method_arguments diff --git a/src/sss_iface/sbus_sss_symbols.h b/src/sss_iface/sbus_sss_symbols.h index 0a9b1b8d0ef..a2eaa8abaaa 100644 --- a/src/sss_iface/sbus_sss_symbols.h +++ b/src/sss_iface/sbus_sss_symbols.h @@ -67,17 +67,17 @@ _sbus_sss_args_sssd_ProxyChild_Auth_PAM; extern const struct sbus_method_arguments _sbus_sss_args_sssd_ProxyChild_Client_Register; -extern const struct sbus_method_arguments -_sbus_sss_args_sssd_Responder_Domain_SetActive; +extern const struct sbus_argument +_sbus_sss_args_sssd_Responder_Domain_SetActive[]; -extern const struct sbus_method_arguments -_sbus_sss_args_sssd_Responder_Domain_SetInconsistent; +extern const struct sbus_argument +_sbus_sss_args_sssd_Responder_Domain_SetInconsistent[]; -extern const struct sbus_method_arguments -_sbus_sss_args_sssd_Responder_NegativeCache_ResetGroups; +extern const struct sbus_argument +_sbus_sss_args_sssd_Responder_NegativeCache_ResetGroups[]; -extern const struct sbus_method_arguments -_sbus_sss_args_sssd_Responder_NegativeCache_ResetUsers; +extern const struct sbus_argument +_sbus_sss_args_sssd_Responder_NegativeCache_ResetUsers[]; extern const struct sbus_method_arguments _sbus_sss_args_sssd_dataprovider_getAccountDomain; @@ -104,19 +104,19 @@ extern const struct sbus_method_arguments _sbus_sss_args_sssd_monitor_RegisterService; extern const struct sbus_method_arguments -_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllGroups; +_sbus_sss_args_sssd_nss_MemoryCache_UpdateInitgroups; -extern const struct sbus_method_arguments -_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllInitgroups; +extern const struct sbus_argument +_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllGroups[]; -extern const struct sbus_method_arguments -_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllUsers; +extern const struct sbus_argument +_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllInitgroups[]; -extern const struct sbus_method_arguments -_sbus_sss_args_sssd_nss_MemoryCache_InvalidateGroupById; +extern const struct sbus_argument +_sbus_sss_args_sssd_nss_MemoryCache_InvalidateAllUsers[]; -extern const struct sbus_method_arguments -_sbus_sss_args_sssd_nss_MemoryCache_UpdateInitgroups; +extern const struct sbus_argument +_sbus_sss_args_sssd_nss_MemoryCache_InvalidateGroupById[]; extern const struct sbus_method_arguments _sbus_sss_args_sssd_service_clearEnumCache; diff --git a/src/sss_iface/sss_iface.xml b/src/sss_iface/sss_iface.xml index 82c65aa0b84..3ec28d8d505 100644 --- a/src/sss_iface/sss_iface.xml +++ b/src/sss_iface/sss_iface.xml @@ -169,19 +169,19 @@ - + - - + + - + - - + + @@ -192,11 +192,11 @@ - - - - - - + + + + + +