summaryrefslogtreecommitdiffstats
path: root/src/responder/secrets/secsrv.c
diff options
context:
space:
mode:
authorFabiano Fidêncio <fidencio@redhat.com>2016-11-16 18:01:39 +0100
committerLukas Slebodnik <lslebodn@redhat.com>2017-01-23 18:46:37 +0100
commitb1829f05cf9bdc3d89c1058481281198ebc968d0 (patch)
treee20330646588306aa255ee35087e4496f7e32caa /src/responder/secrets/secsrv.c
parent9e59f73f81612f60c02ec7c23e14db9cebb28e29 (diff)
downloadsssd-b1829f05cf9bdc3d89c1058481281198ebc968d0.tar.gz
sssd-b1829f05cf9bdc3d89c1058481281198ebc968d0.tar.xz
sssd-b1829f05cf9bdc3d89c1058481281198ebc968d0.zip
RESPONDER: Make responders' common code ready for socket activation
Instead of simply setting the unix socket during the process initialization, let's make it socket-activatable. It's the first step in order to have socket-activated responders and doesn't introduce any kind of regression with the current code. Also, we must avoid setting the responders fds to -1 in all cases as it may have cause the socket to be unreachable in case the administrator decides to move back from socket-activation to using the services line in sssd.conf. With this change, the responders will have to activelly set their sockets fd to -1 before calling activate_unix_sockets(), which is already done everyone but in Secrets and in one piece of PAM responder. Related: https://fedorahosted.org/sssd/ticket/2243 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/responder/secrets/secsrv.c')
-rw-r--r--src/responder/secrets/secsrv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/responder/secrets/secsrv.c b/src/responder/secrets/secsrv.c
index 09b0d2251..28eca9d20 100644
--- a/src/responder/secrets/secsrv.c
+++ b/src/responder/secrets/secsrv.c
@@ -136,6 +136,8 @@ static int sec_process_init(TALLOC_CTX *mem_ctx,
rctx->sock_name = SSS_SEC_SOCKET_NAME;
rctx->confdb_service_path = CONFDB_SEC_CONF_ENTRY;
rctx->shutting_down = false;
+ rctx->lfd = -1;
+ rctx->priv_lfd = -1;
talloc_set_destructor((TALLOC_CTX*)rctx, sec_responder_ctx_destructor);