From 96116b7321dbc6e9b42b1f1ceae08f527aa182f6 Mon Sep 17 00:00:00 2001 From: Basile Desloges <basile.desloges@cea.fr> Date: Wed, 18 Sep 2024 15:47:33 +0200 Subject: [PATCH] [libc] Add getgrouplist --- share/libc/grp.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/share/libc/grp.h b/share/libc/grp.h index 992c70577f4..0744a011489 100644 --- a/share/libc/grp.h +++ b/share/libc/grp.h @@ -47,6 +47,14 @@ extern void setgrent(void); /* BSD function */ extern int initgroups (const char *user, gid_t group); +/*@ + // missing: ... \from groups database + assigns \result \from indirect:user[0..], indirect:group, indirect:*ngroups; + assigns groups[0 .. \old(*ngroups) - 1], *ngroups + \from indirect:user[0..], group, *ngroups; +*/ +extern int getgrouplist(const char *user, gid_t group, + gid_t *groups, int *ngroups); __END_DECLS -- GitLab