aboutsummaryrefslogtreecommitdiffstats
path: root/g10/exec.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-05-17gpg: Improve the photo image viewer selection.Werner Koch1-24/+86
* g10/exec.c (w32_system): Add "!ShellExecute" special. * g10/photoid.c (get_default_photo_command): Use the new ShellExecute under Windows and fallbac to 'display' and 'xdg-open' in the Unix case. (show_photos): Flush stdout so that the output is shown before the image pops up. -- For Unix this basically syncs the code with what we have in gpg 1.4. Note that xdg-open may not be used when running as root which we support here. For Windows we now use ShellExecute as this seems to be preferred over "cmd /c start"; however this does not solve the actual problem we had in the bug report. To solve that problem we resort to a wait parameter which defaults to 400ms. This works on my Windows-10 virtualized test box. If we can figure out which simple viewers are commonly installed on Windows we should enhance this patch to test for them. GnuPG-bug-id: 4334 Signed-off-by: Werner Koch <[email protected]>
2017-03-07Remove -I option to common.NIIBE Yutaka1-5/+5
* dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common. * g10/Makefile.am (AM_CPPFLAGS): Ditto. * g13/Makefile.am (AM_CPPFLAGS): Ditto. * kbx/Makefile.am (AM_CPPFLAGS): Ditto. * scd/Makefile.am (AM_CPPFLAGS): Ditto. * sm/Makefile.am (AM_CPPFLAGS): Ditto. * tools/Makefile.am (AM_CPPFLAGS): Ditto. * Throughout: Follow the change. Signed-off-by: NIIBE Yutaka <[email protected]>
2016-11-05Change all http://www.gnu.org in license notices to https://Werner Koch1-1/+1
--
2015-01-22gpg: Replace remaining old error code macros by GPG_ERR_.Werner Koch1-9/+9
* g10/gpg.h (g10_errstr): Remove macro and change all occurrences by gpg_strerror. (G10ERR_): Remove all macros and change all occurrences by their GPG_ERR_ counterparts. Signed-off-by: Werner Koch <[email protected]>
2014-11-11Remove use of gnulib (part 2)Werner Koch1-1/+2
* configure.ac (strpbrk): Add to AC_CHECK_FUNCS. (gl_EARLY): Remove. * common/stringhelp.c (strpbrk) [!HAVE_STRPBRK]: New. * common/sysutils.c (gnupg_mkdtemp): New. Based on code from glibc-2.6. (gnupg_setenv): Rewrite. (gnupg_unsetenv): Rewrite. * g10/exec.c: Include sysutils.h and replace mkdtemp by gnupg_mkdtemp. * g13/be-encfs.c: Ditto. * g13/mount.c: Ditto. * tools/symcryptrun.c (confucius_mktmpdir): Ditto. Signed-off-by: Werner Koch <[email protected]>
2014-11-11Remove use of gnulib (part 1)Werner Koch1-1/+0
* gl/: Remove entire tree. * configure.ac: Remove gnulib tests and the gl/ Makefile. (setenv): Add to AC_CHECK_FUNCS. * autogen.rc (extra_aclocal_flags): Set to empty. * Makefile.am (ACLOCAL_AMFLAGS): Remove -I gl/m4 (SUBDIRS): Remove gl/. * agent/Makefile.am (common_libs): Remove ../gl/gnulib.a * common/Makefile.am (t_common_ldadd): Ditto. * dirmngr/Makefile.am (dirmngr_LDADD): Ditto. (dirmngr_ldap_LDADD, dirmngr_client_LDADD): Ditto. * g10/Makefile.am (needed_libs): Ditto. * g13/Makefile.am (g13_LDADD): Ditto. * kbx/Makefile.am (kbxutil_LDADD): Ditto. ($(PROGRAMS)): Ditto. * scd/Makefile.am (scdaemon_LDADD): Ditto. * sm/Makefile.am (common_libs): Ditto. * tools/Makefile.am (common_libs, commonpth_libs): Ditto. * agent/gpg-agent.c: Remove "mkdtemp.h" * g10/exec.c: Ditto. * scd/scdaemon.c: Ditto. * tools/symcryptrun.c: Ditto. * common/sysutils.c: Remove "setenv.h" * common/t-timestuff.c: Use putenv if setenv is not available. -- gnulib has always been a cause of trouble in GnuPG because we used only a very few functions and the complex include machinery of gnulib is quite complex and the cause for many build problems for example on OS X. This is not gnulib's fault but due to our limited use of gnulib and that we only rarely update the gnulib code to avoid regressions. In part two we will address the functions mkdtemp setenv unsetenv strpbrk which may bot be implemented on all platforms. They are not required on a libc based system. Signed-off-by: Werner Koch <[email protected]>
2014-03-07w32: Include winsock2.h to silence warnings.Werner Koch1-1/+4
2012-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch1-8/+8
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.
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-8/+8
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.
2010-04-14./autogen.sh --build-w32ce does now succeed.Werner Koch1-0/+8
2010-04-01Use gpg_err_set_errno to assign values to ERRNO.Werner Koch1-2/+2
2010-03-08Use macros for iobuf ioctls. Werner Koch1-3/+3
2009-07-13[g10]Werner Koch1-48/+50
* exec.c: Fix function name indentation. (expand_args): Simplify by using membuf functions. (exec_write): Fix memory leak on error. (w32_system): Use DETACHED_PROCESS so that a new console is not created.
2008-07-17Revert that last stupid setuid detection fix. Werner Koch1-2/+2
2008-07-17Do not run the setuid test if running under as root proper.Werner Koch1-3/+3
Documentation fixes. Some enhancements for the new OpenPGP Card.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2006-09-14Take advantage of newer gpg-error features.Werner Koch1-4/+4
2006-06-27Ported patches from 1.4.x Werner Koch1-2/+5
2006-05-27Revert last. It is still wrong.David Shaw1-12/+7
2006-05-27* exec.c (make_tempdir) [_WIN32]: Modified to properly handleDavid Shaw1-7/+12
arbitrarily long temporary directory paths.
2006-05-25* exec.c (make_tempdir): Fix bug with a temporary directory on Win32David Shaw1-2/+5
that is over 256 bytes long. Noted by Israel G. Lugo.
2006-04-21Still merging 1.4.3 code backWerner Koch1-1/+1
2006-04-19Continued with merging.Werner Koch1-3/+3
Still does not build.
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-82/+87
The gpg part does not yet build.
2005-08-21* exec.h, exec.c (make_tempdir, expand_args, exec_write, exec_read):David Shaw1-23/+23
Minor cleanup to use bitfield flags instead of a bunch of integers.
2005-07-27Converted all m_free to xfree etc.Werner Koch1-20/+20
2005-06-01* configure.ac (gl_INIT): Add gnulib stuff.Werner Koch1-4/+1
(fseeko, ftello, ttyname, isascii): Replaced the AC_REPLACE_FUNCS by a simple check. (putc_unlocked): Removed check. Not used. (strsep, mkdtemp, asprintf): Replaced checks by gnulib checks. (xsize): Added will probably come handy soon. (CFLAGS): Use -Wformat-security instead of -Wformat-nonliteral. Add --Wno-format-y2k. * gl/, gl/m4/: New. * gpg-agent.c: Include setenv.h. * Makefile.am (AM_CPPFLAGS): Added. * util.h: Add some includes for gnulib. (ttyname, isascii): Define them inline. * fseeko.c, ftello.c: Removed. * strsep.c, mkdtemp.c: Removed. * ttyname.c, isascii.c: Removed. * mkdtemp.c: Removed. * exec.c: Include mkdtemp.h * keybox-file.c (ftello) [!HAVE_FSEEKO]: New replacement function. Copied from ../common/ftello.c. * keybox-update.c (fseeko) [!HAVE_FSEEKO]: New replacement function. Copied from ../common/iobuf.c. * scdaemon.c: Include mkdtemp.h. * misc.c: Include setenv.h. * symcryptrun.c: Include mkdtemp.h.
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2005-03-31* exec.h, exec.c (set_exec_path): Remove some dead code and change allDavid Shaw1-19/+7
callers. We no longer need to append to $PATH.
2004-10-28* keyring.c: Make some strings translatable.David Shaw1-1/+1
* exec.c, sign.c: Change "can't open file" to "can't open" and "can't create file" to "can't create" to be consistent with other strings so we don't have to translate both.
2004-10-14* misc.c (is_secured_filename): New.Werner Koch1-3/+3
* keydb.c (maybe_create_keyring) * tdbio.c (tdbio_set_dbname) * plaintext.c (handle_plaintext) * openfile.c (copy_options_file, open_outfile) * exec.c (exec_write) * keygen.c (do_generate_keypair, gen_card_key_with_backup) * sign.c (sign_file, clearsign_file) * keyring.c (create_tmp_file, do_copy): Check for secured files before creating them. * keygen.c (print_status_key_created): s/unsigned char/byte/ due to a strange typedef for RISC OS. Noted by Stefan.
2004-10-13Added SELInux hacks and did some cleanups.Werner Koch1-0/+13
2004-08-27* encode.c, exec.c, g10.c, sign.c: Some translatable string cleanup.David Shaw1-7/+9
Change some "this" to `this'.
2003-09-23Merged most of David Shaw's changes in 1.3 since 2003-06-03.Werner Koch1-5/+5
2003-08-29* passphrase.c (agent_send_all_options): Make use of $GPG_TTY.David Shaw1-5/+5
* g10.c (main): Disable use-agent if passphrase-fd is given later. Suggested by Kurt Garloff. * exec.c, g10.c, gpgv.c, passphrase.c, photoid.c: s/__MINGW32__/_WIN32/ to help building on native Windows compilers. Requested by Brian Gladman. From Werner on stable branch.
2003-06-18Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch1-33/+33
to libgcrypt functions, using shared error codes from libgpg-error, replacing the old functions we used to have in ../util by those in ../jnlib and ../common, renaming the malloc functions and a couple of types. Note, that not all changes are listed below becuause they are too similar and done at far too many places. As of today the code builds using the current libgcrypt from CVS but it is very unlikely that it actually works.
2003-06-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+619
'GNUPG-1-9-BRANCH'.
2003-04-30* build-packet.c (build_sig_subpkt): Comments.David Shaw1-3/+2
* exec.c (exec_write): Cast NULL to void* to properly terminate varargs list. * keyedit.c (show_key_with_all_names): Just for safety, catch an invalid pk algorithm. * sign.c (make_keysig_packet): Crucial that the call to mksubpkt comes LAST before the calls to finalize the sig as that makes it possible for the mksubpkt function to get a reliable pointer to the subpacket area. * pkclist.c (do_we_trust_pre): If an untrusted key was chosen by a particular user ID, use that ID as the one to ask about when prompting whether to use the key anyway. (build_pk_list): Similar change here when adding keys to the recipient list. * trustdb.c (update_validity): Fix bug that prevented more than one validity record per trust record. (get_validity): When retrieving validity for a (user) supplied user ID, return the validity for that user ID only, and do not fall back to the general key validity. (validate_one_keyblock): Some commentary on whether non-self-signed user IDs belong in the web of trust (arguably, they do).
2003-02-12* exec.c (set_exec_path): Add debugging line.David Shaw1-0/+3
* g10.c (print_hex, print_mds): Print long hash strings a lot neater. This assumes at least an 80-character display, as there are a few other similar assumptions here and there. Users who need unformatted hashes can still use with-colons. Check that SHA384 and 512 are available before using them as they are no longer always available.
2002-11-13* exec.c [__CYGWIN32__]: Keep cygwin separate from Mingw32; we don't needDavid Shaw1-4/+4
it here as it behaves more like a Posix system. From Werner on stable branch. * passphrase.c (agent_get_passphrase): Ditto. From Werner on stable branch. * tdbio.c (MY_O_BINARY): Need binary mode with Cygwin. From Werner on stable branch. * g10.c, gpgv.c (main) [__CYGWIN32__]: Don't get the homedir from the registry. From Werner on stable branch.
2002-10-19This commit was manufactured by cvs2svn to create branchRepo Admin1-617/+0
'GNUPG-1-9-BRANCH'.
2002-09-10* exec.c (expand_args): Remove loop left over from earlier implementation.David Shaw1-4/+8
(exec_write): Missed one tick.
2002-09-10Cleanups and minor fixes.Werner Koch1-6/+8
2002-07-30* options.h, g10.c (main), mainproc.c (proc_encrypted): Return aDavid Shaw1-4/+0
decryption failed error if a MDC does not verify. Warn if a MDC is not present (can disable via --no-mdc-warning). * exec.c (exec_write), g10.c (main), keyserver.c (keyserver_spawn): Use new DISABLE_KEYSERVER_PATH rather than FIXED_EXEC_PATH.
2002-07-25* exec.c, export.c, import.c, keyedit.c, keyserver.c, misc.c: "Warning" ->David Shaw1-3/+3
"WARNING"
2002-07-24* options.h, exec.h, exec.c (set_exec_path, exec_write), g10.c (main),David Shaw1-6/+24
keyserver.c (keyserver_spawn): If the user does not use "exec-path", completely replace $PATH with GNUPG_LIBEXECDIR before calling the keyserver helper. If the user does use "exec-path", append GNUPG_LIBEXECDIR after the specified path.
2002-07-04* photoid.c (get_default_photo_command, show_photos): HonorDavid Shaw1-2/+2
FIXED_PHOTO_VIEWER and DISABLE_PHOTO_VIEWER. * mainproc.c (check_sig_and_print): Use --show-photos to show photos when verifying a sig made by a key with a photo. * keyserver.c (parse_keyserver_uri): Properly parse a URI with no :port section and an empty file path, but with a terminating '/'. (keyserver_work): Honor DISABLE_KEYSERVER_HELPERS. * hkp.c (hkp_ask_import): Display keyserver URI as a URI, but only if verbose. * exec.c, g10.c: USE_EXEC_PATH -> FIXED_EXEC_PATH
2002-07-03* exec.h, exec.c (set_exec_path, exec_write), g10.c (main): IfDavid Shaw1-0/+18
USE_EXEC_PATH is defined at compile time, use it to lock the exec-path and not allow the user to change it.
2002-07-01* packet.h, build-packet.c (build_attribute_subpkt), exec.c (expand_args),David Shaw1-1/+1
mkdtemp.c (mkdtemp), photoid.c (parse_image_header): Fix some signedness compiler warnings.
2002-06-29Update head to match stable 1.0David Shaw1-0/+579