summaryrefslogtreecommitdiffstats
path: root/src/responder/pam/pamsrv.h
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-04-08 23:59:12 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-05-06 22:15:37 +0200
commit127b7731f3e6a3d665c35fbca93f0c2bdb9a0983 (patch)
treefd13c961afe6d3254a49aa61e6f88c092b99fd97 /src/responder/pam/pamsrv.h
parentc45495c7a585da4de99e34c98223981a41cfd56d (diff)
downloadsssd-127b7731f3e6a3d665c35fbca93f0c2bdb9a0983.tar.gz
sssd-127b7731f3e6a3d665c35fbca93f0c2bdb9a0983.tar.xz
sssd-127b7731f3e6a3d665c35fbca93f0c2bdb9a0983.zip
Allocate PAM DP request data on responder context
https://fedorahosted.org/sssd/ticket/1869 Currently the private data passed to the PAM request is a structure allocated on the client context. But in the odd case where the back end would be stopped or stuck until the idle timeout hits, the DP callback would access data that were freed when the client timed out. This patch introduces a new structure allocated on responder context, whose only purpose is to live as long as the request is active.
Diffstat (limited to 'src/responder/pam/pamsrv.h')
-rw-r--r--src/responder/pam/pamsrv.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/responder/pam/pamsrv.h b/src/responder/pam/pamsrv.h
index 3ffc17087..c47d4bb16 100644
--- a/src/responder/pam/pamsrv.h
+++ b/src/responder/pam/pamsrv.h
@@ -38,6 +38,10 @@ struct pam_ctx {
time_t id_timeout;
};
+struct pam_auth_dp_req {
+ struct pam_auth_req *preq;
+};
+
struct pam_auth_req {
struct cli_ctx *cctx;
struct sss_domain_info *domain;
@@ -49,6 +53,8 @@ struct pam_auth_req {
struct ldb_result *res;
bool check_provider;
void *data;
+
+ struct pam_auth_dp_req *dpreq_spy;
};
struct sss_cmd_table *get_pam_cmds(void);