diff options
author | Philip Withnall <withnall@endlessm.com> | 2019-06-11 13:52:48 +0100 |
---|---|---|
committer | Philip Withnall <withnall@endlessm.com> | 2019-11-26 12:17:04 +0000 |
commit | 94a800fb9d30705625c96b01dfeca9af82a0961a (patch) | |
tree | e417ab38fb28c1da46fe87c3e3286651ddccc844 /glib/glib-unix.h | |
parent | ae49ff0903030148764d05e96e0f46b9c57ef7b5 (diff) | |
download | glib-94a800fb9d30705625c96b01dfeca9af82a0961a.tar.gz |
glib-unix: Add g_unix_get_passwd_entry() function
This is a convenience wrapper around getpwnam_r() which handles all the
memory allocation faff.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Helps: #1687
Diffstat (limited to 'glib/glib-unix.h')
-rw-r--r-- | glib/glib-unix.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/glib/glib-unix.h b/glib/glib-unix.h index ef8702d79..a5ea9a1c5 100644 --- a/glib/glib-unix.h +++ b/glib/glib-unix.h @@ -114,6 +114,10 @@ guint g_unix_fd_add (gint fd, GUnixFDSourceFunc function, gpointer user_data); +GLIB_AVAILABLE_IN_2_64 +struct passwd *g_unix_get_passwd_entry (const gchar *user_name, + GError **error); + G_END_DECLS #endif /* __G_UNIX_H__ */ |