aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/asshelp.c12
-rw-r--r--common/name-value.c6
-rw-r--r--common/openpgpdefs.h2
-rw-r--r--common/sysutils.c4
4 files changed, 18 insertions, 6 deletions
diff --git a/common/asshelp.c b/common/asshelp.c
index 174933a83..83c378786 100644
--- a/common/asshelp.c
+++ b/common/asshelp.c
@@ -527,8 +527,18 @@ start_new_service (assuan_context_t *r_ctx,
if (!(err = lock_spawning (&lock, gnupg_homedir (), lock_name, verbose))
&& assuan_socket_connect (ctx, sockname, 0, connect_flags))
{
+#ifdef HAVE_W32_SYSTEM
err = gnupg_spawn_process_detached (program? program : program_name,
argv, NULL);
+#else /*!W32*/
+ pid_t pid;
+
+ err = gnupg_spawn_process_fd (program? program : program_name,
+ argv, -1, -1, -1, &pid);
+ if (!err)
+ err = gnupg_wait_process (program? program : program_name,
+ pid, 1, NULL);
+#endif /*!W32*/
if (err)
log_error ("failed to start %s '%s': %s\n",
printed_name, program? program : program_name,
@@ -640,7 +650,7 @@ start_new_dirmngr (assuan_context_t *r_ctx,
gpg_error_t (*status_cb)(ctrl_t, int, ...),
ctrl_t status_cb_arg)
{
-#ifdef USE_DIRMNGR_AUTO_START
+#ifndef USE_DIRMNGR_AUTO_START
autostart = 0;
#endif
return start_new_service (r_ctx, GNUPG_MODULE_NAME_DIRMNGR,
diff --git a/common/name-value.c b/common/name-value.c
index 989a5b111..f663ecfe1 100644
--- a/common/name-value.c
+++ b/common/name-value.c
@@ -195,11 +195,11 @@ assert_raw_value (nve_t entry)
size_t i;
/* Find a suitable space to break on. */
- for (i = linelen - 1; linelen - i < 30 && linelen - i > offset; i--)
- if (ascii_isspace (entry->value[i]))
+ for (i = linelen - 1; linelen - i < 30; i--)
+ if (ascii_isspace (entry->value[offset+i]))
break;
- if (ascii_isspace (entry->value[i]))
+ if (ascii_isspace (entry->value[offset+i]))
{
/* Found one. */
amount = i;
diff --git a/common/openpgpdefs.h b/common/openpgpdefs.h
index 2f7ff456e..868e141ce 100644
--- a/common/openpgpdefs.h
+++ b/common/openpgpdefs.h
@@ -119,6 +119,8 @@ typedef enum
SIGSUBPKT_ISSUER_FPR = 33, /* Issuer fingerprint. */
SIGSUBPKT_PREF_AEAD = 34, /* Preferred AEAD algorithms. */
+ SIGSUBPKT_ATTST_SIGS = 37, /* Attested Certifications. */
+
SIGSUBPKT_FLAG_CRITICAL = 128
}
sigsubpkttype_t;
diff --git a/common/sysutils.c b/common/sysutils.c
index 0a3dc2eaf..f2abd924e 100644
--- a/common/sysutils.c
+++ b/common/sysutils.c
@@ -380,7 +380,7 @@ translate_sys2libc_fd (gnupg_fd_t fd, int for_write)
/* Note that _open_osfhandle is currently defined to take and return
a long. */
- x = _open_osfhandle ((long)fd, for_write ? 1 : 0);
+ x = _open_osfhandle ((intptr_t)fd, for_write ? 1 : 0);
if (x == -1)
log_error ("failed to translate osfhandle %p\n", (void *) fd);
return x;
@@ -511,7 +511,7 @@ gnupg_tmpfile (void)
int fd = (int)file;
fp = _wfdopen (fd, L"w+b");
#else
- int fd = _open_osfhandle ((long)file, 0);
+ int fd = _open_osfhandle ((intptr_t)file, 0);
if (fd == -1)
{
CloseHandle (file);