diff options
Diffstat (limited to 'g10')
-rw-r--r-- | g10/keydb.c | 4 | ||||
-rw-r--r-- | g10/migrate.c | 4 | ||||
-rw-r--r-- | g10/tdbio.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/g10/keydb.c b/g10/keydb.c index 934002498..7b411dbfe 100644 --- a/g10/keydb.c +++ b/g10/keydb.c @@ -444,13 +444,13 @@ maybe_create_keyring_or_box (char *filename, int is_box, int force_create) that the detection magic will work the next time it is used. */ if (is_box) { - FILE *fp = fopen (filename, "wb"); + estream_t fp = es_fopen (filename, "wb"); if (!fp) rc = gpg_error_from_syserror (); else { rc = _keybox_write_header_blob (fp, 1); - fclose (fp); + es_fclose (fp); } if (rc) { diff --git a/g10/migrate.c b/g10/migrate.c index 9045ae66e..38fb7bd68 100644 --- a/g10/migrate.c +++ b/g10/migrate.c @@ -99,8 +99,8 @@ migrate_secring (ctrl_t ctrl) log_info ("porting secret keys from '%s' to gpg-agent\n", secring); if (!import_old_secring (ctrl, secring)) { - FILE *fp = fopen (flagfile, "w"); - if (!fp || fclose (fp)) + estream_t fp = es_fopen (flagfile, "w"); + if (!fp || es_fclose (fp)) log_error ("error creating flag file '%s': %s\n", flagfile, gpg_strerror (gpg_error_from_syserror ())); else diff --git a/g10/tdbio.c b/g10/tdbio.c index 9c77bc4b2..947dbb36d 100644 --- a/g10/tdbio.c +++ b/g10/tdbio.c @@ -725,7 +725,7 @@ tdbio_set_dbname (ctrl_t ctrl, const char *new_dbname, || stat (fname, &statbuf) || statbuf.st_size == 0) { - FILE *fp; + estream_t fp; TRUSTREC rec; int rc; mode_t oldmask; @@ -747,11 +747,11 @@ tdbio_set_dbname (ctrl_t ctrl, const char *new_dbname, gpg_err_set_errno (EPERM); } else - fp = fopen (fname, "wb"); + fp = es_fopen (fname, "wb"); umask(oldmask); if (!fp) log_fatal (_("can't create '%s': %s\n"), fname, strerror (errno)); - fclose (fp); + es_fclose (fp); db_fd = open (db_name, O_RDWR | MY_O_BINARY); if (db_fd == -1) |