aboutsummaryrefslogtreecommitdiffstats
path: root/src/assuan-support.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* doc: Fix typos in documentation and source code commentsIngo Klöcker2023-10-131-1/+1
| | | | | | | | -- Anonymous contribution Signed-off-by: Ingo Klöcker <[email protected]>
* core: Don't use internal __assuan functions.NIIBE Yutaka2022-04-051-4/+28
| | | | | | | | | | * configure.ac (nanosleep): Detect. * src/assuan-support.c: Don't use __assuan_usleep. (my_socketpair): Don't use __assuan_socketpair. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* core: Don't keep using deprecated ath_ API.NIIBE Yutaka2022-04-051-2/+8
| | | | | | | | | | | | | | | | | * src/posix-io.c: Don't include ath.h. (_gpgme_io_read): Call read directly. (_gpgme_io_write): Call write directly. (_gpgme_io_waitpid): Call waitpid directly. (_gpgme_io_select_select): Call select directly. (_gpgme_io_recvmsg): Call recvmsg directly. (_gpgme_io_sendmsg): Call sendmsg directly. (_gpgme_io_connect): Call connect directly. * src/assuan-support.c: Don't include ath.h. (my_waitpid): Call waitpid directly. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* core: Improve the debug messages even more.Werner Koch2019-06-051-1/+1
| | | | | | | | | | | | | | | * src/debug.c (_gpgme_debug): Add arg LINE. Chnage all callers. (_gpgme_debug_begin): Remove. * src/debug.h (TRACE_SEQ): Use the LINE arg of _gpgme_debug. -- This includes chnages to always print fds in decimal as weel as tweaking the TARCE_SEQ function to make use of the new machinery. The standard 'tag' can now always be NULL and no tag information will be printed. Signed-off-by: Werner Koch <[email protected]>
* core: Fix assuan logger-fd hack for windowsAndre Heinecke2019-03-271-1/+1
| | | | * src/assuan-support.c (my_spawn): Zero is a perfectly fine fd.
* core: Fix a strtoul to strtolAndre Heinecke2019-03-261-1/+1
| | | | | | | | | | * src/assuan-support.c (my_spawn): Fix using strtoul for a long. -- This was commented on in129def87b262 and is correct. It is signed here to better handle cases where an invalid handle value (-1) would be passed.
* core, w32: Add hack to translate diag logger-fdAndre Heinecke2019-03-251-5/+53
| | | | | | | | | | | | | | | | | * src/assuan-support.c (my_spawn): Add hack to mark the logger fd for w32spawn translation. -- The w32 spawn code needs to modify argv with an updated fd that matches the real id in the spawned process. It uses spawn_fd_item_s.arg_loc for that. We hack it here so that the arg_loc is set for gpgsm's logger-fd without changing the assuan API. GnuPG-Bug-Id: T4426
* core: Remove old debug helper functionWerner Koch2018-11-161-1/+1
| | | | | | | * src/debug.c (_gpgme_debug): Remove. (_gpgme_debugf): Rename to _gpgme_debug. Signed-off-by: Werner Koch <[email protected]>
* Add SPDX identifiers to most source filesWerner Koch2018-11-161-1/+21
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* w32: Don't use CloseHandle on an arbitrary integer.Werner Koch2018-11-021-1/+1
| | | | | | | | | | | | | | * src/assuan-support.c (my_waitpid): Do not close the PID = it is not a handle. -- At some time in the distant past we might have used the process object as pid which obviously required a close. However this was changed and so what we did here was to close an arbitrary handle (one which matches the pid). GnuPG-bug-id: 4237 Signed-off-by: Werner Koch <[email protected]>
* w32: Silence some warnings about unused parameters.Werner Koch2016-09-221-0/+14
| | | | | | | * src/assuan-support.c (my_recvmsg, my_sendmsg, my_waitpid) (my_socketpair) [W32]: Mark unused parameters. Signed-off-by: Werner Koch <[email protected]>
* core: Mark unused function args.Werner Koch2016-09-131-0/+17
| | | | Signed-off-by: Werner Koch <[email protected]>
* w32: Add comment about a compiler warningWerner Koch2014-06-261-0/+6
| | | | --
* Make use of internal iospawn flags more flexible.Werner Koch2014-04-101-1/+2
| | | | | | | | | | | | | * src/priv-io.h (IOSPAWN_FLAG_DETACHED): New. Renumber the others. * src/w32-io.c (_gpgme_io_spawn): Use DETACHED_PROCESS process only if IOSPAWN_FLAG_DETACHED is given. * src/w32-qt-io.cpp (_gpgme_io_spawn): Ditto. * src/w32-glib-io.c (_gpgme_io_spawn): Ditto. * src/assuan-support.c (my_spawn): Pass IOSPAWN_FLAG_DETACHED flags. * src/dirinfo.c (read_gpgconf_dirs): Ditto. * src/engine-gpg.c (start): Ditto. * src/engine-gpgconf.c (gpgconf_read, gpgconf_write): Ditto. * src/version.c (_gpgme_get_program_version): Ditto.
* Make definition of off_t robust against misbehaving w32 toolchains.Werner Koch2013-05-161-2/+2
| | | | | | | | | | | | | | | | * configure.ac (NEED__FILE_OFFSET_BITS): Change to define gpgme_off_t and gpgme_ssize_t. (API__OFF_T, API__SSIZE_T): New ac_subst. * src/gpgme.h.in: Replace all ssize_t and off_t by ac_subst macros. * src/assuan-support.c, src/ath-pthread.c, src/ath.c, src/ath.h * src/data-compat.c, src/data-fd.c, src/data-mem.c, src/data-stream.c * src/data-user.c, src/data.c, src/data.h, src/engine-gpgsm.c * src/engine-uiserver.c, src/gpgme-tool.c, src/gpgme.c: Replace off_t by gpgme_off_t and sszie_t by gpgme_ssize_t. * src/ath-pthread.c, src/ath.h: Include gpgme.h. -- For a detailed description, see the gpgme.texi diff.
* Remove all trailing whitespace from source filesWerner Koch2012-09-251-1/+1
| | | | | -- Command used: sed -i 's,[ \t]*$,,' FILE
* Fix Windows port (spawn and assuan engine).Marcus Brinkmann2011-02-021-1/+18
| | | | | | | | | | | | | | | | | 2011-02-02 Marcus Brinkmann <[email protected]> * configure.ac (NEED_LIBASSUAN_VERSION): Bump to 2.0.2 for system hooks. src/ 2011-02-02 Marcus Brinkmann <[email protected]> * assuan-support.c (my_socket, my_connect): New functions. (_gpgme_assuan_system_hooks): Add my_Socket, my_connect. * priv-io.h (_gpgme_io_socket): New prototype. * w32-io.c (pid_to_handle, handle_to_oid, fd_to_handle): Remove macros. (is_socket): Remove function. (_gpgme_io_spawn) [HAVE_W32CE_SYSTEM]: Remove some dead code. (_gpgme_io_spawn): Translate handles before DuplicateHandle them.
* 2010-05-07 Marcus Brinkmann <[email protected]>Marcus Brinkmann2010-05-071-10/+20
| | | | | | | | | | | * engine-gpgsm.c (gpgsm_new, start): Cast between int and assuan_fd_t. * assuan-support.c (my_pipe, my_close, my_read, my_write): Likewise. * gpgme-tool.c (server_data_obj, server_reset_fds, gpgme_server), (my_recvmsg, my_sendmsg, my_spawn): Likewise. * engine-assuan.c (start): Likewise. * engine-g13.c (start): Likewise.
* 2010-05-06 Marcus Brinkmann <[email protected]>Marcus Brinkmann2010-05-061-4/+4
| | | | | | | | | | | | | | | | | | | * configure.ac: Require libgpg-error 1.8. src/ 2010-05-06 Marcus Brinkmann <[email protected]> * sign.c, data-user.c, conversion.c, debug.c, verify.c, data.c, decrypt.c, delete.c, assuan-support.c, import.c, engine-gpgsm.c, data-mem.c, op-support.c, w32-io.c, w32-util.c, data-compat.c: Use gpg_error_from_syserror instead gpg_error_from_errno, and use gpg_err_set_errno to set error number. * setenv.c: Include <gpg-error.h> and define __set_errno to use gpg_err_set_errno. * gpgme-tool.c (ARGP_ERR_UNKNOWN): Define to EDEADLOCK (which is mapped in Windows CE) instead of E2BIG (which is not). (gt_import_keys): Initialize err.
* 2010-04-19 Marcus Brinkmann <[email protected]>Marcus Brinkmann2010-04-191-2/+2
| | | | | | | | | | | | | | | | * assuan-support.c (my_spawn): Cast to avoid warning. * engine-g13.c (g13_new): Make ARGV array of pointer to const char. (g13_assuan_simple_command) [!USE_DESCRIPTOR_FUNCTION]: Don't define. * ops.h (_gpgme_key_append_name): Same in prototype. * key.c (_gpgme_key_append_name): Make SRC argument pointer to const char. * posix-util.c (_gpgme_get_uiserver_socket_path): Make HOMEDIR const. * vfs-mount.c (gpgme_op_vfs_transact_start): Never define this potentially useful but currently unused function. * vfs-create.c (gpgme_op_vfs_transact_start): Likewise.
* 2009-12-15 Marcus Brinkmann <[email protected]>Marcus Brinkmann2009-12-151-1/+1
| | | | | * assuan-support.c (my_spawn): Calloc, not malloc, the fd_items.
* 2009-11-10 Marcus Brinkmann <[email protected]>Marcus Brinkmann2009-11-101-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Activate UIServer if FD passing is enabled and Assuan is available. m4/ 2009-11-10 Marcus Brinkmann <[email protected]> * libassuan.m4: Fix LIBASSUAN_VERSION. src/ 2009-11-10 Marcus Brinkmann <[email protected]> * Makefile.am (uiserver_components): New variable. (main_sources): Add it. * ops.h, key.c (_gpgme_key_append_name): Take CONVERT argument, implement it. Adjust callers. (gpgme_key_from_uid): New function. * gpgme.h.in (gpgme_protocol_t): Add GPGME_PROTOCOL_DEFAULT. (gpgme_encrypt_flags_t): Add GPGME_ENCRYPT_PREPARE, GPGME_ENCRYPT_EXPECT_SIGN. (gpgme_set_sub_protocol, gpgme_key_from_uid): New functions. * libgpgme.vers, gpgme.def: Add new functions. * gpgme.c (gpgme_set_protocol): Add UIServer protocol. (gpgme_set_sub_protocol): New function. (gpgme_get_protocol_name): Add UIServer and default protocol. * assuan-support.c: Return correct error values, implement socketpair for POSIX. * priv-io.h, posix-io.c, w32-io.c, w32-glib-io.c, w32-qt-io.cpp (_gpgme_io_spawn): Add ATFORK and ATFORKVALUE arguments. Implement it for POSIX. Adjust all callers. * engine.h, engine-backend.h (_gpgme_engine_set_protocol) (_gpgme_engine_op_decrypt_verify): New prototypes. Adjust all users. * engine.c (engine_ops, gpgme_get_engine_info): Add UIServer engine. (_gpgme_engine_set_protocol, _gpgme_engine_op_decrypt_verify): New function. * decrypt-verify.c (decrypt_verify_start): Call _gpgme_engine_op_decrypt_verify. * util.h, posix-util.c, w32-util.c (_gpgme_get_uiserver_socket_path): New function. * engine-gpgsm.c (gpgsm_set_fd): Fix _gpgme_io_pipe invocation. * gpgme-tool.c: Some support for UIServer protocol. * engine-uiserver.c: New file.
* 2009-11-05 Marcus Brinkmann <[email protected]>Marcus Brinkmann2009-11-051-1/+1
| | | | | | | | | * priv-io.h (IOSPAWN_FLAG_NOCLOSE): New flag. * w32-io.c (_gpgme_io_spawn): Implement this flag. * posix-io.c (_gpgme_io_spawn): Likewise. * w32-glib-io.c (_gpgme_io_spawn): Likewise. * assuan-support.c (my_spawn): Set this flag.
* 2009-10-30 Marcus Brinkmann <[email protected]>Marcus Brinkmann2009-10-301-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Check for argp.h and error_t. src/ 2009-10-30 Marcus Brinkmann <[email protected]> * Makefile.am (noinst_PROGRAMS): New target gpgme-tool. (gpgme_tool_LDADD): New variable. * gpgme-tool.c: New file. * ops.h (_gpgme_sig_notation_clearm _gpgme_signers_clear): New prototypes. * gpgme.c (gpgme_set_protocol): Allow GPGME_PROTOCOL_GPGCONF (when had that gone missing?). (_gpgme_sig_notation_clear): New function without debug output. (gpgme_release): Call it and _gpgme_signers_clear. * signers.c (_gpgme_signers_clear): New function without debug output. * g13.c (gpgme_op_vfs_mount): Add debug output. * assuan-support.c (my_spawn): Allow fd_child_list to be NULL. * conversion.c (_gpgme_encode_percent_string): Fix infinite loop. * debug.h: Put tag in front of debug lines, should make for nicer output. * engine-assuan.c (llass_new): Use our new system hooks for libassuan. * engine-g13.c (g13_new): Remove redundant assuan context allocation. * version.c (gpgme_check_version_internal): Delay debug output until after gpgme_check_version was called.
* Really add file.Marcus Brinkmann2009-10-201-0/+208