aboutsummaryrefslogtreecommitdiffstats
path: root/common/exectool.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-02-13common: Make gnupg_exec_tool conform to spec.Werner Koch1-9/+18
* common/exectool.c (gnupg_exec_tool): Allocate extra byte. Allow zero length read. Append hidden byte. Release memory on error. -- Signed-off-by: Werner Koch <[email protected]>
2015-12-15common: Use default_errsource for call-gpg and exectool.Werner Koch1-8/+15
* common/call-gpg.c (my_error_from_syserror, my_error_from_errno): New. Use these wrappers. * common/exectool.c (my_error_from_syserror): New. Use these wrappers. -- Function in common should use the error source of the component which links them. The global variable DEFAULT_ERRSOURCE is set early by each component to make this possible. Signed-off-by: Werner Koch <[email protected]>
2015-12-14common: Change license for exectool to LGPLv3+/GPLv2+.Werner Koch1-5/+15
* common/exectool.c, common/exectool.h: Change license. -- We always try to use this license for shared code. Signed-off-by: Werner Koch <[email protected]>
2015-12-14common: Rename sh-exectool to exectool.Werner Koch1-9/+9
* 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 <[email protected]>
2015-12-04common: Add a stream interface to 'sh-exectool'.Justus Winter1-86/+206
* common/sh-exectool.c (struct copy_buffer): Add infrastructure for copying between streams. (copy_buffer_{init,shred,do_copy,flush}): New functions. (sh_exec_tool_stream): Rework 'sh_exec_tool' to operate on streams. (nop_free): New function. (sh_exec_tool): Express this in terms of 'sh_exec_tool_stream'. * common/sh-exectool.h (sh_exec_tool_stream): New prototype. Signed-off-by: Justus Winter <[email protected]>
2015-12-04common: Add header file and build the new code.Justus Winter1-1/+1
* common/Makefile.am (common_sources): Add new files. * common/sh-exectool.h: New file. Signed-off-by: Justus Winter <[email protected]>
2015-12-04common: Add code to execute a helper.Werner Koch1-0/+303
* common/sh-exectool.c: New file. Signed-off-by: Justus Winter <[email protected]>