aboutsummaryrefslogtreecommitdiffstats
path: root/g10/tdbio.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gpg: Replace remaining uses of stdio by estream.Werner Koch2015-02-191-31/+34
| | | | | | | | | | | | | | | | | | | | | | | * g10/sign.c (sign_file): Use log_printf instead of stderr. * g10/tdbdump.c (export_ownertrust): Use estream fucntions. (import_ownertrust): Ditto. * g10/tdbio.c (tdbio_dump_record): Ditto. Change arg to estream_t. -- Reported-by: Guilhem Moulin <[email protected]> Needed for unattended key edits with --status-fd, because since 2.1 status prompts are preceded by es_fflush (in cpr.c:do_get_from_fd) not fflush(3), so the standard output may not be flushed before each prompt. (Which breaks scripts using select(2) to multiplex between the standard and status outputs.) His patch only affected print_and_check_one_sig_colon() but there are many more places where stdio and estream are mixed. This patch now replaces most of them in g10/. At some places stdio is still used, but that is local to a function and should not have side effects. Signed-off-by: Werner Koch <[email protected]>
* Use inline functions to convert buffer data to scalars.Werner Koch2015-02-111-10/+10
| | | | | | | | | | | | | | | * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on shift problems. Hanno Böck found a case with an invalid read due to this problem. To fix that once and for all almost all uses of "<< 24" and "<< 8" are changed by this patch to use an inline function from host2net.h. Signed-off-by: Werner Koch <[email protected]>
* gpg: Replace remaining old error code macros by GPG_ERR_.Werner Koch2015-01-221-52/+54
| | | | | | | | | * 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]>
* Use a unique capitalization for "Note:".Werner Koch2014-10-101-1/+1
| | | | --
* Silence more warnings about unused vars and args.Werner Koch2014-03-071-1/+1
| | | | | | | | | | | | | * dirmngr/cdblib.c (cdb_init) [W32]: Remove unused var. * dirmngr/dirmngr-client.c (start_dirmngr): s/int/assuan_fd_t/. * dirmngr/dirmngr.c (w32_service_control): Mark unused args. (call_real_main): New. (main) [W32]: Use new function to match prototype. (real_main) [W32]: Mark unused vars. (handle_signal) [W32]: Do not build the function at all. (handle_connections) [W32]: Do not define signo. * dirmngr/ldap-wrapper-ce.c (outstream_reader_cb): Remove used vars. * g10/tdbio.c (ftruncate) [DOSISH]: Define only if not yet defined.
* gpg: Do not require a trustdb with --always-trust.Werner Koch2014-03-071-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/tdbio.c (tdbio_set_dbname): Add arg R_NOFILE. * g10/trustdb.c (trustdb_args): Add field no_trustdb. (init_trustdb): Set that field. (revalidation_mark): Take care of a nonexistent trustdb file. (read_trust_options): Ditto. (tdb_get_ownertrust): Ditto. (tdb_get_min_ownertrust): Ditto. (tdb_update_ownertrust): Ditto. (update_min_ownertrust): Ditto. (tdb_clear_ownertrusts): Ditto. (tdb_cache_disabled_value): Ditto. (tdb_check_trustdb_stale): Ditto. (tdb_get_validity_core): Ditto. * g10/gpg.c (main): Do not create a trustdb with most commands for trust-model always. -- This slightly changes the semantics of most commands in that they won't create a trustdb if --trust-model=always is used. It just does not make sense to create a trustdb if there is no need for it. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 1a0eeaacd1bf09fe5125dbc3f56016bc20f3512e) Resolved conflicts: NEWS g10/trustdb.c: Manually apply changes due to changed function names. Note that this also includes the fix for clear_ownertrust, see GnuPG-bug-id: 1622.
* Make use of the *_NAME etc macros.Werner Koch2013-11-181-3/+3
| | | | | | | | | Replace hardwired strings at many places with new macros from config.h and use the new strusage macro replacement feature. * common/asshelp.c (lock_spawning) [W32]: Change the names of the spawn sentinels. * agent/command.c (cmd_import_key): Use asprintf to create the prompt.
* Change all quotes in strings and comments to the new GNU standard.Werner Koch2012-06-051-10/+10
| | | | | | | | | | | | | | | | | | | 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.
* Changes to --min-cert-level should cause a trustdb rebuild (issue 1366)David Shaw2012-01-201-6/+12
| | | | | | | | | | | | | | | | * g10/gpgv.c, g10/trustdb.c (read_trust_options): Add min_cert_level * g10/trustdb.c (check_trustdb_stale): Request a rebuild if pending_check_trustdb is true (set when we detect a trustdb parameter has changed). * g10/keylist.c (public_key_list): Use 'l' in the "tru" with-colons listing for min_cert_level not matching. * g10/tdbio.c (tdbio_update_version_record, create_version_record, tdbio_db_matches_options, tdbio_dump_record, tdbio_read_record, tdbio_write_record): Add a byte for min_cert_level in the tdbio version record.
* Add a flag parameter to dotlock_create.Werner Koch2011-09-281-3/+3
| | | | This allows us to extend this function in the future.
* Renamed the lock functions.Werner Koch2011-09-231-12/+12
| | | | Also cleaned up the dotlock code for easier readability.
* Do not print read-only trustdb warning with --quiet.Werner Koch2011-07-291-1/+1
| | | | | This is only a warning and gpg would anyway print an error message if it tries to write to the trustdb.
* Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch2011-02-041-4/+3
| | | | | | | | 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.
* Change last change. Does now work.Werner Koch2010-12-091-3/+18
|
* Change dirmngr timer under W32CE.Werner Koch2010-12-091-0/+17
| | | | | Fix trustdb open problem under W32CE.
* Use gpg_err_set_errno to assign values to ERRNO.Werner Koch2010-04-011-1/+1
|
* Fix bug#1162: error creating home directoryWerner Koch2009-12-151-1/+2
|
* s/DOTLOCK/dotlock_t/.Werner Koch2009-09-231-1/+1
| | | | | Add some stuff for g13.
* Print verbose instructions in case of a corrupted trustdb.Werner Koch2009-07-221-4/+3
|
* Fix !EROFS bug.Werner Koch2008-08-011-1/+2
| | | | | Doc updates
* Last minute cleanups.gnupg-2.0.9Werner Koch2008-03-261-6/+6
|
* W32 fix for trustdb creation.Werner Koch2008-01-301-3/+14
|
* Started to implement the audit log feature.Werner Koch2007-11-191-1/+1
| | | | | | | | Pass PINENTRY_USER_DATA and XAUTHORITY to Pinentry. Improved support for the quality bar. Minor internal restructuring. Translation fixes.
* Changed to GPLv3.Werner Koch2007-07-041-4/+2
| | | | | Removed intl/.
* Take advantage of newer gpg-error features.Werner Koch2006-09-141-6/+6
|
* Continued with merging.Werner Koch2006-04-191-3/+0
| | | | | Still does not build.
* Merged with gpg 1.4.3 code. Werner Koch2006-04-191-229/+96
| | | | | The gpg part does not yet build.
* * card-util.c (print_name): Fixed bad format string usage.Werner Koch2003-12-171-14/+17
| | | | | | | | | | | | | | | | | | (print_isoname): Ditto. * trustdb.c (check_regexp): s/exp/expr/. * keyedit.c (trustsig_prompt): Removed a "> 255" term; it is always false due to the data type. * passphrase.c (agent_get_passphrase): Use xasprintf and avoid non-literal format strings. * tdbio.c (upd_hashtable, drop_from_hashtable, lookup_hashtable): Fixed log_error format string bugs. Kudos to the now working gcc-3.3 -Wformat-nonliteral and Florian Weimer's investigations in gnupg 1.2.3.
* Merged most of David Shaw's changes in 1.3 since 2003-06-03.Werner Koch2003-09-231-0/+5
|
* Key generation and signing using the OpenPGP card does rudimentary work.Werner Koch2003-06-271-2/+3
|
* Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch2003-06-181-64/+67
| | | | | | | | | | | 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.
* This commit was manufactured by cvs2svn to create branchRepo Admin2003-06-051-0/+1624
| | | | 'GNUPG-1-9-BRANCH'.
* This commit was manufactured by cvs2svn to create branchRepo Admin2002-10-191-1578/+0
| | | | 'GNUPG-1-9-BRANCH'.
* * g10.c, options.h: Removed option --emulate-checksum-bug.Werner Koch2002-09-111-10/+14
| | | | | | | | | | | | | | | * misc.c (checksum_u16_nobug): Removed. (checksum_u16): Removed the bug emulation. (checksum_mpi): Ditto. (checksum_mpi_counted_nbits): Removed and replaced all calls with checksum_mpi. * parse-packet.c (read_protected_v3_mpi): New. (parse_key): Use it here to store it as an opaque MPI. * seckey-cert.c (do_check): Changed the v3 unprotection to the new why to store these keys. (protect_secret_key): Likewise. * build-packet.c (do_secret_key): And changed the writing.
* * tdbio.c (tdbio_set_dbname): Create new trustdbs with user-onlyDavid Shaw2002-08-081-0/+3
| | | | | permissions.
* * keyedit.c (menu_revsig): Properly show a uid is revoked withoutDavid Shaw2002-08-071-2/+0
| | | | | | | | | | | | | | | restarting gpg. This is Debian bug 124219, though their supplied patch will not do the right thing. * main.h, tdbio.c (tdbio_set_dbname), misc.c (removed check_permissions), keydb.c (keydb_add_resource), g10.c (main, check_permissions): Significant reworking of the permission check mechanism. The new behavior is to check everything in the homedir by checking the homedir itself. If the user wants to put (possibly shared) keyrings outside the homedir, they are not checked. The options file and any extension files are checked wherever they are, as well as their enclosing directories. This is Debian bug 147760.
* Update head to match stable 1.0David Shaw2002-06-291-554/+375
|
* See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner KochWerner Koch2000-07-141-17/+5
|
* See ChangeLog: Thu Jan 27 18:00:44 CET 2000 Werner KochWerner Koch2000-01-271-57/+57
|
* See ChangeLog: Mon Jan 24 13:04:28 CET 2000 Werner KochWerner Koch2000-01-241-7/+7
|
* See ChangeLog: Mon Sep 6 19:59:08 CEST 1999 Werner KochWerner Koch1999-09-061-4/+5
|
* See ChangeLog: Wed Jul 7 13:23:40 CEST 1999 Werner KochWerner Koch1999-07-071-2/+2
|
* See ChangeLog: Tue Jun 29 21:44:25 CEST 1999 Werner KochWerner Koch1999-06-291-8/+137
|
* See ChangeLog: Sat Jun 26 12:15:59 CEST 1999 Werner KochWerner Koch1999-06-261-1/+1
|
* See ChangeLog: Sun Apr 18 10:11:28 CEST 1999 Werner KochWerner Koch1999-04-181-2/+3
|
* See ChangeLog: Wed Mar 17 13:09:03 CET 1999 Werner KochWerner Koch1999-03-171-2/+5
|
* See ChangeLog: Thu Mar 11 16:39:46 CET 1999 Werner KochWerner Koch1999-03-111-11/+73
|
* See ChangeLog: Tue Feb 16 14:10:02 CET 1999 Werner KochWerner Koch1999-02-161-3/+4
|
* See ChangeLog: Sat Feb 13 14:13:04 CET 1999 Werner KochWerner Koch1999-02-131-0/+5
|
* See ChangeLog: Wed Feb 10 17:15:39 CET 1999 Werner KochWerner Koch1999-02-101-27/+51
|