Home GnuPG
Diffusion GnuPG 8f844ae1cd16

common: Fix gnupg_reopen_std.

Description

common: Fix gnupg_reopen_std.

* common/sysutils.c (gnupg_reopen_std): Use fcntl instead of fstat.

Cherry-pick from master commit of:
50b02dba2060a8969da47b18d9c0ecdccbd30db4

When gpg was invoked by a Perl web application on FreeBSD, fstat in
gnupg_reopen_std failed with EBADF. Using fcntl, which is considered
lighter than fstat, it works fine. Since uur purpose is to check if
file descriptor is valid or not, lighter operation is better.

  • Reported-by: Marcin Gryszkalis <mg@fork.pl>
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Oct 2 2018, 7:22 AM
Parents
rGf5be5c9654d8: po: Update Japanese translation.
Branches
Unknown
Tags
Unknown