summaryrefslogtreecommitdiffstats
path: root/common/exechelp.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* common: New flags for gnupg_spawn_processWerner Koch2022-03-181-1/+9
| | | | | | | | | * common/exechelp.h (GNUPG_SPAWN_KEEP_STDIN): New. (GNUPG_SPAWN_KEEP_STDOUT): New. (GNUPG_SPAWN_KEEP_STDERR): New. * common/exechelp-posix.c (do_exec): Add arg flags and implement new flags. * common/exechelp-w32.c (gnupg_spawn_process): Implement new flags.
* common: New helper function gnupg_close_pipe.Werner Koch2020-09-021-0/+3
| | | | | | | | | | | * common/exechelp-posix.c (gnupg_close_pipe): New. * common/exechelp-w32.c (gnupg_close_pipe): New. -- This function is mainly for documentation purposes and should be used along with gnupg_create_pipe. Signed-off-by: Werner Koch <wk@gnupg.org>
* doc: Update copyright notices for common/exechelp*.Werner Koch2017-11-291-0/+2
| | | | | | | | | -- Verified that all authors are either g10 Code employees or (in one case) a work for hire. Signed-off-by: Werner Koch <wk@gnupg.org>
* Spelling fixes in docs and comments.NIIBE Yutaka2017-04-281-2/+2
| | | | | | | | | | -- In addition, fix trailing spaces in tests/inittests. GnuPG-bug-id: 3121 Reported-by: ka7 (klemens) Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Change all http://www.gnu.org in license notices to https://Werner Koch2016-11-051-1/+1
| | | | --
* common: Allow a second input stream for gnupg_exec_tool_stream.Werner Koch2016-05-271-1/+5
| | | | | | | | | | | | | | | | | | * common/exechelp-posix.c (do_exec): Add arg 'except' and pass to close_all_fds. (gnupg_spawn_process): Add arg 'except'. Change callers to pass NULL for it. * common/exechelp-w32.c (gnupg_spawn_process): Add dummy arg 'except'. * common/exechelp-w32ce.c (gnupg_spawn_process): Ditto. * common/exectool.c (copy_buffer_do_copy): Allow NULL for SINK. (gnupg_exec_tool_stream): Add arg 'inextra'. Change callers to pass NULL for it. Allow NULL for OUTPUT. -- This hack is a first step to allow calling gpg for verification of signatures. Signed-off-by: Werner Koch <wk@gnupg.org>
* common: Extend gnupg_create_inbound_pipe et al.Werner Koch2016-05-271-4/+8
| | | | | | | | | | | | | | * common/exechelp-posix.c (gnupg_create_inbound_pipe): Add args 'r_fp' and 'nonblock'. (gnupg_create_outbound_pipe): Ditto. * common/exechelp-w32.c (gnupg_create_inbound_pipe): Add non yet functional args 'r_fp' and 'nonblock'. (gnupg_create_outbound_pipe): Ditto. * common/exechelp-w32ce.c (gnupg_create_inbound_pipe): Ditto. (gnupg_create_outbound_pipe): Ditto. -- Signed-off-by: Werner Koch <wk@gnupg.org>
* common: Make use of default_errsource in exechelp.Werner Koch2016-05-271-1/+0
| | | | | | | | | | | | | | | | | * common/exechelp-posix.c (my_error_from_syserror, my_error): New. Use them instead of gpg_error and gpg_error_from_syserror. (create_pipe_and_estream): Remove arg ERRSOURCE and fix use of OUTBOUND which has a wrong name. Adjust callers. (gnupg_spawn_process): Remove arg ERRSOURCE and replace by use of DEFAULT_ERRSOURCE. * common/exechelp-w32.c (gnupg_spawn_process): Ditto. * common/exechelp-w32ce.c (gnupg_spawn_process): Ditto. * common/exectool.c (gnupg_exec_tool_stream): Do not pass GPG_ERROR_FROM_SYSERROR. * tools/gpgconf-comp.c (gc_component_check_options): Ditto. (retrieve_options_from_program): Ditto. Signed-off-by: Werner Koch <wk@gnupg.org>
* common/exechelp: Provide a way to wait for multiple processes.Justus Winter2016-02-231-0/+4
| | | | | | | | | | * common/exechelp-posix.c (gnupg_wait_process): Generalize to 'gnupg_wait_processes'. * common/exechelp-w32.c (gnupg_wait_process): Likewise. * common/exechelp-w32ce.c (gnupg_wait_process): New function stub. * common/exechelp.h (gnupg_wait_process): New prototype. Signed-off-by: Justus Winter <justus@g10code.com>
* common/exechelp: Add general pipe function.Justus Winter2016-02-231-0/+5
| | | | | | | | | | | | | | | * common/exechelp-posix.c (gnupg_create_pipe): New function. * common/exechelp-w32.c (INHERIT_{READ,WRITE,BOTH}): New macros. (create_inheritable_pipe): Generalize so that both ends can be inherited. (do_create_pipe): Rename argument accordingly. (gnupg_create_{in,out}bound_pipe): Use new flags. (gnupg_create_pipe): New function. (gnupg_spawn_process): Use new flags. * common/exechelp-w32ce.c (gnupg_create_pipe): New stub. * common/exechelp.h (gnupg_create_pipe): New prototype. Signed-off-by: Justus Winter <justus@g10code.com>
* Fix typos found using codespell.Justus Winter2015-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/cache.c: Fix typos. * agent/call-pinentry.c: Likewise. * agent/call-scd.c: Likewise. * agent/command-ssh.c: Likewise. * agent/command.c: Likewise. * agent/divert-scd.c: Likewise. * agent/findkey.c: Likewise. * agent/gpg-agent.c: Likewise. * agent/w32main.c: Likewise. * common/argparse.c: Likewise. * common/audit.c: Likewise. * common/audit.h: Likewise. * common/convert.c: Likewise. * common/dotlock.c: Likewise. * common/exechelp-posix.c: Likewise. * common/exechelp-w32.c: Likewise. * common/exechelp-w32ce.c: Likewise. * common/exechelp.h: Likewise. * common/helpfile.c: Likewise. * common/i18n.h: Likewise. * common/iobuf.c: Likewise. * common/iobuf.h: Likewise. * common/localename.c: Likewise. * common/logging.c: Likewise. * common/openpgp-oid.c: Likewise. * common/session-env.c: Likewise. * common/sexputil.c: Likewise. * common/sysutils.c: Likewise. * common/t-sexputil.c: Likewise. * common/ttyio.c: Likewise. * common/util.h: Likewise. * dirmngr/cdblib.c: Likewise. * dirmngr/certcache.c: Likewise. * dirmngr/crlcache.c: Likewise. * dirmngr/dirmngr-client.c: Likewise. * dirmngr/dirmngr.c: Likewise. * dirmngr/dirmngr_ldap.c: Likewise. * dirmngr/dns-stuff.c: Likewise. * dirmngr/http.c: Likewise. * dirmngr/ks-engine-hkp.c: Likewise. * dirmngr/ks-engine-ldap.c: Likewise. * dirmngr/ldap-wrapper.c: Likewise. * dirmngr/ldap.c: Likewise. * dirmngr/misc.c: Likewise. * dirmngr/ocsp.c: Likewise. * dirmngr/validate.c: Likewise. * g10/encrypt.c: Likewise. * g10/getkey.c: Likewise. * g10/gpg.c: Likewise. * g10/gpgv.c: Likewise. * g10/import.c: Likewise. * g10/keydb.c: Likewise. * g10/keydb.h: Likewise. * g10/keygen.c: Likewise. * g10/keyid.c: Likewise. * g10/keylist.c: Likewise. * g10/keyring.c: Likewise. * g10/mainproc.c: Likewise. * g10/misc.c: Likewise. * g10/options.h: Likewise. * g10/packet.h: Likewise. * g10/parse-packet.c: Likewise. * g10/pkclist.c: Likewise. * g10/pkglue.c: Likewise. * g10/plaintext.c: Likewise. * g10/server.c: Likewise. * g10/sig-check.c: Likewise. * g10/sqlite.c: Likewise. * g10/tdbio.c: Likewise. * g10/test-stubs.c: Likewise. * g10/tofu.c: Likewise. * g10/trust.c: Likewise. * g10/trustdb.c: Likewise. * g13/create.c: Likewise. * g13/mountinfo.c: Likewise. * kbx/keybox-blob.c: Likewise. * kbx/keybox-file.c: Likewise. * kbx/keybox-init.c: Likewise. * kbx/keybox-search-desc.h: Likewise. * kbx/keybox-search.c: Likewise. * kbx/keybox-update.c: Likewise. * scd/apdu.c: Likewise. * scd/app-openpgp.c: Likewise. * scd/app-p15.c: Likewise. * scd/app.c: Likewise. * scd/ccid-driver.c: Likewise. * scd/command.c: Likewise. * scd/iso7816.c: Likewise. * sm/base64.c: Likewise. * sm/call-agent.c: Likewise. * sm/call-dirmngr.c: Likewise. * sm/certchain.c: Likewise. * sm/gpgsm.c: Likewise. * sm/import.c: Likewise. * sm/keydb.c: Likewise. * sm/minip12.c: Likewise. * sm/qualified.c: Likewise. * sm/server.c: Likewise. * tools/gpg-check-pattern.c: Likewise. * tools/gpgconf-comp.c: Likewise. * tools/gpgkey2ssh.c: Likewise. * tools/gpgparsemail.c: Likewise. * tools/gpgtar.c: Likewise. * tools/rfc822parse.c: Likewise. * tools/symcryptrun.c: Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
* common: Change calling convention for gnupg_spawn_process.Werner Koch2015-09-281-13/+27
| | | | | | | | | | | | | | | | | | | | * common/exechelp.h (GNUPG_SPAWN_NONBLOCK): New. (GNUPG_SPAWN_RUN_ASFW, GNUPG_SPAWN_DETACHED): Macro to replace the numbers. * common/exechelp.h (gnupg_spawn_process): Change function to not take an optional stream for stdin but to return one. * common/exechelp-posix.c (gnupg_spawn_process): Implement change. (create_pipe_and_estream): Add args outbound and nonblock. * common/exechelp-w32.c (gnupg_spawn_process): Implement change. -- In 2.1 this function is only used at one place and the stdin parameter is not used. Thus this change is trivial for the callers but along with estream's new es_poll it is overall simpler to use. Note that the Windows version has not been tested. Signed-off-by: Werner Koch <wk@gnupg.org>
* Switch to the libgpg-error provided estream.Werner Koch2014-08-261-2/+0
| | | | | | | | | | * configure.ac (NEED_GPG_ERROR_VERSION): Reguire 1.14. (GPGRT_ENABLE_ES_MACROS): Define. (estream_INIT): Remove. * m4/estream.m4: Remove. * common/estream-printf.c, common/estream-printf.h: Remove. * common/estream.c, common/estream.h: Remove. * common/init.c (_init_common_subsystems): Call gpgrt initialization.
* Change license for some files in common to LGPLv3+/GPLv2+.Werner Koch2012-04-201-5/+15
| | | | | | | | | | | | | | | | | | | | | | | Having the LGPL on the common GnuPG code helps to share code between GnuPG and related projects (like GPGME and Libassuan). This is good for interoperability and to reduces bugs. * common/asshelp.c, common/asshelp.h, common/asshelp2.c, common/b64dec.c * common/b64enc.c, common/convert.c, common/dns-cert.c * common/dns-cert.h common/exechelp-posix.c, common/exechelp-w32.c * common/exechelp-w32ce.c, common/exechelp.h, common/get-passphrase.c * common/get-passphrase.h, common/gettime.c, common/gpgrlhelp.c * common/helpfile.c, common/homedir.c, common/http.c, common/http.h * common/i18n.c, common/init.c, common/init.h, common/iobuf.c * common/iobuf.h, common/localename.c, common/membuf.c, common/membuf.h * common/miscellaneous.c, common/openpgp-oid.c, common/openpgpdefs.h * common/percent.c, common/pka.c, common/pka.h, common/session-env.c * common/session-env.h, common/sexp-parse.h, common/sexputil.c * common/signal.c, common/srv.c, common/srv.h, common/ssh-utils.c * common/ssh-utils.h, common/sysutils.c, common/sysutils.h * common/tlv.c, common/tlv.h, common/ttyio.c, common/ttyio.h * common/userids.c, common/userids.h, common/xasprintf.c: Change license to LGPLv3+/GPLv2+/
* Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch2011-02-041-6/+6
| | | | | | | | We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
* Reworked the posix and w32 exechelpers.Werner Koch2010-08-201-13/+26
|
* Merged Dirmngr with GnuPG.Werner Koch2010-06-091-11/+36
| | | | | A few code changes to support dirmngr.
* Add unfinished gpgtar.Werner Koch2010-06-071-7/+8
| | | | | Collected changes and ports of bug fixes from stable.
* More changes for CE. gpgsm does now build and run a keylisting.Werner Koch2010-03-241-6/+18
|
* Merged jnlib into common.Werner Koch2010-03-101-1/+1
|
* Changes required to use estream in gpgsm.Werner Koch2010-03-081-1/+4
|
* Keep on hacking on g13. A simple --create and --mount does now work.Werner Koch2009-10-131-0/+6
| | | | | A hacked up encfs is required.
* Some changes to suport g13.Werner Koch2009-09-301-0/+4
|
* Make sure not to leak file descriptors if running gpg-agent with aWerner Koch2009-03-191-1/+20
| | | | | command. Restore the signal mask to solve a problem in Mono.
* [W32] Avoid extra console window when importing or exporting.Werner Koch2008-01-271-3/+4
| | | | | Fixes bug 875.
* Extended the --check-program output: Error messages are now inlcued in anWerner Koch2007-08-291-0/+4
| | | | | easy parsable format.
* New command --check-programs for gpgconf.Werner Koch2007-08-291-2/+4
|
* Implemented more gpg-agen options to support certain passphrase policies.Werner Koch2007-08-271-4/+19
| | | | | New tool gpg-check-pattern.
* Changed to GPLv3.Werner Koch2007-07-041-4/+2
| | | | | Removed intl/.
* Let scdaemon call a script on status changesWerner Koch2006-09-071-0/+12
|
* Updated FSF's address.Werner Koch2006-06-201-1/+2
|
* * exechelp.h, exechelp.c: New. Based on code from ../sm/import.c.Werner Koch2004-12-061-0/+45
* gpgsm.c (run_protect_tool) [_WIN32]: Disabled. * import.c (popen_protect_tool): Simplified by making use of gnupg_spawn_process. (parse_p12): Likewise, using gnupg_wait_process. * export.c (popen_protect_tool): Ditto. (export_p12): Ditto.