1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

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.
This commit is contained in:
Werner Koch 2020-12-21 17:23:52 +01:00
parent 8a2e5025eb
commit 09dc59f6d4
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 123 additions and 37 deletions

View file

@ -98,6 +98,7 @@ gnupg_dirent_t gnupg_readdir (gnupg_dir_t gdir);
int gnupg_closedir (gnupg_dir_t gdir);
char *gnupg_get_socket_name (int fd);
int gnupg_fd_valid (int fd);
char *gnupg_getusername (void);
gpg_error_t gnupg_inotify_watch_delete_self (int *r_fd, const char *fname);
gpg_error_t gnupg_inotify_watch_socket (int *r_fd, const char *socket_name);