[SSSD] [PATCH] PAM: Make p11_child timeout configurable
Michal Židek
mzidek at redhat.com
Mon Sep 21 11:17:24 UTC 2015
On 09/20/2015 05:07 PM, Pavel Reichl wrote:
>
>
> On 09/18/2015 05:07 PM, Michal Židek wrote:
>> +static errno_t check_cert(struct cli_ctx *cctx,
>> + struct pam_ctx *pctx,
>> + struct tevent_req *req,
>
> What's the point of parameter *req? You are not reading it and if you
> want to use it as output parameter you should use **_req, right?
>
>> + struct pam_auth_req *preq,
>> + struct pam_data *pd)
>> +{
>> + int p11_child_timeout;
>> + const int P11_CHILD_TIMEOUT_DEFAULT = 10;
>> + errno_t ret;
>> +
>> + ret = confdb_get_int(pctx->rctx->cdb, CONFDB_PAM_CONF_ENTRY,
>> + CONFDB_PAM_P11_CHILD_TIMEOUT,
>> + P11_CHILD_TIMEOUT_DEFAULT,
>> + &p11_child_timeout);
>> + if (ret != EOK) {
>> + DEBUG(SSSDBG_CRIT_FAILURE,
>> + "Failed to read p11_child_timeout from confdb: [%d]:
>> %s\n",
>> + ret, sss_strerror(ret));
>> + return ret;
>> + }
>> +
>> + req = pam_check_cert_send(cctx, cctx->ev, pctx->p11_child_debug_fd,
>> + pctx->nss_db, p11_child_timeout, pd);
>> + if (req == NULL) {
>> + DEBUG(SSSDBG_OP_FAILURE, "pam_check_cert_send failed.\n");
>> + return ENOMEM;
>> + } else {
>> + tevent_req_set_callback(req, pam_forwarder_cert_cb, preq);
>> + return EAGAIN;
>> + }
>> +
>> + return EOK;
>> +
>> +}
Hi,
new patches attached.
Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PAM-Make-p11_child-timeout-configurable.patch
Type: text/x-patch
Size: 6717 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150921/1e0b8937/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-tests-Set-p11_child_timeout-to-30-in-tests.patch
Type: text/x-patch
Size: 3059 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150921/1e0b8937/attachment-0001.bin>
More information about the sssd-devel
mailing list