diff options
author | Simo Sorce <simo@redhat.com> | 2016-01-07 10:17:35 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2016-06-29 21:46:45 +0200 |
commit | a8d1a344e580f29699aed9b88d87fc3c6f5d113b (patch) | |
tree | a43498d533672f7f929543b87d5b38b3ec2e5e2c /src/responder/common | |
parent | 85bd23a89282c96487e64872ac955e271e445d0b (diff) | |
download | sssd-a8d1a344e580f29699aed9b88d87fc3c6f5d113b.tar.gz sssd-a8d1a344e580f29699aed9b88d87fc3c6f5d113b.tar.xz sssd-a8d1a344e580f29699aed9b88d87fc3c6f5d113b.zip |
Secrets: Add initial responder code for secrets service
Start implementing the Secrets Service Reponder core.
This commit implements stratup and basic conenction handling and HTTP
parsing (using the http-parser library).
Signed-off-by: Simo Sorce <simo@redhat.com>
Related:
https://fedorahosted.org/sssd/ticket/2913
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/responder/common')
-rw-r--r-- | src/responder/common/responder.h | 6 | ||||
-rw-r--r-- | src/responder/common/responder_common.c | 17 |
2 files changed, 11 insertions, 12 deletions
diff --git a/src/responder/common/responder.h b/src/responder/common/responder.h index 8db9e9894..23e7d46f8 100644 --- a/src/responder/common/responder.h +++ b/src/responder/common/responder.h @@ -319,6 +319,12 @@ bool sss_utf8_check(const uint8_t *s, size_t n); void responder_set_fd_limit(rlim_t fd_limit); +errno_t reset_idle_timer(struct cli_ctx *cctx); +void idle_handler(struct tevent_context *ev, + struct tevent_timer *te, + struct timeval current_time, + void *data); + #define GET_DOMAINS_DEFAULT_TIMEOUT 60 struct tevent_req *sss_dp_get_domains_send(TALLOC_CTX *mem_ctx, diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c index 6fb2ed365..f519b8488 100644 --- a/src/responder/common/responder_common.c +++ b/src/responder/common/responder_common.c @@ -347,8 +347,6 @@ static void client_recv(struct cli_ctx *cctx) return; } -static errno_t reset_idle_timer(struct cli_ctx *cctx); - static void client_fd_handler(struct tevent_context *ev, struct tevent_fd *fde, uint16_t flags, void *ptr) @@ -381,11 +379,6 @@ struct accept_fd_ctx { connection_setup_t connection_setup; }; -static void idle_handler(struct tevent_context *ev, - struct tevent_timer *te, - struct timeval current_time, - void *data); - static void accept_fd_handler(struct tevent_context *ev, struct tevent_fd *fde, uint16_t flags, void *ptr) @@ -521,7 +514,7 @@ static void accept_fd_handler(struct tevent_context *ev, return; } -static errno_t reset_idle_timer(struct cli_ctx *cctx) +errno_t reset_idle_timer(struct cli_ctx *cctx) { struct timeval tv = tevent_timeval_current_ofs(cctx->rctx->client_idle_timeout, 0); @@ -538,10 +531,10 @@ static errno_t reset_idle_timer(struct cli_ctx *cctx) return EOK; } -static void idle_handler(struct tevent_context *ev, - struct tevent_timer *te, - struct timeval current_time, - void *data) +void idle_handler(struct tevent_context *ev, + struct tevent_timer *te, + struct timeval current_time, + void *data) { /* This connection is idle. Terminate it */ struct cli_ctx *cctx = |