Home GnuPG
Diffusion GnuPG 09dc59f6d43f

common: Fix the "ignore" meta command in argparse.c

Description

common: Fix the "ignore" meta command in argparse.c

* src/argparse.c (gnupg_argparse): Factor some code out to ...
(prepare_arg_return): new.
(gnupg_argparse): No missing arg error in ignore sections.
* common/sysutils.c: Include pwd.h.
(gnupg_getusername): New.

Options in an [ignore] section do not anymore lead to an error if an
argument is missing. However, if the option is also in a force
section the error is thrown.

This is a port of the fix from libgpg-error. Also fixes the
username fixme.

Details

Provenance
wernerAuthored on Dec 21 2020, 5:23 PM
Parents
rG8a2e5025eb0f: gpg: Fix --trusted-key with fingerprint arg.
Branches
Unknown
Tags
Unknown