2004-03-23 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (gpgsm_new): Protect _only_ tty related code with isatty(). Submitted by Bernhard Herzog.
This commit is contained in:
parent
e17289e77c
commit
3816adb43a
@ -1,3 +1,8 @@
|
||||
2004-03-23 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* engine-gpgsm.c (gpgsm_new): Protect _only_ tty related code with
|
||||
isatty(). Submitted by Bernhard Herzog.
|
||||
|
||||
2004-03-11 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* engine-gpgsm.c (gpgsm_new): Protect all tty related code with
|
||||
|
@ -490,41 +490,41 @@ gpgsm_new (void **engine, const char *lc_ctype, const char *lc_messages)
|
||||
goto leave;
|
||||
}
|
||||
}
|
||||
|
||||
if (lc_ctype)
|
||||
{
|
||||
if (asprintf (&optstr, "OPTION lc-ctype=%s", lc_ctype) < 0)
|
||||
err = gpg_error_from_errno (errno);
|
||||
else
|
||||
{
|
||||
err = assuan_transact (gpgsm->assuan_ctx, optstr, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL);
|
||||
free (optstr);
|
||||
if (err)
|
||||
err = map_assuan_error (err);
|
||||
}
|
||||
}
|
||||
if (err)
|
||||
goto leave;
|
||||
|
||||
if (lc_messages)
|
||||
{
|
||||
if (asprintf (&optstr, "OPTION lc-messages=%s", lc_messages) < 0)
|
||||
err = gpg_error_from_errno (errno);
|
||||
else
|
||||
{
|
||||
err = assuan_transact (gpgsm->assuan_ctx, optstr, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL);
|
||||
free (optstr);
|
||||
if (err)
|
||||
err = map_assuan_error (err);
|
||||
}
|
||||
}
|
||||
if (err)
|
||||
goto leave;
|
||||
}
|
||||
}
|
||||
|
||||
if (lc_ctype)
|
||||
{
|
||||
if (asprintf (&optstr, "OPTION lc-ctype=%s", lc_ctype) < 0)
|
||||
err = gpg_error_from_errno (errno);
|
||||
else
|
||||
{
|
||||
err = assuan_transact (gpgsm->assuan_ctx, optstr, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL);
|
||||
free (optstr);
|
||||
if (err)
|
||||
err = map_assuan_error (err);
|
||||
}
|
||||
}
|
||||
if (err)
|
||||
goto leave;
|
||||
|
||||
if (lc_messages)
|
||||
{
|
||||
if (asprintf (&optstr, "OPTION lc-messages=%s", lc_messages) < 0)
|
||||
err = gpg_error_from_errno (errno);
|
||||
else
|
||||
{
|
||||
err = assuan_transact (gpgsm->assuan_ctx, optstr, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL);
|
||||
free (optstr);
|
||||
if (err)
|
||||
err = map_assuan_error (err);
|
||||
}
|
||||
}
|
||||
if (err)
|
||||
goto leave;
|
||||
|
||||
if (!err
|
||||
&& (_gpgme_io_set_close_notify (gpgsm->status_cb.fd,
|
||||
close_notify_handler, gpgsm)
|
||||
|
Loading…
Reference in New Issue
Block a user