summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
authorNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>2017-01-12 19:10:25 +0200
committerJakub Hrozek <jhrozek@redhat.com>2017-07-27 10:32:33 +0200
commit29dd456102dc995aa59a56483363087071bb84d6 (patch)
tree83da91dd2a703cba58e4cf9f887a65d5a6ab2f08 /src/responder
parent99b96048b79b0228c3f7c431ea12010f7bd5b362 (diff)
downloadsssd-29dd456102dc995aa59a56483363087071bb84d6.tar.gz
sssd-29dd456102dc995aa59a56483363087071bb84d6.tar.xz
sssd-29dd456102dc995aa59a56483363087071bb84d6.zip
RESPONDER: Add session recording conf loading
Add session recording configuration loading to the common responder initialization. To be used for substituting the user shell when session recording is enabled. Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/common/responder.h3
-rw-r--r--src/responder/common/responder_common.c9
2 files changed, 12 insertions, 0 deletions
diff --git a/src/responder/common/responder.h b/src/responder/common/responder.h
index ba5b73bcc..a97476ca7 100644
--- a/src/responder/common/responder.h
+++ b/src/responder/common/responder.h
@@ -38,6 +38,7 @@
#include "responder/common/negcache.h"
#include "sss_client/sss_cli.h"
#include "responder/common/cache_req/cache_req_domain.h"
+#include "util/session_recording.h"
extern hash_table_t *dp_requests;
@@ -146,6 +147,8 @@ struct resp_ctx {
char *shell_fallback;
char *default_shell;
+ struct session_recording_conf sr_conf;
+
uint32_t cache_req_num;
void *pvt_ctx;
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
index edf6a34bd..6b4d2d9e5 100644
--- a/src/responder/common/responder_common.c
+++ b/src/responder/common/responder_common.c
@@ -1301,6 +1301,15 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
&rctx->default_shell);
if (ret != EOK) goto fail;
+ /* Read session_recording section */
+ ret = session_recording_conf_load(rctx, rctx->cdb, &rctx->sr_conf);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_OP_FAILURE,
+ "Failed loading session recording configuration: %s\n",
+ strerror(ret));
+ goto fail;
+ }
+
ret = sss_monitor_init(rctx, rctx->ev, monitor_intf,
svc_name, svc_version, MT_SVC_SERVICE,
rctx, &rctx->last_request_time,