* tools/gpgtar.h (struct tarinfo_s): New.
* tools/gpgtar.c (cmd, skip_crypto, files_from, null_names): Move
global vars more to the top.
(set_cmd): Rename 'cmd' to 'c'.
* tools/gpgtar-list.c (parse_header): Add arg 'info' and improve error
messages.
(read_header): Add arg 'info' and update counter.
(skip_data): Ditto.
(gpgtar_list): Pass info object to read functions.
(gpgtar_read_header): Add arg 'info'.
* tools/gpgtar-extract.c (gpgtar_extract): add arg 'info' and pass on.
(extract_regular): Add arg 'info' and update counter.
--
This now prints the block number of a header with error.
Signed-off-by: Werner Koch <wk@gnupg.org>
* common/exectool.h (exec_tool_status_cb_t): New.
* common/exectool.c: Include missing exectool.h.
(read_and_log_buffer_t): Replace array by pointer.
(gnupg_exec_tool_stream): Add args 'status_cb' and 'status_cb_value'.
Change all callers to pass NULL for them. Malloc buffer for
FDERRSTATE.
(read_and_log_stderr): Implement status_fd feature.
Signed-off-by: Werner Koch <wk@gnupg.org>
* 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/sh-exectool.c: Rename to exectool.c.
* common/sh-exectool.h: Rename to exectool.h.
* common/Makefile.am (common_sources): Adjust for rename.
* common/exectool.c (sh_exec_tool_stream): Rename to
gnupg_exec-tool-stream.
(sh_exec_tool): Rename to gnupg_exec_tool.
* tools/gpgtar-create.c (gpgtar_create): Adjust for changes.
* tools/gpgtar-extract.c: Adjust for changes.
* tools/gpgtar-list.c: Adjust for changes.
--
The "sh-" presifx is used by g13 for system helpers which are used by
processes created via userv. A generic function in common/ should
also have a generic name.
Signed-off-by: Werner Koch <wk@gnupg.org>
* tools/Makefile.am: gpgtar now requires neither npth nor libassuan.
* tools/gpgtar-create.c (gpgtar_create): Use the new 'sh-exectool'
helper.
* tools/gpgtar-extract.c (gpgtar_extract): Likewise.
* tools/gpgtar-list.c (gpgtar_list): Likewise.
* tools/gpgtar.c (main): Set default gpg program. Drop the
initialization of npth and libassuan.
Signed-off-by: Justus Winter <justus@g10code.com>
* tools/gpgtar-create.c (gpgtar_create): Return an error code, fix
error handling.
* tools/gpgtar-extract.c (gpgtar_extract): Likewise.
* tools/gpgtar-list.c (read_header): Return an error code.
(gpgtar_list): Return an error code, fix error handling.
(gpgtar_read_header): Return an error code.
* tools/gpgtar.c: Add missing include.
(main): Print an generic error message if a command failed and no
error has been printed yet.
* tools/gpgtar.h (gpgtar_{create,extract,list,read_header}): Fix the
prototypes accordingly.
Signed-off-by: Justus Winter <justus@g10code.com>
* tools/Makefile.am: Amend CFLAGS and LDADD.
* tools/gpgtar-create.c (gpgtar_create): Add encrypt flag and encrypt
stream if requested.
* tools/gpgtar-extract.c (gpgtar_extract): Likewise for decryption.
* tools/gpgtar-list.c (gpgtar_list): Likewise.
* tools/gpgtar.c (main): Initialize npth and assuan. Parse recipient
and local user, and note which flags are currently ignored. Adapt
calls to gpgtar_list and friends.
(tar_and_encrypt): Drop stub function and prototype.
(decrypt_and_untar): Likewise.
(decrypt_and_list): Likewise.
* tools/gpgtar.h (gpgtar_{create,extract,list}): Add encryption or
decryption argument.
Signed-off-by: Justus Winter <justus@g10code.com>
The asymmetric quotes used by GNU in the past (`...') don't render
nicely on modern systems. We now use two \x27 characters ('...').
The proper solution would be to use the correct Unicode symmetric
quotes here. However this has the disadvantage that the system
requires Unicode support. We don't want that today. If Unicode is
available a generated po file can be used to output proper quotes. A
simple sed script like the one used for en@quote is sufficient to
change them.
The changes have been done by applying
sed -i "s/\`\([^'\`]*\)'/'\1'/g"
to most files and fixing obvious problems by hand. The msgid strings in
the po files were fixed with a similar command.