aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* spawn: Allow NULL for ACT.NIIBE Yutaka2024-05-302-2/+19
| | | | | | | | | * 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]>
* Fix process termination check at release.NIIBE Yutaka2024-05-292-2/+2
| | | | | | | | | | * 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]>
* Fix how environment variables are specified for spawn.NIIBE Yutaka2024-05-293-10/+12
| | | | | | | | | | | | | * 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]>
* Cleaner semantics for _gpgrt_process_spawn without a callback.NIIBE Yutaka2024-05-295-108/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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]>
* Import spawn functions from GnuPG master.NIIBE Yutaka2024-05-285-1132/+1245
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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]>
* argparse: Fix a theoretical memory leak.Werner Koch2024-04-261-3/+4
| | | | | | | | | | * 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
* Post release updatesWerner Koch2024-04-252-1/+7
| | | | --
* Release 1.49libgpg-error-1.49Werner Koch2024-04-252-3/+8
|
* yat2m: Improve html output.Werner Koch2024-04-251-5/+25
| | | | --
* logging: New function gpgrt_logv_domain.Werner Koch2024-04-256-4/+28
| | | | | | | | | | | | | * 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.
* core: New function gpgrt_add_post_log_func.Werner Koch2024-04-228-2/+88
| | | | | | | | | | | | | | | | * 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.
* logging: Indent continuation lines of log_printhex.Werner Koch2024-04-191-6/+14
| | | | | | * src/logging.c (_gpgrt_logv_internal): Change to return the length w/o prefix. (_gpgrt_logv_printhex): Indent wrapped lines properly.
* logging: Add a truncate keyword to log_printhex.Werner Koch2024-04-121-0/+19
| | | | | | | | | | | | | | | * 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).
* argparser: avoid endless loop due to a conf file read error.Werner Koch2024-04-081-3/+18
| | | | | | | | | | | | | | | | | | * 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
* Post release updatesWerner Koch2024-02-232-1/+8
| | | | --
* Release 1.48libgpg-error-1.48gpgrt-1.48Werner Koch2024-02-233-8/+10
|
* argparse: Adjust help output for command mode.Werner Koch2024-02-211-1/+7
| | | | * src/argparse.c (show_help): Adjust for command style options.
* core: Add "wipe" mode flag.Werner Koch2024-02-063-10/+62
| | | | | | | | | | | | | | | | | | | | | * 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.
* core: New function gpgrt_wipememory.Werner Koch2024-02-067-1/+37
| | | | | | | | | | | * 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
* argparser: Implement a command mode.Werner Koch2024-02-065-42/+144
| | | | | | | | | | | | | | | | | | * 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
* gpgrt-config: Avoid warning about literals for curly braces.Jakub Jelen2024-02-011-1/+1
| | | | | | | | | | * 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]>
* estream: Fix call to string filter for estream-printf.NIIBE Yutaka2024-01-161-18/+26
| | | | | | | | | | * 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]>
* po: Update Russian translation.Ineiev2024-01-151-138/+4
|
* po: update Polish translationJakub Bogusz2024-01-151-11/+7
|
* po: For German change "Passphrase" to "Passwort"Werner Koch2023-12-111-4/+4
| | | | --
* yat2m: Fix HTML output for backslash.NIIBE Yutaka2023-11-161-1/+1
| | | | | | | | * doc/yat2m.c (proc_texi_buffer): Use &bsol. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* yat2m: Implement @item handling with @table item specification.NIIBE Yutaka2023-11-151-2/+61
| | | | | | | | | | | | | * doc/yat2m.c (MAX_TABLE_NESTING): New. (table_item_stack): New. (proc_texi_cmd): Add @gcctabopt and @gnupgtabopt. Add handling of @item argument with proc_texi_buffer. Add handling of @table argument, push to table_item_stack. -- GnuPG-bug-id: 6674 Signed-off-by: NIIBE Yutaka <[email protected]>
* yat2m: Also handle @file treating '-' as minus.NIIBE Yutaka2023-11-151-1/+1
| | | | | | | | * doc/yat2m.c (proc_texi_cmd): It's minus for @file. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* yat2m: Output \- for @samp, @kbd, and @env, too.NIIBE Yutaka2023-11-141-3/+3
| | | | | | | | * doc/yat2m.c (proc_texi_cmd): Support more commands. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* yat2m: Generate \- for roff for some commands.NIIBE Yutaka2023-11-091-36/+57
| | | | | | | | | | | | * doc/yat2m.c (proc_texi_cmd): New flag to enable generating \- for roff for @command, @code, @url and @option for their argument, and @example and @smallexample until their @end. (proc_texi_buffer): Emit \- when enabled. -- GnuPG-bug-id: 6674 Signed-off-by: NIIBE Yutaka <[email protected]>
* yat2m: Add support of @minus{} command.NIIBE Yutaka2023-11-071-0/+1
| | | | | | | | | * doc/yat2m.c (proc_texi_cmd): Support @minus. -- GnuPG-bug-id: 6674 Signed-off-by: NIIBE Yutaka <[email protected]>
* yat2m: Use \fP to return previous font.NIIBE Yutaka2023-11-071-10/+10
| | | | | | | | | | | | | | * doc/yat2m.c (proc_texi_cmd): Use \fP instead of \fR. -- This can fix the output of following input (in gpg.texi): @item --list-filter @{select=@var{expr}@} The last right brace is in bold font. Signed-off-by: NIIBE Yutaka <[email protected]>
* yat2m: Fix backslash output in man.NIIBE Yutaka2023-11-071-1/+1
| | | | | | | | * doc/yat2m.c (proc_texi_buffer): Use \[rs] for backslash. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* yat2m: Parse @dots{} to show ellipsis in HTML mode.Ben Kibbey2023-11-071-0/+1
| | | | | | | * doc/yat2m.c (proc_texi_cmd): Add "dots" to comamnd table and output "..." in manpages and ellipsis in HTML mode. Signed-off-by: Ben Kibbey <[email protected]>
* yat2m: No en-dash and em-dash for @item line.NIIBE Yutaka2023-11-061-6/+14
| | | | | | | | | | * doc/yat2m.c (proc_texi_cmd): Disable parsing for dashes for @item. -- GnuPG-bug-id: 6746 Signed-off-by: NIIBE Yutaka <[email protected]>
* yat2m: Interpret -- and --- verbatimly in @example.NIIBE Yutaka2023-11-021-3/+10
| | | | | | | | | | | * doc/yat2m.c (example_cmd_active): New. (proc_texi_cmd): Don't apply the processing for en-dash and em-dash when it's in @example/@smallexample. -- GnuPG-bug-id: 6746 Signed-off-by: NIIBE Yutaka <[email protected]>
* yat2m: Support Texinfo input -- and ---.NIIBE Yutaka2023-11-021-0/+18
| | | | | | | | | * doc/yat2m.c (proc_texi_buffer): Handle en-dash and em-dash. -- GnuPG-bug-id: 6746 Signed-off-by: NIIBE Yutaka <[email protected]>
* doc: Minor style fix.NIIBE Yutaka2023-10-051-3/+3
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* estream: String filter should NOT be called with non-nul string.NIIBE Yutaka2023-09-271-3/+8
| | | | | | | | | | * src/estream-printf.c (pr_string): Call the string filter function SF conditionally to avoid possible SEGV. -- GnuPG-bug-id: 6737 Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix the previous commit.NIIBE Yutaka2023-09-011-1/+1
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Change the default for --with-libtool-modification.NIIBE Yutaka2023-09-011-1/+1
| | | | | | | | | * configure.ac (--with-libtool-modification): default=never. -- GnuPG-bug-id: 6619 Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Update libtool-patch.sed.NIIBE Yutaka2023-08-091-17/+51
| | | | | | | | | * build-aux/libtool-patch.sed: Fail with exit code 1, when it doesn't go well. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Use sed for --with-libtool-modification.NIIBE Yutaka2023-08-083-2/+37
| | | | | | | | | | | | * configure.ac (--with-libtool-modification): Use sed. -- I crafted a sed script so that it can work well against multiple versions of libtool. Tested with 2.4.2 and 2.4.7. GnuPG-bug-id: 6619 Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Add build-aux/libtool.patch in the tarball.NIIBE Yutaka2023-08-042-2/+3
| | | | | | * Makefile.am (EXTRA_DIST): build-aux/libtool.patch. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: New configure option --with-libtool-modification.NIIBE Yutaka2023-08-021-2/+26
| | | | | | | | | * configure.ac (--with-libtool-modification): New. -- GnuPG-bug-id: 6619 Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Fix libtool modification.NIIBE Yutaka2023-07-283-13/+13
| | | | | | | | | | | * build-aux/ltmain.sh: Fix reverting mistake. * build-aux/libtool.patch: Regenerate and fix whitespace mistake. * configure.ac [x86_64-*mingw32*] (libtool-patch): Exit when failed. -- Fixes-commit: c1d3f5952f621a553c122cee7a20e990d982a715 Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Support --verbose option for mkheader.NIIBE Yutaka2023-07-281-4/+15
| | | | | | | | | | * src/mkheader.c (include_file): Only emit the notification when invoked with --verbose. (main): Add --verbose handling. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Apply libtool.patch at the last stage of configure.NIIBE Yutaka2023-07-273-13/+58
| | | | | | | | | | | | | * build-aux/libtool.patch: New. * build-aux/ltmain.sh: Revert our local change to original. * configure.ac [x86_64-*mingw32*] (libtool-patch): Introduce a construct with AC_CONFIG_COMMANDS to apply build-aux/libtool.patch after libtool generation. -- GnuPG-bug-id: 6619 Signed-off-by: NIIBE Yutaka <[email protected]>
* yat2m: No additional newline after the end of subsection.NIIBE Yutaka2023-07-271-0/+2
| | | | | | | | * doc/yat2m.c (proc_texi_buffer): Add 'break' in switch. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Recover the local change for libtool.NIIBE Yutaka2023-07-271-1/+13
| | | | | | | | | | | * ltmain.sh: Prefix the SO number for W64 with a "6". -- Forward port our local change of commit: ca46b9a7bccb2eab085fc45722ffca1210f48223 Signed-off-by: NIIBE Yutaka <[email protected]>