Home GnuPG

core: Implement meta command [user] for the arg parser.

Description

core: Implement meta command [user] for the arg parser.

* src/sysutils.c (_gpgrt_getusername): New.
* src/argparse.c (struct _gpgrt_argparse_internal_s): New flags user_*
and store the current user.
(initialize): Free new malloced field.  Clear new flags.
(handle_meta_user): Implement.
(handle_metacmd): Implement user sections.  Remove "group" meta
command.
(_gpgrt_argparse): Implement user sections.
(finish_read_sys): Reset new vars.

Implementing group would be somewhat complicated and it is doubtful
whether this really makes sense and is manageable for the admin.

Note that we have not yet implemented this for Windows.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Apr 3 2020, 9:27 PM
Parents
rE85b5006d01fc: core: Tweak the printing of headers in the --help output.
Branches
Unknown
Tags
Unknown