From: Boltar on
Hi

Does anyone know why the getgrnam() and getgrgid() functions don't
populated the gr_mem array element of struct group under linux? Its
not a permissions issue since wven when the program is run as root the
array remains empty. Is this array defunct or simply unsupported under
Linux?

Thanks for any help

B2003
From: Michael Kerrisk on
On Tue, 15 Apr 2008 07:12:38 -0700 (PDT), Boltar
<boltar2003(a)yahoo.co.uk> wrote:

>Hi
>
>Does anyone know why the getgrnam() and getgrgid() functions don't
>populated the gr_mem array element of struct group under linux? Its
>not a permissions issue since wven when the program is run as root the
>array remains empty. Is this array defunct or simply unsupported under
>Linux?

They work for me. Sounds like there might be a bug in your code.
From: Boltar on
On Apr 15, 3:53 pm, Michael Kerrisk <michael.kerr...(a)gmail.com> wrote:
> They work for me. Sounds like there might be a bug in your code.

No , just a bug in my understanding. I assumed it cross checked /etc/
passwd to get the list of users primary groups, but it looks like it
just looks in /etc/group making it IMO pretty pointless.

B2003