| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
* src/spawn-posix.c (do_create_pipe_and_estream): Call post_syscall.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
| |
* src/spawn-posix.c (spawn_detached): Free ARGV.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
| |
* src/spawn-w32.c (get_max_fds): Remove.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/spawn-w32.c (_gpgrt_spawn_actions_set_envvars): It's an ASCII
string.
--
In future, we can extend it as UTF-8 string. When doing so, we will
detect ASCII or utf-8, and if needed, convert it to Unicode wchar
string with four-byte-zero terminated, and let the flag have
CREATE_UNICODE_ENVIRONMENT.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in (GPGRT_PROCESS_ALLOW_SET_FG): New.
* src/spawn-w32.c (_gpgrt_process_spawn): Support the flag.
--
When GPGME will use gpgrt_process_spawn in future, this flag
will be needed to support GPGME_SPAWN_ALLOW_SET_FG.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
| |
* src/init.c (utf8_for_new_threads): New var.
(_gpgrt_w32_utf8_for_new_threads): New func.
(get_tls): Init the TLS utf8 flag from the new var.
* src/w32-gettext.c (_gpg_w32_gettext_use_utf8): Implement new flag.
--
GnuPG-bug-id: 7185
|
|
|
|
| |
--
|
|
|
|
|
|
|
|
| |
* autogen.sh <find-version>: Also print the full commit id.
* configure.ac: Get the full commit id. Add it to VERSION.
(BUILD_REVISION): Replace this ac_define by
(BUILD_COMMITID): this.
* src/version.c (cright_blurb): Use here.
|
|
|
|
|
|
|
| |
* src/spawn-posix.c (environ): Declare.
--
GnuPG-bug-id: 7169
|
|
|
|
| |
--
|
| |
|
|
|
|
| |
--
|
|
|
|
|
|
| |
* src/gpg-error.h.in (GPGRT_PROCESS_NO_EUID_CHECK): New.
* src/spawn-posix.c (spawn_detached): Move check to ...
(_gpgrt_process_spawn): here and skip if flag is set.
|
|
|
|
|
| |
* src/spawn-posix.c: Move include and struct defs around.
* src/spawn-w32.c: Move struct defs around.
|
|
|
|
|
|
| |
* src/gpg-error.m4: Apply spell fix from GnuPG master.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.m4 (_AM_PATH_GPGRT_CONFIG): Don't set
gpg_error_config_version.
(AM_PATH_GPG_ERROR): Set GPG_ERROR_CONFIG here and set
gpg_error_config_version with GPG_ERROR_CONFIG.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
* src/spawn-posix.c (my_exec): When PGMNAME==NULL, just fork.
(_gpgrt_process_spawn): Support PGMNAME==NULL use case.
* src/spawn-w32.c (_gpgrt_process_spawn): Return GPG_ERR_INV_ARG,
when PGMNAME==NULL.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.def.in: Update.
* src/gpg-error.h.in: Add declarations.
* src/gpg-error.vers: Update.
* src/visibility.c: Update.
* src/visibility.h: Update.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in (GPGRT_PROCESS_NO_CONSOLE): New.
* src/spawn-w32.c (_gpgrt_process_spawn): Handle
GPGRT_PROCESS_NO_CONSOLE.
--
This may be used to support ASSUAN_PIPE_CONNECT_DETACHED
in libassuan.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
| |
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in (gpgrt_b64dec_proc): Return gpg_err_code_t.
(gpgrt_b64dec_finish): Ditto.
* src/visibility.c: Fix return type.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
| |
* src/spawn-w32.c (spawn_detached): Increase array size.
(_gpgrt_process_spawn): Ditto.
--
The former limit of 16 might be a bit too low for some use cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/spawn-posix.c: Use log_info instead of log_error.
* src/spawn-w32.c: Ditto.
(spawn_detached): Fix copying of hd[2]
(_gpgrt_process_spawn): Ditto.
--
The spawn function might be used to run helper processes which are
non-critical for the operation of the program. For example to display
help. Bumping the error counter via gpgrt_log_error would then let
the entire program fail which might be surprising. It is better to
just print an informational message and let the caller decide what to
do with the returned error code.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.def.in: Update.
* src/gpg-error.vers: Update.
* src/gpg-error.h.in: Add declarations.
* src/visibility.c: Add implementations.
* src/visibility.h: Expose them.
--
GnuPG-bug-id: 6249
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
| |
* src/spawn-w32.c (_gpgrt_process_spawn): Only set
STARTF_USESTDHANDLES with active handles.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
| |
* src/spawn-posix.c (_gpgrt_process_spawn): ACT may be null.
* src/spawn-w32.c (_gpgrt_process_spawn): Likewise.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
* src/spawn-posix.c (_gpgrt_process_release): When NOT terminated,
terminate and wait.
* src/spawn-w32.c (_gpgrt_process_release): Likewise.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpgrt-int.h (_gpgrt_spawn_actions_set_envvars)
[HAVE_W32_SYSTEM]: Assume use with GetEnvironmentStrings.
(_gpgrt_spawn_actions_set_environ) [!HAVE_W32_SYSTEM]:
New.
* src/spawn-posix.c: Follow the change.
* src/spawn-w32.c: Can specify envvars now.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in (@define:struct_spawn_cb_arg@): Remove.
(gpgrt_spawn_actions_t): New.
(@define:spawn_actions_functions@): New.
* src/gpgrt-int.h (_gpgrt_spawn_actions_new)
(_gpgrt_spawn_actions_release, _gpgrt_spawn_actions_set_envvars)
(_gpgrt_spawn_actions_set_redirect): New.
[HAVE_W32_SYSTEM] (_gpgrt_spawn_actions_set_inherit_handles): New.
[!HAVE_W32_SYSTEM] (_gpgrt_spawn_actions_set_inherit_fds)
(_gpgrt_spawn_actions_set_atfork): New.
(_gpgrt_process_spawn): Use gpgrt_spawn_actions_t.
(_gpgrt_spawn_helper): Remove.
* src/mkheader.c: Emit gpgrt_spawn_actions_* definition.
* src/spawn-posix.c(_gpgrt_spawn_actions_new)
(_gpgrt_spawn_actions_release, _gpgrt_spawn_actions_set_envvars)
(_gpgrt_spawn_actions_set_redirect)
(_gpgrt_spawn_actions_set_inherit_fds)
(_gpgrt_spawn_actions_set_atfork): New.
(spawn_detached, _gpgrt_process_spawn): Use gpgrt_spawn_actions_t.
(_gpgrt_spawn_helper): Remove.
* src/spawn-w32.c: Ditto, with
_gpgrt_spawn_actions_set_inherit_handles, but no
_gpgrt_spawn_actions_set_atfork.
--
GnuPG-bug-id: 6249
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in (@define:gpgrt_process_t@): Remove.
(@define:struct_spawn_cb_arg@): New.
(enum gpgrt_process_requests): New.
(GPGRT_PROCESS_DETACHED, GPGRT_PROCESS_STDIN_PIPE)
(GPGRT_PROCESS_STDOUT_PIPE, GPGRT_PROCESS_STDERR_PIPE)
(GPGRT_PROCESS_STDINOUT_SOCKETPAIR, GPGRT_PROCESS_STDIN_KEEP)
(GPGRT_PROCESS_STDOUT_KEEP, GPGRT_PROCESS_STDERR_KEEP)
(GPGRT_PROCESS_STDFDS_SETTING, GPGRT_PROCESS_STREAM_NONBLOCK):
New.
* src/gpgrt-int.h (_gpgrt_process_spawn, _gpgrt_process_terminate)
(_gpgrt_process_get_fds, _gpgrt_process_get_streams)
(_gpgrt_process_ctl, _gpgrt_process_wait, _gpgrt_process_release)
(_gpgrt_process_wait_list, _gpgrt_spawn_helper): New.
* src/mkheader.c: Emit definition of struct_spawn_cb_arg.
* src/spawn-posix.c (_gpgrt_process_spawn, _gpgrt_process_terminate)
(_gpgrt_process_get_fds, _gpgrt_process_get_streams)
(_gpgrt_process_ctl, _gpgrt_process_wait, _gpgrt_process_release)
(_gpgrt_process_wait_list, _gpgrt_spawn_helper): New.
* src/spawn-w32.c: Ditto.
--
GnuPG-bug-id: 6249
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
* src/argparse.c (store_alias): Free NAME because it has ownerhip
here. Take care P is actually a pointer into NAME.
--
Note that aliases have never been implemented.
GnuPG-bug-id: 7105
|
|
|
|
| |
--
|
| |
|
|
|
|
| |
--
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in (gpgrt_logv_domain): New. Also add printf
attributes to the other logv functions.
* src/visibility.c (gpgrt_logv_domain): New.
--
This function can be used instead of gpgrt_logv to provide a somain
string. As of now this has no effect but we may later add an API to
allow selection of diagnostics depending on the domain. There is also
a new (buffer,length) argument which will eventually be used to
provide a domain based gpgrt_log_printhex.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in (gpgrt_add_post_log_func): New.
* src/gpg-error.vers: Add new function
* src/gpg-error.def.in: Ditto.
* src/visibility.c (gpgrt_add_post_log_func): New.
* src/logging.c (struct post_log_func_item_s): New.
(post_log_func_list): New.
(_gpgrt_add_post_log_func): new.
(run_post_log_funcs): New.
(_gpgrt_logv_internal): Call for fatal and bug log levels.
--
This is required in case an application or library needs to do do some
quick cleanups after a log_fatal.
|
|
|
|
|
|
| |
* src/logging.c (_gpgrt_logv_internal): Change to return the length
w/o prefix.
(_gpgrt_logv_printhex): Indent wrapped lines properly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/logging.c (_gpgrt_logv_printhex): Add keyword support.
--
A keyword in the format string is indicated by a leading pipe symbo,
and exlamation mark, an arbitrary string of keywords, and a fina pipe
sumbol. The only supprted keyword righty now is "trunc". Thus
gpgrt_log_printhex (buf, buflen, "|!trunc|The buffer:")
Will output not more that 32 hex bytes after "The buffer:" and instead
of wrapping indicate the truncation by an Unicode horizontal ellipsis
(#x2026).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/argparse.c (struct _gpgrt_argparse_internal_s): Add forceeof
flag.
(initialize): Clear.
(_gpgrt_argparse): Clear.
(_gpgrt_argparse): Act upon.
--
Reported test case:
$ mkdir /etc/gnupg/gpg.conf
$ gpg --version
All other ways to force a read error will also exhibit the bug.
Debian-bug-id: 1068594
|
|
|
|
| |
--
|
| |
|
|
|
|
| |
* src/argparse.c (show_help): Adjust for command style options.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpgrt-int.h (struct _gpgrt_stream_internal): Add field "wipe".
* src/estream.c (mem_free2): New.
(struct estream_cookie_mem): Add flag "wipe".
(func_mem_create): Add arg wipe.
(func_mem_destroy): Wipe.
(X_WIPE): New.
(parse_mode): Parse "wipe" mode flag.
(init_stream_obj): Set it.
(do_close): Wipe internal struct with its static buffers.
(doreadline): Pass wipe mode along to help buffer.
(_gpgrt_mopen): Pass wipe mode.
(_gpgrt_fopenmem): Ditto.
--
GnuPG-bug-id: 6954
This is likely not complete but should wipe out buffers allocated by
fopenmem.
|
|
|
|
|
|
|
|
|
|
|
| |
* src/init.c (_gpgrt_wipememory): New.
* src/visibility.c (gpgrt_wipememory): New.
* src/visibility.h: Add it.
* src/gpg-error.def.in: Ditto.
* src/gpg-error.vers: Ditto.
--
GnuPG-bug-id: 6954
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in (ARGPARSE_FLAG_COMMAND): New.
* src/argparse.c (struct _gpgrt_argparse_internal_s): Add flags
explicit_cmd_mode, cmd_mode, and command_seen.
(initialize): Init them. Mark default commands as commands.
(handle_meta_command): New.
(handle_metacmd): Add "command-mode" and "-command-mode".
(find_long_option): Add arg only_commands.
(arg_parse): Factor some code out to ...
(handle_special_commands): new.
(arg_parse): Implement the command-mode.
* tests/t-argparse.c (main): Add some testing code.
--
GnuPG-bug-id: 6978
|
|
|
|
|
|
|
|
|
|
| |
* src/gpgrt-config.in: Fix the pattern match for an expression with
variable in the ".pc" config file.
--
GnuPG-bug-id: 6969
Signed-off-by: Jakub Jelen <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
* src/estream-printf.c (pr_string): Make sure to prepare
NUL-terminated string to call the string filter.
--
GnuPG-bug-id: 6737
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
| |
|
|
|
|
| |
--
|