summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2012-02-02 09:05:40 -0500
committerStephen Gallagher <sgallagh@redhat.com>2012-02-06 08:25:22 -0500
commit2d0550acbe07024d034fb616c1ec5b81929c4844 (patch)
tree9aac97e66e59313400936f52b0635f9e716896cd /src/providers
parent16dff70ac66222e3b457790443cb283b1486e59e (diff)
downloadsssd-2d0550acbe07024d034fb616c1ec5b81929c4844.tar.gz
sssd-2d0550acbe07024d034fb616c1ec5b81929c4844.tar.xz
sssd-2d0550acbe07024d034fb616c1ec5b81929c4844.zip
Add session target in data provider
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/data_provider_be.c20
-rw-r--r--src/providers/dp_backend.h1
2 files changed, 20 insertions, 1 deletions
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c
index 367b374fd..e7ba98fdf 100644
--- a/src/providers/data_provider_be.c
+++ b/src/providers/data_provider_be.c
@@ -109,6 +109,7 @@ static struct bet_data bet_data[] = {
{BET_CHPASS, CONFDB_DOMAIN_CHPASS_PROVIDER, "sssm_%s_chpass_init"},
{BET_SUDO, CONFDB_DOMAIN_SUDO_PROVIDER, "sssm_%s_sudo_init"},
{BET_AUTOFS, CONFDB_DOMAIN_SUDO_PROVIDER, "sssm_%s_autofs_init"},
+ {BET_SESSION, CONFDB_DOMAIN_SESSION_PROVIDER, "sssm_%s_session_init"},
{BET_MAX, NULL, NULL}
};
@@ -577,8 +578,10 @@ static int be_pam_handler(DBusMessage *message, struct sbus_connection *conn)
case SSS_PAM_CHAUTHTOK_PRELIM:
target = BET_CHPASS;
break;
- case SSS_PAM_SETCRED:
case SSS_PAM_OPEN_SESSION:
+ target = BET_SESSION;
+ break;
+ case SSS_PAM_SETCRED:
case SSS_PAM_CLOSE_SESSION:
pd->pam_status = PAM_SUCCESS;
goto done;
@@ -1697,6 +1700,21 @@ int be_process_init(TALLOC_CTX *mem_ctx,
"from provider [%s].\n", ctx->bet_info[BET_AUTOFS].mod_name));
}
+ ret = load_backend_module(ctx, BET_SESSION,
+ &ctx->bet_info[BET_SESSION],
+ ctx->bet_info[BET_ID].mod_name);
+ if (ret != EOK) {
+ if (ret != ENOENT) {
+ DEBUG(SSSDBG_FATAL_FAILURE, ("fatal error initializing data providers\n"));
+ return ret;
+ }
+ DEBUG(SSSDBG_CRIT_FAILURE, ("No Session module provided for [%s] !!\n",
+ be_domain));
+ } else {
+ DEBUG(SSSDBG_TRACE_ALL, ("Session backend target successfully loaded "
+ "from provider [%s].\n", ctx->bet_info[BET_SUDO].mod_name));
+ }
+
/* Handle SIGUSR1 to force offline behavior */
BlockSignals(false, SIGUSR1);
tes = tevent_add_signal(ctx->ev, ctx, SIGUSR1, 0,
diff --git a/src/providers/dp_backend.h b/src/providers/dp_backend.h
index c053538ba..68b2fa109 100644
--- a/src/providers/dp_backend.h
+++ b/src/providers/dp_backend.h
@@ -51,6 +51,7 @@ enum bet_type {
BET_CHPASS,
BET_SUDO,
BET_AUTOFS,
+ BET_SESSION,
BET_MAX
};