diff options
author | TizenOpenSource <tizenopensrc@samsung.com> | 2023-02-01 18:22:00 +0900 |
---|---|---|
committer | TizenOpenSource <tizenopensrc@samsung.com> | 2023-02-01 18:22:00 +0900 |
commit | 73f75b48c0470a46b31340f5cc9e5219d6ee0faa (patch) | |
tree | de57a4f03945b3365d4a85eac0ea2eb4c68ab801 /src | |
parent | 9dc2bb3fe7e57cb5a597efe3a7bf78bda815f374 (diff) | |
download | gpgme-73f75b48c0470a46b31340f5cc9e5219d6ee0faa.tar.gz gpgme-73f75b48c0470a46b31340f5cc9e5219d6ee0faa.tar.bz2 gpgme-73f75b48c0470a46b31340f5cc9e5219d6ee0faa.zip |
Imported Upstream version 1.18.0upstream/1.18.0
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/Makefile.in | 7 | ||||
-rw-r--r-- | src/assuan-support.c | 42 | ||||
-rw-r--r-- | src/decrypt.c | 23 | ||||
-rw-r--r-- | src/engine-backend.h | 3 | ||||
-rw-r--r-- | src/engine-gpg.c | 12 | ||||
-rw-r--r-- | src/engine.c | 5 | ||||
-rw-r--r-- | src/engine.h | 1 | ||||
-rw-r--r-- | src/gpgme-json.c | 5 | ||||
-rw-r--r-- | src/gpgme-tool.c | 4 | ||||
-rw-r--r-- | src/gpgme.c | 4 | ||||
-rw-r--r-- | src/gpgme.h.in | 2 | ||||
-rw-r--r-- | src/import.c | 52 | ||||
-rw-r--r-- | src/keylist.c | 21 | ||||
-rw-r--r-- | src/ops.h | 12 | ||||
-rw-r--r-- | src/posix-io.c | 24 |
16 files changed, 172 insertions, 49 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 39c341f..67805a8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,7 +26,11 @@ EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \ gpgme.h.in versioninfo.rc.in gpgme.def \ gpgme.pc.in gpgme-glib.pc.in +if USE_GPGRT_CONFIG +noinst_SCRIPTS = gpgme-config +else bin_SCRIPTS = gpgme-config +endif m4datadir = $(datadir)/aclocal m4data_DATA = gpgme.m4 nodist_include_HEADERS = gpgme.h diff --git a/src/Makefile.in b/src/Makefile.in index 65d40af..88c5835 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -116,6 +116,7 @@ bin_PROGRAMS = gpgme-tool$(EXEEXT) gpgme-json$(EXEEXT) subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ + $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \ $(top_srcdir)/m4/ax_pkg_swig.m4 \ $(top_srcdir)/m4/ax_python_devel.m4 \ $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/glibc21.m4 \ @@ -248,7 +249,7 @@ gpgme_tool_DEPENDENCIES = libgpgme.la gpgme_w32spawn_SOURCES = gpgme-w32spawn.c gpgme_w32spawn_OBJECTS = gpgme-w32spawn.$(OBJEXT) gpgme_w32spawn_LDADD = $(LDADD) -SCRIPTS = $(bin_SCRIPTS) +SCRIPTS = $(bin_SCRIPTS) $(noinst_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -409,6 +410,7 @@ GPGME_CONFIG_AVAIL_LANG = @GPGME_CONFIG_AVAIL_LANG@ GPGME_CONFIG_CFLAGS = @GPGME_CONFIG_CFLAGS@ GPGME_CONFIG_HOST = @GPGME_CONFIG_HOST@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@ +GPGME_CPP_CFLAGS = @GPGME_CPP_CFLAGS@ GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ @@ -564,7 +566,8 @@ EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \ gpgme.h.in versioninfo.rc.in gpgme.def \ gpgme.pc.in gpgme-glib.pc.in -bin_SCRIPTS = gpgme-config +@USE_GPGRT_CONFIG_TRUE@noinst_SCRIPTS = gpgme-config +@USE_GPGRT_CONFIG_FALSE@bin_SCRIPTS = gpgme-config m4datadir = $(datadir)/aclocal m4data_DATA = gpgme.m4 nodist_include_HEADERS = gpgme.h diff --git a/src/assuan-support.c b/src/assuan-support.c index 0ddf29b..0bc003b 100644 --- a/src/assuan-support.c +++ b/src/assuan-support.c @@ -27,10 +27,20 @@ #include <stdlib.h> #include <errno.h> +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_SYS_TIME_H +# include <sys/time.h> +#endif +#ifndef HAVE_W32_SYSTEM +#include <unistd.h> +#include <sys/wait.h> +#endif + #include "assuan.h" #include "gpgme.h" -#include "ath.h" #include "priv-io.h" #include "debug.h" @@ -62,8 +72,28 @@ _gpgme_assuan_log_cb (assuan_context_t ctx, void *hook, static void my_usleep (assuan_context_t ctx, unsigned int usec) { - /* FIXME: Add to ath. */ - __assuan_usleep (ctx, usec); + (void)ctx; + + if (!usec) + return; + +#ifdef HAVE_W32_SYSTEM + Sleep (usec / 1000); +#else +# ifdef HAVE_NANOSLEEP + { + struct timespec req; + struct timespec rem; + + req.tv_sec = usec / 1000000; + req.tv_nsec = (usec % 1000000) * 1000; + while (nanosleep (&req, &rem) < 0 && errno == EINTR) + req = rem; + } +# else + usleep (usec); +# endif +#endif } @@ -294,7 +324,7 @@ my_waitpid (assuan_context_t ctx, pid_t pid, NOWAIT in POSIX systems just means the caller already did the waitpid for this child. */ if (! nowait) - return _gpgme_ath_waitpid (pid, status, options); + return waitpid (pid, status, options); #endif return 0; } @@ -306,8 +336,8 @@ static int my_socketpair (assuan_context_t ctx, int namespace, int style, int protocol, assuan_fd_t filedes[2]) { -#ifdef HAVE_W32_SYSTEM (void)ctx; +#ifdef HAVE_W32_SYSTEM (void)namespace; (void)style; (void)protocol; @@ -316,7 +346,7 @@ my_socketpair (assuan_context_t ctx, int namespace, int style, return -1; #else /* FIXME: Debug output missing. */ - return __assuan_socketpair (ctx, namespace, style, protocol, filedes); + return socketpair (namespace, style, protocol, filedes); #endif } diff --git a/src/decrypt.c b/src/decrypt.c index f884799..896a873 100644 --- a/src/decrypt.c +++ b/src/decrypt.c @@ -44,10 +44,12 @@ typedef struct int okay; - /* A flag telling that the a decryption failed and an optional error - * code to further specify the failure. */ + /* A flag telling that the a decryption failed and two optional error + * codes to further specify the failure for public key decryption and + * symmetric decryption. */ int failed; gpg_error_t pkdecrypt_failed; + gpg_error_t symdecrypt_failed; /* At least one secret key is not available. gpg issues NO_SECKEY * status lines for each key the message has been encrypted to but @@ -228,7 +230,22 @@ parse_status_error (char *args, op_data_t opd) opd->result.legacy_cipher_nomdc = 1; opd->not_integrity_protected = 1; } + else if (!strcmp (field[0], "symkey_decrypt.maybe_error")) + { + switch (gpg_err_code (err)) + { + case GPG_ERR_BAD_PASSPHRASE: + /* A bad passphrase is severe enough that we return this + * error code. */ + opd->symdecrypt_failed = err; + break; + default: + /* For now all other error codes are ignored and the + * standard DECRYPT_FAILED is returned. */ + break; + } + } /* Record the first error code. */ if (err && !opd->first_status_error) opd->first_status_error = err; @@ -376,6 +393,8 @@ _gpgme_decrypt_status_handler (void *priv, gpgme_status_code_t code, /* This comes from a specialized ERROR status line. */ if (opd->pkdecrypt_failed) return opd->pkdecrypt_failed; + if (opd->symdecrypt_failed) + return opd->symdecrypt_failed; /* For an integrity failure return just DECRYPTION_FAILED; * the actual cause can be taken from an already set diff --git a/src/engine-backend.h b/src/engine-backend.h index 9b755a3..75ed49c 100644 --- a/src/engine-backend.h +++ b/src/engine-backend.h @@ -106,7 +106,8 @@ struct engine_ops int secret_only, int reserved, gpgme_keylist_mode_t mode, int engine_flags); - gpgme_error_t (*keylist_data) (void *engine, gpgme_data_t data); + gpgme_error_t (*keylist_data) (void *engine, gpgme_keylist_mode_t mode, + gpgme_data_t data); gpgme_error_t (*keysign) (void *engine, gpgme_key_t key, const char *userid, unsigned long expires, unsigned int flags, diff --git a/src/engine-gpg.c b/src/engine-gpg.c index 88a248d..3bf5223 100644 --- a/src/engine-gpg.c +++ b/src/engine-gpg.c @@ -3105,8 +3105,11 @@ gpg_keylist_build_options (engine_gpg_t gpg, int secret_only, code. The problem is that we don't know the context here and thus can't access the cached version number for the engine info structure. */ - err = add_arg (gpg, "--locate-keys"); - if ((mode & GPGME_KEYLIST_MODE_SIGS)) + if ((mode & GPGME_KEYLIST_MODE_FORCE_EXTERN)) + err = add_arg (gpg, "--locate-external-keys"); + else + err = add_arg (gpg, "--locate-keys"); + if (!err && (mode & GPGME_KEYLIST_MODE_SIGS)) err = add_arg (gpg, "--with-sig-check"); } else @@ -3179,7 +3182,7 @@ gpg_keylist_ext (void *engine, const char *pattern[], int secret_only, static gpgme_error_t -gpg_keylist_data (void *engine, gpgme_data_t data) +gpg_keylist_data (void *engine, gpgme_keylist_mode_t mode, gpgme_data_t data) { engine_gpg_t gpg = engine; gpgme_error_t err; @@ -3198,6 +3201,9 @@ gpg_keylist_data (void *engine, gpgme_data_t data) err = add_arg (gpg, "--dry-run"); if (!err) err = add_arg (gpg, "--import"); + if (!err && (mode & GPGME_KEYLIST_MODE_SIGS) + && have_gpg_version (gpg, "2.0.10")) + err = add_arg (gpg, "--with-sig-check"); if (!err) err = add_arg (gpg, "--"); if (!err) diff --git a/src/engine.c b/src/engine.c index db594cb..895b7e1 100644 --- a/src/engine.c +++ b/src/engine.c @@ -897,7 +897,8 @@ _gpgme_engine_op_keylist_ext (engine_t engine, const char *pattern[], gpgme_error_t -_gpgme_engine_op_keylist_data (engine_t engine, gpgme_data_t data) +_gpgme_engine_op_keylist_data (engine_t engine, gpgme_keylist_mode_t mode, + gpgme_data_t data) { if (!engine) return gpg_error (GPG_ERR_INV_VALUE); @@ -905,7 +906,7 @@ _gpgme_engine_op_keylist_data (engine_t engine, gpgme_data_t data) if (!engine->ops->keylist_data) return gpg_error (GPG_ERR_NOT_IMPLEMENTED); - return (*engine->ops->keylist_data) (engine->engine, data); + return (*engine->ops->keylist_data) (engine->engine, mode, data); } diff --git a/src/engine.h b/src/engine.h index 8b45e13..d580d99 100644 --- a/src/engine.h +++ b/src/engine.h @@ -157,6 +157,7 @@ gpgme_error_t _gpgme_engine_op_keylist_ext (engine_t engine, gpgme_keylist_mode_t mode, int engine_flags); gpgme_error_t _gpgme_engine_op_keylist_data (engine_t engine, + gpgme_keylist_mode_t mode, gpgme_data_t data); gpgme_error_t _gpgme_engine_op_sign (engine_t engine, gpgme_data_t in, gpgme_data_t out, gpgme_sig_mode_t mode, diff --git a/src/gpgme-json.c b/src/gpgme-json.c index d3b8035..6077278 100644 --- a/src/gpgme-json.c +++ b/src/gpgme-json.c @@ -2471,6 +2471,11 @@ op_keylist (cjson_t request, cjson_t result) if (abool) mode |= GPGME_KEYLIST_MODE_LOCATE; + if ((err = get_boolean_flag (request, "force-extern", 0, &abool))) + goto leave; + if (abool) + mode |= GPGME_KEYLIST_MODE_FORCE_EXTERN; + if (!mode) { /* default to local */ diff --git a/src/gpgme-tool.c b/src/gpgme-tool.c index e45ea12..7d3ca16 100644 --- a/src/gpgme-tool.c +++ b/src/gpgme-tool.c @@ -1459,6 +1459,8 @@ gt_get_keylist_mode (gpgme_tool_t gt) modes[idx++] = "ephemeral"; if (mode & GPGME_KEYLIST_MODE_VALIDATE) modes[idx++] = "validate"; + if (mode & GPGME_KEYLIST_MODE_FORCE_EXTERN) + modes[idx++] = "force_extern"; modes[idx++] = NULL; gt_write_status (gt, STATUS_KEYLIST_MODE, modes[0], modes[1], modes[2], @@ -2200,6 +2202,8 @@ cmd_keylist_mode (assuan_context_t ctx, char *line) mode |= GPGME_KEYLIST_MODE_EPHEMERAL; if (strstr (line, "validate")) mode |= GPGME_KEYLIST_MODE_VALIDATE; + if (strstr (line, "force_extern")) + mode |= GPGME_KEYLIST_MODE_FORCE_EXTERN; return gt_set_keylist_mode (server->gt, mode); } diff --git a/src/gpgme.c b/src/gpgme.c index 6a5232e..2c5b51e 100644 --- a/src/gpgme.c +++ b/src/gpgme.c @@ -782,6 +782,10 @@ gpgme_set_keylist_mode (gpgme_ctx_t ctx, gpgme_keylist_mode_t mode) if (!ctx) return gpg_error (GPG_ERR_INV_VALUE); + if ((mode & GPGME_KEYLIST_MODE_LOCATE_EXTERNAL) == + (GPGME_KEYLIST_MODE_LOCAL|GPGME_KEYLIST_MODE_FORCE_EXTERN)) + return gpg_error (GPG_ERR_INV_VALUE); + ctx->keylist_mode = mode; return 0; } diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 0f7c361..502d68c 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -382,8 +382,10 @@ gpgme_protocol_t; #define GPGME_KEYLIST_MODE_WITH_KEYGRIP 64 #define GPGME_KEYLIST_MODE_EPHEMERAL 128 #define GPGME_KEYLIST_MODE_VALIDATE 256 +#define GPGME_KEYLIST_MODE_FORCE_EXTERN 512 #define GPGME_KEYLIST_MODE_LOCATE (1|2) +#define GPGME_KEYLIST_MODE_LOCATE_EXTERNAL (1|2|512) typedef unsigned int gpgme_keylist_mode_t; diff --git a/src/import.c b/src/import.c index 85c459b..cd9f960 100644 --- a/src/import.c +++ b/src/import.c @@ -266,8 +266,8 @@ parse_error (char *args, gpgme_import_status_t *import_status) } -static gpgme_error_t -import_status_handler (void *priv, gpgme_status_code_t code, char *args) +gpgme_error_t +_gpgme_import_status_handler (void *priv, gpgme_status_code_t code, char *args) { gpgme_ctx_t ctx = (gpgme_ctx_t) priv; gpgme_error_t err; @@ -311,28 +311,42 @@ import_status_handler (void *priv, gpgme_status_code_t code, char *args) } -static gpgme_error_t -_gpgme_op_import_start (gpgme_ctx_t ctx, int synchronous, gpgme_data_t keydata) +gpgme_error_t +_gpgme_op_import_init_result (gpgme_ctx_t ctx) { gpgme_error_t err; void *hook; op_data_t opd; - err = _gpgme_op_reset (ctx, synchronous); - if (err) - return err; - err = _gpgme_op_data_lookup (ctx, OPDATA_IMPORT, &hook, sizeof (*opd), release_op_data); opd = hook; if (err) return err; + opd->lastp = &opd->result.imports; + return 0; +} + + +static gpgme_error_t +_gpgme_op_import_start (gpgme_ctx_t ctx, int synchronous, gpgme_data_t keydata) +{ + gpgme_error_t err; + + err = _gpgme_op_reset (ctx, synchronous); + if (err) + return err; + + err = _gpgme_op_import_init_result (ctx); + if (err) + return err; if (!keydata) return gpg_error (GPG_ERR_NO_DATA); - _gpgme_engine_set_status_handler (ctx->engine, import_status_handler, ctx); + _gpgme_engine_set_status_handler (ctx->engine, _gpgme_import_status_handler, + ctx); return _gpgme_engine_op_import (ctx->engine, keydata, NULL, NULL, ctx->import_filter, ctx->key_origin); @@ -380,20 +394,15 @@ _gpgme_op_import_keys_start (gpgme_ctx_t ctx, int synchronous, gpgme_key_t *keys) { gpgme_error_t err; - void *hook; - op_data_t opd; int idx, firstidx, nkeys; err = _gpgme_op_reset (ctx, synchronous); if (err) return err; - err = _gpgme_op_data_lookup (ctx, OPDATA_IMPORT, &hook, - sizeof (*opd), release_op_data); - opd = hook; + err = _gpgme_op_import_init_result (ctx); if (err) return err; - opd->lastp = &opd->result.imports; if (!keys) return gpg_error (GPG_ERR_NO_DATA); @@ -416,7 +425,8 @@ _gpgme_op_import_keys_start (gpgme_ctx_t ctx, int synchronous, if (!nkeys) return gpg_error (GPG_ERR_NO_DATA); - _gpgme_engine_set_status_handler (ctx->engine, import_status_handler, ctx); + _gpgme_engine_set_status_handler (ctx->engine, _gpgme_import_status_handler, + ctx); return _gpgme_engine_op_import (ctx->engine, NULL, keys, NULL, ctx->import_filter, ctx->key_origin); @@ -496,24 +506,20 @@ static gpgme_error_t _gpgme_op_receive_keys_start (gpgme_ctx_t ctx, int synchronous, const char *keyids[]) { gpgme_error_t err; - void *hook; - op_data_t opd; err = _gpgme_op_reset (ctx, synchronous); if (err) return err; - err = _gpgme_op_data_lookup (ctx, OPDATA_IMPORT, &hook, - sizeof (*opd), release_op_data); - opd = hook; + err = _gpgme_op_import_init_result (ctx); if (err) return err; - opd->lastp = &opd->result.imports; if (!keyids || !*keyids) return gpg_error (GPG_ERR_NO_DATA); - _gpgme_engine_set_status_handler (ctx->engine, import_status_handler, ctx); + _gpgme_engine_set_status_handler (ctx->engine, _gpgme_import_status_handler, + ctx); return _gpgme_engine_op_import (ctx->engine, NULL, NULL, keyids, ctx->import_filter, ctx->key_origin); diff --git a/src/keylist.c b/src/keylist.c index f2c90d2..1c01bd4 100644 --- a/src/keylist.c +++ b/src/keylist.c @@ -146,6 +146,12 @@ keylist_status_handler (void *priv, gpgme_status_code_t code, char *args) err = 0; break; + case GPGME_STATUS_IMPORT_OK: + case GPGME_STATUS_IMPORT_PROBLEM: + case GPGME_STATUS_IMPORT_RES: + err = _gpgme_import_status_handler (priv, code, args); + break; + default: break; } @@ -417,6 +423,7 @@ parse_sec_field15 (gpgme_key_t key, gpgme_subkey_t subkey, char *field) { /* Fields starts with a hex digit; thus it is a serial number. */ key->secret = 1; + subkey->secret = 1; subkey->is_cardkey = 1; subkey->card_number = strdup (field); if (!subkey->card_number) @@ -1125,6 +1132,10 @@ gpgme_op_keylist_start (gpgme_ctx_t ctx, const char *pattern, int secret_only) if (err) return TRACE_ERR (err); + err = _gpgme_op_import_init_result (ctx); + if (err) + return TRACE_ERR (err); + _gpgme_engine_set_status_handler (ctx->engine, keylist_status_handler, ctx); err = _gpgme_engine_set_colon_line_handler (ctx->engine, @@ -1169,6 +1180,10 @@ gpgme_op_keylist_ext_start (gpgme_ctx_t ctx, const char *pattern[], if (err) return TRACE_ERR (err); + err = _gpgme_op_import_init_result (ctx); + if (err) + return TRACE_ERR (err); + _gpgme_engine_set_status_handler (ctx->engine, keylist_status_handler, ctx); err = _gpgme_engine_set_colon_line_handler (ctx->engine, keylist_colon_handler, ctx); @@ -1210,13 +1225,17 @@ gpgme_op_keylist_from_data_start (gpgme_ctx_t ctx, gpgme_data_t data, if (err) return TRACE_ERR (err); + err = _gpgme_op_import_init_result (ctx); + if (err) + return TRACE_ERR (err); + _gpgme_engine_set_status_handler (ctx->engine, keylist_status_handler, ctx); err = _gpgme_engine_set_colon_line_handler (ctx->engine, keylist_colon_handler, ctx); if (err) return TRACE_ERR (err); - err = _gpgme_engine_op_keylist_data (ctx->engine, data); + err = _gpgme_engine_op_keylist_data (ctx->engine, ctx->keylist_mode, data); return TRACE_ERR (err); } @@ -192,4 +192,16 @@ gpgme_error_t _gpgme_parse_notation (gpgme_sig_notation_t *notationp, int type, int pkflags, int len, char *data); + +/* From import.c. */ + +/* Create an initial op data object for import. Needs to be called + once before calling _gpgme_import_status_handler. */ +gpgme_error_t _gpgme_op_import_init_result (gpgme_ctx_t ctx); + +/* Process a status line for import operations. */ +gpgme_error_t _gpgme_import_status_handler (void *priv, + gpgme_status_code_t code, + char *args); + #endif /* OPS_H */ diff --git a/src/posix-io.c b/src/posix-io.c index 5c6cf1d..a422d8f 100644 --- a/src/posix-io.c +++ b/src/posix-io.c @@ -54,11 +54,18 @@ # include <dirent.h> #endif /*USE_LINUX_GETDENTS*/ +#ifdef HAVE_POLL_H +# include <poll.h> +#else +# ifdef HAVE_SYS_SELECT_H +# include <sys/select.h> +# endif +#endif +#include <sys/socket.h> #include "util.h" #include "priv-io.h" #include "sema.h" -#include "ath.h" #include "debug.h" @@ -178,7 +185,7 @@ _gpgme_io_read (int fd, void *buffer, size_t count) do { - nread = _gpgme_ath_read (fd, buffer, count); + nread = read (fd, buffer, count); } while (nread == -1 && errno == EINTR); @@ -197,7 +204,7 @@ _gpgme_io_write (int fd, const void *buffer, size_t count) do { - nwritten = _gpgme_ath_write (fd, buffer, count); + nwritten = write (fd, buffer, count); } while (nwritten == -1 && errno == EINTR); @@ -490,7 +497,7 @@ _gpgme_io_waitpid (int pid, int hang, int *r_status, int *r_signal) *r_status = 0; *r_signal = 0; do - ret = _gpgme_ath_waitpid (pid, &status, hang? 0 : WNOHANG); + ret = waitpid (pid, &status, hang? 0 : WNOHANG); while (ret == (pid_t)(-1) && errno == EINTR); if (ret == pid) @@ -869,8 +876,7 @@ _gpgme_io_select_select (struct io_select_fd_s *fds, size_t nfds, int nonblock) do { - count = _gpgme_ath_select (max_fd + 1, &readfds, &writefds, NULL, - &timeout); + count = select (max_fd + 1, &readfds, &writefds, NULL, &timeout); } while (count < 0 && errno == EINTR); if (count < 0) @@ -946,7 +952,7 @@ _gpgme_io_recvmsg (int fd, struct msghdr *msg, int flags) do { - nread = _gpgme_ath_recvmsg (fd, msg, flags); + nread = recvmsg (fd, msg, flags); } while (nread == -1 && errno == EINTR); saved_errno = errno; @@ -996,7 +1002,7 @@ _gpgme_io_sendmsg (int fd, const struct msghdr *msg, int flags) do { - nwritten = _gpgme_ath_sendmsg (fd, msg, flags); + nwritten = sendmsg (fd, msg, flags); } while (nwritten == -1 && errno == EINTR); return TRACE_SYSRES (nwritten); @@ -1041,7 +1047,7 @@ _gpgme_io_connect (int fd, struct sockaddr *addr, int addrlen) "fd=%d addr=%p addrlen=%i", fd, addr, addrlen); do - res = ath_connect (fd, addr, addrlen); + res = connect (fd, addr, addrlen); while (res == -1 && errno == EINTR); return TRACE_SYSRES (res); |