lib/system_smbd.c‏: call it only once with max

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon Jul 13 08:01:49 MDT 2009

On Mon, Jul 13, 2009 at 09:49:30AM -0400, Yannick Bergeron wrote:
> This is fixing an issue on AIX 5.3 and 6.1, the same issue
> reported a few years ago on this post:
> AIX seems to coredump when calling initgroups() or
> getgrset() twice. The stack trace show the behavior in
> getgrset_r()
> Please let me know if there is a purpose with the orignal code

The problem is that if we use plain groups_max, on Linux we
end up allocating space for 65536 groups, which can be a lot
of memory. We optimize for the common case where users are
in 32 groups or less.

I wonder why we call those functions twice, I thought AIX is
one of those Unixes that have the 16-groups per user
restriction. If you need to change this, can't you just
increase the '32' to the AIX NGROUPS limit, assuming that's
larger than 32?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url :

More information about the samba-technical mailing list