Commit 45d4a02b authored by Eric Dorland's avatar Eric Dorland

Imported gnupg2-2.0.9.orig

Summary: Imported gnupg2-2.0.9.orig
Keywords:

Imported gnupg2-2.0.9.orig
into Git repository
parent 47b4fd25
This source diff could not be displayed because it is too large. You can view the blob instead.
2008-02-19 Werner Koch <wk@g10code.com>
* configure.ac: Remove --with-pkits-tests.
2008-02-15 Werner Koch <wk@g10code.com>
* gl/allocsa.h, gl/m4/allocsa.m4: Replace HAVE_LONG_LONG by
HAVE_LONG_LONG_INT.
2008-02-15 gettextize <bug-gnu-gettext@gnu.org>
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
2007-12-20 Werner Koch <wk@g10code.com>
Released 2.0.8.
......
......@@ -146,6 +146,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FAQPROG = @FAQPROG@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNUPG_AGENT_PGM = @GNUPG_AGENT_PGM@
......@@ -251,6 +252,7 @@ WINDRES = @WINDRES@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
ZLIBS = @ZLIBS@
_libcurl_config = @_libcurl_config@
abs_builddir = @abs_builddir@
......
Noteworthy changes in version 2.0.9 (2008-03-26)
------------------------------------------------
* Gpgsm always tries to locate missing certificates from a running
Dirmngr's cache.
* Tweaks for Windows.
* The Admin PIN for OpenPGP cards may now be entered with the pinpad.
* Improved certificate chain construction.
* Extended the PKITS framework.
* Fixed a bug in the ambigious name detection.
* Fixed possible memory corruption while importing OpenPGP keys (bug
introduced with 2.0.8).
* Minor bug fixes.
Noteworthy changes in version 2.0.8 (2007-12-20)
------------------------------------------------
......
......@@ -2,8 +2,8 @@
=========================
Version 2.0
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007 Free Software Foundation, Inc.
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008 Free Software Foundation, Inc.
INTRODUCTION
......@@ -64,6 +64,8 @@ behaves just like gpg.
In case of problem please ask on gnupg-users@gnupg.org for advise. Note
that this release is only expected to build on GNU and *BSD systems.
Note that the PKITS tests are always skipped unless you copy the PKITS
test data file into the tests/pkits directory.
DOCUMENTATION
......@@ -80,7 +82,6 @@ manual pertaining to the current development snapshot is at
http://www.gnupg.org/documentation/manuals/gnupg-devel/ .
GNUPG 1.4 AND GNUPG 2.0
=======================
......
......@@ -180,6 +180,7 @@ Oskari Jääskeläinen f33003a at cc.hut.fi
Pascal Scheffers Pascal at scheffers.net
Paul D. Smith psmith at baynetworks.com
Per Cederqvist ceder at lysator.liu.se
Petr Cerny pcerny at suse.cz
Phil Blundell pb at debian.org
Philippe Laliberte arsphl at oeil.qc.ca
Peter Fales psfales at lucent.com
......
......@@ -23,7 +23,6 @@
** mark all unimplemented commands and options.
** Implement --default-key
** support the anyPolicy semantic
** Check that we are really following the verification procedures in rfc3280.
* sm/keydb.c
......@@ -69,13 +68,13 @@
not a real problem because application will get a card removed
status and should the send a reset to try solving the problem.
** Add a test to check the extkeyusage.
** Add a regression test to check the extkeyusage.
* Windows port (W32)
** No card status notifications.
** Regex support is disabled
We need to adjust the test to find the regex we have anyway in
gpg4in. Is that regex compatible to the OpenPGP requirement?
gpg4win. Is that regex compatible to the OpenPGP requirement?
* sm/
......@@ -125,10 +124,6 @@
* Howtos
** Migrate OpenPGP keys to another system
* Duplicate certificates
This may happen and lead to an Ambiguous Name error. Solution is to
check the certs for identity before throwing this error.
* Gpg-Agent Locale
Although we pass LC_MESSAGE from gpgsm et al. to Pinentry, this has
only an effect on the stock GTK strings (e.g. "OK") and not on any
......@@ -137,4 +132,3 @@
gpg-agent's default locale (e.g. by the command updatestartuptty).
......@@ -16,8 +16,60 @@ m4_if(m4_PACKAGE_VERSION, [2.61],,
You have another version of autoconf. If you want to use that,
you should regenerate the build system entirely.], [63])])
# longlong.m4 serial 8
dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
# intlmacosx.m4 serial 1 (gettext-0.17)
dnl Copyright (C) 2004-2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
dnl This file can can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
dnl gettext package package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl Checks for special options needed on MacOS X.
dnl Defines INTL_MACOSX_LIBS.
AC_DEFUN([gt_INTL_MACOSX],
[
dnl Check for API introduced in MacOS X 10.2.
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
gt_cv_func_CFPreferencesCopyAppValue,
[gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
[CFPreferencesCopyAppValue(NULL, NULL)],
[gt_cv_func_CFPreferencesCopyAppValue=yes],
[gt_cv_func_CFPreferencesCopyAppValue=no])
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
fi
dnl Check for API introduced in MacOS X 10.3.
AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
[gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
[gt_cv_func_CFLocaleCopyCurrent=yes],
[gt_cv_func_CFLocaleCopyCurrent=no])
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
fi
INTL_MACOSX_LIBS=
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
fi
AC_SUBST([INTL_MACOSX_LIBS])
])
# longlong.m4 serial 13
dnl Copyright (C) 1999-2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
......@@ -25,28 +77,43 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Paul Eggert.
# Define HAVE_LONG_LONG_INT if 'long long int' works.
# This fixes a bug in Autoconf 2.60, but can be removed once we
# assume 2.61 everywhere.
# This fixes a bug in Autoconf 2.61, but can be removed once we
# assume 2.62 everywhere.
# Note: If the type 'long long int' exists but is only 32 bits large
# (as on some very old compilers), AC_TYPE_LONG_LONG_INT will not be
# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
# defined. In this case you can treat 'long long int' like 'long int'.
AC_DEFUN([AC_TYPE_LONG_LONG_INT],
[
AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[long long int ll = 9223372036854775807ll;
long long int nll = -9223372036854775807LL;
typedef int a[((-9223372036854775807LL < 0
&& 0 < 9223372036854775807ll)
? 1 : -1)];
int i = 63;]],
[[long long int llmax = 9223372036854775807ll;
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
| (llmax / ll) | (llmax % ll));]])],
[ac_cv_type_long_long_int=yes],
[_AC_TYPE_LONG_LONG_SNIPPET],
[dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
dnl If cross compiling, assume the bug isn't important, since
dnl nobody cross compiles for this platform as far as we know.
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[@%:@include <limits.h>
@%:@ifndef LLONG_MAX
@%:@ define HALF \
(1LL << (sizeof (long long int) * CHAR_BIT - 2))
@%:@ define LLONG_MAX (HALF - 1 + HALF)
@%:@endif]],
[[long long int n = 1;
int i;
for (i = 0; ; i++)
{
long long int m = n << i;
if (m >> i != n)
return 1;
if (LLONG_MAX / 2 < m)
break;
}
return 0;]])],
[ac_cv_type_long_long_int=yes],
[ac_cv_type_long_long_int=no],
[ac_cv_type_long_long_int=yes])],
[ac_cv_type_long_long_int=no])])
if test $ac_cv_type_long_long_int = yes; then
AC_DEFINE([HAVE_LONG_LONG_INT], 1,
......@@ -54,28 +121,9 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
fi
])
# This macro is obsolescent and should go away soon.
AC_DEFUN([gl_AC_TYPE_LONG_LONG],
[
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
ac_cv_type_long_long=$ac_cv_type_long_long_int
if test $ac_cv_type_long_long = yes; then
AC_DEFINE(HAVE_LONG_LONG, 1,
[Define if you have the 'long long' type.])
fi
])
# ulonglong.m4 serial 6
dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Paul Eggert.
# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
# This fixes a bug in Autoconf 2.60, but can be removed once we
# assume 2.61 everywhere.
# This fixes a bug in Autoconf 2.61, but can be removed once we
# assume 2.62 everywhere.
# Note: If the type 'unsigned long long int' exists but is only 32 bits
# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
......@@ -87,14 +135,7 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
AC_CACHE_CHECK([for unsigned long long int],
[ac_cv_type_unsigned_long_long_int],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[unsigned long long int ull = 18446744073709551615ULL;
typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1
? 1 : -1)];
int i = 63;]],
[[unsigned long long int ullmax = 18446744073709551615ull;
return (ull << 63 | ull >> 63 | ull << i | ull >> i
| ullmax / ull | ullmax % ull);]])],
[_AC_TYPE_LONG_LONG_SNIPPET],
[ac_cv_type_unsigned_long_long_int=yes],
[ac_cv_type_unsigned_long_long_int=no])])
if test $ac_cv_type_unsigned_long_long_int = yes; then
......@@ -103,15 +144,38 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
fi
])
# This macro is obsolescent and should go away soon.
AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
# Expands to a C program that can be used to test for simultaneous support
# of 'long long' and 'unsigned long long'. We don't want to say that
# 'long long' is available if 'unsigned long long' is not, or vice versa,
# because too many programs rely on the symmetry between signed and unsigned
# integer types (excluding 'bool').
AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
[
AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int
if test $ac_cv_type_unsigned_long_long = yes; then
AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
[Define if you have the 'unsigned long long' type.])
fi
AC_LANG_PROGRAM(
[[/* Test preprocessor. */
#if ! (-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
error in preprocessor;
#endif
#if ! (18446744073709551615ULL <= -1ull)
error in preprocessor;
#endif
/* Test literals. */
long long int ll = 9223372036854775807ll;
long long int nll = -9223372036854775807LL;
unsigned long long int ull = 18446744073709551615ULL;
/* Test constant expressions. */
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
? 1 : -1)];
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
? 1 : -1)];
int i = 63;]],
[[/* Test availability of runtime routines for shift and division. */
long long int llmax = 9223372036854775807ll;
unsigned long long int ullmax = 18446744073709551615ull;
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
| (llmax / ll) | (llmax % ll)
| (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
| (ullmax / ull) | (ullmax % ull));]])
])
# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
......
2008-03-17 Werner Koch <wk@g10code.com>
* agent.h (agent_inq_pinentry_launched): New prototype.
* call-pinentry.c: Include sys/types.h and signal.h.
2008-02-14 Werner Koch <wk@g10code.com>
* command.c (agent_inq_pinentry_launched): New.
(option_handler): Add option allow-pinentry-notify.
* call-pinentry.c (getinfo_pid_cb): New.
(start_pinentry): Ask for the PID and notify the client.
2008-01-15 Marcus Brinkmann <marcus@g10code.de>
* call-pinentry.c (start_pinentry): Start pinentry in detached
mode.
2007-12-04 Werner Koch <wk@g10code.com>
* call-pinentry.c (agent_askpin): Use gnupg_get_help_string.
......
......@@ -200,6 +200,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FAQPROG = @FAQPROG@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNUPG_AGENT_PGM = @GNUPG_AGENT_PGM@
......@@ -305,6 +306,7 @@ WINDRES = @WINDRES@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
ZLIBS = @ZLIBS@
_libcurl_config = @_libcurl_config@
abs_builddir = @abs_builddir@
......
......@@ -211,6 +211,7 @@ void *get_agent_scd_notify_event (void);
void agent_sighup_action (void);
/*-- command.c --*/
gpg_error_t agent_inq_pinentry_launched (ctrl_t ctrl, unsigned long pid);
gpg_error_t agent_write_status (ctrl_t ctrl, const char *keyword, ...);
void bump_key_eventcounter (void);
void bump_card_eventcounter (void);
......
/* call-pinentry.c - fork of the pinentry to query stuff from the user
* Copyright (C) 2001, 2002, 2004, 2007 Free Software Foundation, Inc.
* Copyright (C) 2001, 2002, 2004, 2007, 2008 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
......@@ -27,7 +27,9 @@
#include <unistd.h>
#include <sys/stat.h>
#ifndef HAVE_W32_SYSTEM
#include <sys/wait.h>
# include <sys/wait.h>
# include <sys/types.h>
# include <signal.h>
#endif
#include <pth.h>
#include <assuan.h>
......@@ -177,6 +179,23 @@ atfork_cb (void *opaque, int where)
}
}
static int
getinfo_pid_cb (void *opaque, const void *buffer, size_t length)
{
unsigned long *pid = opaque;
char pidbuf[50];
/* There is only the pid in the server's response. */
if (length >= sizeof pidbuf)
length = sizeof pidbuf -1;
if (length)
{
strncpy (pidbuf, buffer, length);
pidbuf[length] = 0;
*pid = strtoul (pidbuf, NULL, 10);
}
return 0;
}
/* Fork off the pin entry if this has not already been done. Note,
that this function must always be used to aquire the lock for the
......@@ -193,6 +212,7 @@ start_pinentry (ctrl_t ctrl)
int i;
pth_event_t evt;
const char *tmpstr;
unsigned long pinentry_pid;
evt = pth_event (PTH_EVENT_TIME, pth_timeout (LOCK_TIMEOUT, 0));
if (!pth_mutex_acquire (&entry_lock, 0, evt))
......@@ -271,9 +291,11 @@ start_pinentry (ctrl_t ctrl)
no_close_list[i] = -1;
/* Connect to the pinentry and perform initial handshaking. Note
that atfork is used to change the environment for pinentry. */
that atfork is used to change the environment for pinentry. We
start the server in detached mode to suppress the console window
under Windows. */
rc = assuan_pipe_connect_ext (&ctx, opt.pinentry_program, argv,
no_close_list, atfork_cb, ctrl, 0);
no_close_list, atfork_cb, ctrl, 128);
if (rc)
{
log_error ("can't connect to the PIN entry module: %s\n",
......@@ -355,9 +377,33 @@ start_pinentry (ctrl_t ctrl)
}
}
/* Now ask the Pinentry for its PID. If the Pinentry is new enough
it will send the pid back and we will use an inquire to notify
our client. The client may answer the inquiry either with END or
with CAN to cancel the pinentry. */
rc = assuan_transact (entry_ctx, "GETINFO pid",
getinfo_pid_cb, &pinentry_pid,
NULL, NULL, NULL, NULL);
if (rc)
{
log_info ("You may want to update to a newer pinentry\n");
rc = 0;
}
else if (!rc && (pid_t)pinentry_pid == (pid_t)(-1))
log_error ("pinentry did not return a PID\n");
else
{
rc = agent_inq_pinentry_launched (ctrl, pinentry_pid);
if (gpg_err_code (rc) == GPG_ERR_CANCELED)
return unlock_pinentry (gpg_error (GPG_ERR_CANCELED));
rc = 0;
}
return 0;
}
/* Returns True is the pinentry is currently active. If WAITSECONDS is
greater than zero the function will wait for this many seconds
before returning. */
......
/* command.c - gpg-agent command handler
* Copyright (C) 2001, 2002, 2003, 2004, 2005,
* 2006 Free Software Foundation, Inc.
* 2006, 2008 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
......@@ -60,6 +60,8 @@ struct server_local_s
int stopme; /* If set to true the agent will be terminated after
the end of this session. */
#endif
int allow_pinentry_notify; /* Set if pinentry notifications should
be done. */
};
......@@ -318,6 +320,22 @@ agent_write_status (ctrl_t ctrl, const char *keyword, ...)
}
/* Helper to notify the client about a launched Pinentry. Because
that might disturb some older clients, this is only done if enabled
via an option. Returns an gpg error code. */
gpg_error_t
agent_inq_pinentry_launched (ctrl_t ctrl, unsigned long pid)
{
char line[100];
if (!ctrl || !ctrl->server_local
|| !ctrl->server_local->allow_pinentry_notify)
return 0;
snprintf (line, DIM(line)-1, "PINENTRY_LAUNCHED %lu", pid);
return assuan_inquire (ctrl->server_local->assuan_ctx, line, NULL, NULL, 0);
}
/* GETEVENTCOUNTER
......@@ -697,7 +715,7 @@ cmd_pkdecrypt (assuan_context_t ctx, char *line)
part. Here is an example transaction:
C: GENKEY
S: INQUIRE KEYPARM
S: INQUIRE KEYPARAM
C: D (genkey (rsa (nbits 1024)))
C: END
S: D (public-key
......@@ -1465,6 +1483,8 @@ option_handler (assuan_context_t ctx, const char *key, const char *value)
}
else if (!strcmp (key, "use-cache-for-signing"))
ctrl->server_local->use_cache_for_signing = *value? atoi (value) : 0;
else if (!strcmp (key, "allow-pinentry-notify"))
ctrl->server_local->allow_pinentry_notify = 1;
else
return gpg_error (GPG_ERR_UNKNOWN_OPTION);
......
2008-03-25 Werner Koch <wk@g10code.com>
* localename.c: Strip all W32 code. Include w32help.h.
(gnupg_messages_locale_name) [W32]: Use the gettext_localename.
2008-03-17 Werner Koch <wk@g10code.com>
* iobuf.c (IOBUF_BUFFER_SIZE): Actually use this macro.
* simple-pwquery.c (agent_send_all_options): Fix last change.
2008-03-06 Werner Koch <wk@g10code.com>
* simple-pwquery.c (agent_send_all_options): Add support for
XAUTHORITY and PINENTRY_USER_DATA.
2008-02-15 Marcus Brinkmann <marcus@g10code.de>
* exechelp.c (gnupg_spawn_process_fd): Add flag DETACHED_PROCESS
unconditionally (required for all callers at the moment).
2008-02-14 Werner Koch <wk@g10code.com>
* sysutils.c (gnupg_allow_set_foregound_window): New.
(WINVER) [W32]: Define.
2008-01-31 Werner Koch <wk@g10code.com>
* audit.c (audit_print_result): Make sure that the output is
always UTF8.
2008-01-27 Werner Koch <wk@g10code.com>
* exechelp.c (gnupg_spawn_process): Add arg FLAGS and changed all
callers to pass 0 for it.
2007-12-13 Werner Koch <wk@g10code.com>
* sexputil.c (hash_algo_from_sigval): New.
......
......@@ -272,6 +272,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FAQPROG = @FAQPROG@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNUPG_AGENT_PGM = @GNUPG_AGENT_PGM@
......@@ -377,6 +378,7 @@ WINDRES = @WINDRES@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
ZLIBS = @ZLIBS@
_libcurl_config = @_libcurl_config@
abs_builddir = @abs_builddir@
......
......@@ -938,10 +938,13 @@ audit_print_result (audit_ctx_t ctx, estream_t out, int use_html)
helptag_t helptag;
const char *s;
int show_raw = 0;
char *orig_codeset;
if (!ctx)
return;
orig_codeset = i18n_switchto_utf8 ();
/* We use an environment variable to include some debug info in the
log. */
if ((s = getenv ("gnupg_debug_audit")))
......@@ -1090,5 +1093,6 @@ audit_print_result (audit_ctx_t ctx, estream_t out, int use_html)
ctx->outstream = NULL;
ctx->use_html = 0;
clear_helptags (ctx);
i18n_switchback (orig_codeset);
}
/* exechelp.c - fork and exec helpers
* Copyright (C) 2004, 2007 Free Software Foundation, Inc.
* Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
......@@ -322,11 +322,18 @@ gnupg_create_inbound_pipe (int filedes[2])
PREEXEC is not NULL, that function will be called right before the
exec. Calling gnupg_wait_process is required.
FLAGS is a bit vector with just one bit defined for now:
Bit 7: If set the process will be started as a background process.
This flag is only useful under W32 systems, so that no new
console is created and pops up a console window when
starting the server
Returns 0 on success or an error code. */
gpg_error_t
gnupg_spawn_process (const char *pgmname, const char *argv[],
FILE *infile, FILE *outfile,
void (*preexec)(void),
void (*preexec)(void), unsigned int flags,
FILE **statusfile, pid_t *pid)
{
#ifdef HAVE_W32_SYSTEM
......@@ -384,6 +391,7 @@ gnupg_spawn_process (const char *pgmname, const char *argv[],
si.hStdError = fd_to_handle (rp[1]);
cr_flags = (CREATE_DEFAULT_ERROR_MODE
| ((flags & 128)? DETACHED_PROCESS : 0)
| GetPriorityClass (GetCurrentProcess ())
| CREATE_SUSPENDED);
log_debug ("CreateProcess, path=`%s' cmdline=`%s'\n", pgmname, cmdline);
......@@ -554,7 +562,7 @@ gnupg_spawn_process_fd (const char *pgmname, const char *argv[],
TRUE, /* Inherit handles. */
(CREATE_DEFAULT_ERROR_MODE
| GetPriorityClass (GetCurrentProcess ())
| CREATE_SUSPENDED),
| CREATE_SUSPENDED | DETACHED_PROCESS),
NULL, /* Environment. */
NULL, /* Use current drive/directory. */
&si, /* Startup information. */
......
......@@ -30,13 +30,14 @@ gpg_error_t gnupg_create_inbound_pipe (int filedes[2]);
stdin, write the output to OUTFILE, return a new stream in
STATUSFILE for stderr and the pid of the process in PID. The
arguments for the process are expected in the NULL terminated array
ARGV. The program name itself should not be included there. if
ARGV. The program name itself should not be included there. If
PREEXEC is not NULL, that function will be called right before the
exec. Calling gnupg_wait_process is required. Returns 0 on
exec. FLAGS is currently only useful for W32, see the source for
details. Calling gnupg_wait_process is required. Returns 0 on
success or an error code. */
gpg_error_t gnupg_spawn_process (const char *pgmname, const char *argv[],
FILE *infile, FILE *outfile,
void (*preexec)(void),
void (*preexec)(void), unsigned int flags,
FILE **statusfile, pid_t *pid);
......
......@@ -1139,7 +1139,7 @@ iobuf_temp ()
{
iobuf_t a;
a = iobuf_alloc (3, 8192);
a = iobuf_alloc (3, IOBUF_BUFFER_SIZE);
return a;