From 18e5dd7b03ced51611c9ba1345cf498a0aaf14a6 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 20 Oct 2020 16:38:06 +0200 Subject: Replace all calls to stat by gnupg_stat. * common/sysutils.c (gnupg_stat): New. * common/sysutils.h: Include sys/stat.h. -- Yet another wrapper for Unicode support on Windows. GnuPG-bug-id: 5098 Signed-off-by: Werner Koch --- g10/misc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'g10/misc.c') diff --git a/g10/misc.c b/g10/misc.c index 6d3b047e8..111a916e8 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -103,7 +103,7 @@ register_secured_file (const char *fname) struct secured_file_item *sf; /* Note that we stop immediately if something goes wrong here. */ - if (stat (fname, &buf)) + if (gnupg_stat (fname, &buf)) log_fatal (_("fstat of '%s' failed in %s: %s\n"), fname, "register_secured_file", strerror (errno)); /* log_debug ("registering '%s' i=%lu.%lu\n", fname, */ @@ -132,7 +132,7 @@ unregister_secured_file (const char *fname) struct stat buf; struct secured_file_item *sf, *sfprev; - if (stat (fname, &buf)) + if (gnupg_stat (fname, &buf)) { log_error (_("fstat of '%s' failed in %s: %s\n"), fname, "unregister_secured_file", strerror (errno)); @@ -206,7 +206,7 @@ is_secured_filename (const char *fname) /* Note that we print out a error here and claim that a file is secure if something went wrong. */ - if (stat (fname, &buf)) + if (gnupg_stat (fname, &buf)) { if (errno == ENOENT || errno == EPERM || errno == EACCES) return 0; -- cgit v1.2.3