On Thu, Apr 17, 2014 at 03:09:47PM +0100, Philip Martin wrote:
> Stefan Sperling <s...@elego.de> writes:
> 
> > The 'pool' parmeter is unused.
> >
> >> +  struct group *grp;
> >> +  char **gmem;
> >> +
> >> +  if ((grp = getgrnam(group)) == NULL)
> >
> > It would be nice if APR offered an interface to this function.
> > I checked but couldn't find one.
> 
> APR has apr_gid_t, apr_gid_get(), apr_gid_name_get(), etc.  Could we use
> those?

I don't think we can.
I cannot find a function to determine whether a user is a member
of a given a group. APR uses getgrnam_r() internally but doesn't
expose the 'struct group' result it gets from getgrnam_r().

We could add a new function to APR which this patch could then make use of.
But until an APR version with such functionality is released we'll have
to call getgrnam_r() ourselves.

Reply via email to