summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
authorFabiano Fidêncio <fidencio@redhat.com>2016-12-02 18:10:47 +0100
committerLukas Slebodnik <lslebodn@redhat.com>2017-01-23 18:46:37 +0100
commit7622d9d97eb6747a9f3406633281f2492f8f4a0a (patch)
tree6a798c3f4d34fb86871be3b87f80339456dcd9bd /src/providers
parentb46c4c0d3e364636af1b42683cd3229ffa0b77cb (diff)
downloadsssd-7622d9d97eb6747a9f3406633281f2492f8f4a0a.tar.gz
sssd-7622d9d97eb6747a9f3406633281f2492f8f4a0a.tar.xz
sssd-7622d9d97eb6747a9f3406633281f2492f8f4a0a.zip
SBUS: Add destructor data to sbus_connection
This additions has a very specific reason: unregister a service when it's shutdown. So far, we never had to do this kind of operation because the services were started during SSSD's startup when finished when SSSD finished. Now, with the socket-activation in place the game will be a little bit different as the services will have an idle timeout and will be able shut themselves down. In order to do it properly the monitor will need to "unregister" the service and there's no way to do that without adding this destructor data to the sbus_connection structure and introducing a new function to access it from the monitor (where we're going to set the destructor function to the sbus_connection for the socket-activated services). So far it's not being used anywhere as every function taking it as parameter is just receiving NULL, but it will be used in the follow up commits, by the monitor. Related: https://fedorahosted.org/sssd/ticket/3245 Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/data_provider/dp.c2
-rw-r--r--src/providers/proxy/proxy_init.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/providers/data_provider/dp.c b/src/providers/data_provider/dp.c
index b672370aa..bab47f4d7 100644
--- a/src/providers/data_provider/dp.c
+++ b/src/providers/data_provider/dp.c
@@ -42,7 +42,7 @@ static errno_t dp_init_dbus_server(struct data_provider *provider)
ret = sbus_new_server(provider, provider->ev, sbus_address,
provider->uid, provider->gid, true,
&provider->srv_conn,
- dp_client_init, provider);
+ dp_client_init, provider, NULL);
talloc_free(sbus_address);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE, "Could not set up sbus server.\n");
diff --git a/src/providers/proxy/proxy_init.c b/src/providers/proxy/proxy_init.c
index 2241dafb8..7c9d3dafb 100644
--- a/src/providers/proxy/proxy_init.c
+++ b/src/providers/proxy/proxy_init.c
@@ -179,7 +179,7 @@ static errno_t proxy_setup_sbus(TALLOC_CTX *mem_ctx,
}
ret = sbus_new_server(mem_ctx, be_ctx->ev, sbus_address, 0, be_ctx->gid,
- false, &ctx->sbus_srv, proxy_client_init, ctx);
+ false, &ctx->sbus_srv, proxy_client_init, ctx, NULL);
talloc_free(sbus_address);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE, "Could not set up sbus server.\n");