The ngroups variable in struct connection_struct is defined as size_t in include/smb.h
It's only usage is in smbd/service.c as the second parameter in a call:
however, the prototype of the get_current_groups function (smbd/sec_ctx.c) declares arg2 to be int *.
On some platforms (eg: OSF1) size_t is not an int (it's 8 bytes, not 4). This produces a compile warning. It may produce runtime errors.
Change include/smb.h to declare ngroups to be int.
Thanks for reporting but this is already fixed in the SAMBA_3_0 tree and will be in 3.0.23.