summaryrefslogtreecommitdiff
path: root/src/gpgrt-int.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-04-03 21:27:05 +0200
committerWerner Koch <wk@gnupg.org>2020-04-03 21:27:05 +0200
commitd843d260f5502ba90a2a35dfe202439f32b0e9aa (patch)
treeb5d04f75886c8c883aaef63746e03bbbed69ced0 /src/gpgrt-int.h
parent85b5006d01fc64763a6e1f0d6cbda91c5cb709c1 (diff)
downloadlibgpg-error-d843d260f5502ba90a2a35dfe202439f32b0e9aa.tar.gz
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>
Diffstat (limited to 'src/gpgrt-int.h')
-rw-r--r--src/gpgrt-int.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpgrt-int.h b/src/gpgrt-int.h
index cc22004..629f527 100644
--- a/src/gpgrt-int.h
+++ b/src/gpgrt-int.h
@@ -795,6 +795,9 @@ char *_gpgrt_getcwd (void);
/* Return the home directory of user NAME. */
char *_gpgrt_getpwdir (const char *name);
+/* Return the account name of the current user. */
+char *_gpgrt_getusername (void);
+
/* Expand and concat file name parts. */
char *_gpgrt_vfnameconcat (int want_abs, const char *first_part,
va_list arg_ptr);