aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 18df7de67..96a0c345c 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -1029,6 +1029,7 @@ static struct debug_flags_s debug_flags [] =
/* The list of compatibility flags. */
static struct compatibility_flags_s compatibility_flags [] =
{
+ { COMPAT_PARALLELIZED, "parallelized" },
{ 0, NULL }
};
@@ -1080,10 +1081,6 @@ static void read_sessionkey_from_fd (int fd);
-/* NPth wrapper function definitions. */
-ASSUAN_SYSTEM_NPTH_IMPL;
-
-
static char *
make_libversion (const char *libname, const char *(*getfnc)(const char*))
{
@@ -3876,8 +3873,8 @@ main (int argc, char **argv)
/* Init threading which is used by some helper functions. */
npth_init ();
- assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH);
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
+ assuan_control (ASSUAN_CONTROL_REINIT_SYSCALL_CLAMP, NULL);
if (logfile)
{
@@ -4421,7 +4418,8 @@ main (int argc, char **argv)
{
if( argc > 1 )
wrong_args("--encrypt [filename]");
- if( (rc = encrypt_crypt (ctrl, -1, fname, remusr, 0, NULL, -1)) )
+ if ((rc = encrypt_crypt (ctrl, GNUPG_INVALID_FD, fname, remusr,
+ 0, NULL, GNUPG_INVALID_FD)))
{
write_status_failure ("encrypt", rc);
log_error("%s: encryption failed: %s\n",
@@ -4446,7 +4444,8 @@ main (int argc, char **argv)
gnupg_compliance_option_string (opt.compliance));
else
{
- if( (rc = encrypt_crypt (ctrl, -1, fname, remusr, 1, NULL, -1)) )
+ if ((rc = encrypt_crypt (ctrl, GNUPG_INVALID_FD, fname, remusr,
+ 1, NULL, GNUPG_INVALID_FD)))
{
write_status_failure ("encrypt", rc);
log_error ("%s: encryption failed: %s\n",
@@ -5633,13 +5632,13 @@ print_mds( const char *fname, int algo )
}
else
{
- fp = es_fopen (fname, "rb" );
- if (fp && is_secured_file (es_fileno (fp)))
+ if (is_secured_filename (fname))
{
- es_fclose (fp);
fp = NULL;
gpg_err_set_errno (EPERM);
}
+ else
+ fp = es_fopen (fname, "rb" );
}
if (!fp)
{