Group Membership Expansion: Guidelines for Deployment
7
Use NGROUPS_MAX compile-time constant (only when portability is required)
A program that must run on any instance of HP-UX, even one without the group membership
expansion enhancement, must be designed such that it does not rely on the ability to associate more
than 20 supplementary groups with a given user or process.
Incorrect handling of supplementary group ID lists
This section describes how some programs’ built-in assumptions about supplementary group ID limits
can prevent them from working with expanded groups.
Use of NGROUPS compile-time constant
The NGROUPS compile-time constant is obsolete and should never be used.
Use of NGROUPS_MAX compile-time constant when retrieving supplementary group IDs
A process may have more supplementary group IDs associated with it than are specified by the
compile-time constant NGROUPS_MAX. The NGROUPS_MAX compile-time constant should not be used
to size storage to be filled in by the getgroups(2) system call, or as the iteration limit when
searching the array of supplementary group IDs filled in by the getgroups(2) system call.
Use of NGROUPS_MAX compile-time constant when setting supplementary group IDs
Privileged applications setting the list of supplementary group IDs with setgroups(2) must not use
NGROUPS_MAX to limit the number of supplementary group IDs they set.
For more information
For additional information see the following HP-UX man pages: getgroups(2), setgroups(2),
initgroups(3), ngroups_max(5), limits(5).
To help us improve our documents, please provide feedback at: www.hp.com/solutions/feedback
Technology for better business outcomes
© Copyright 2008 Hewlett-Packard Development Company, L.P. The information
contained herein is subject to change without notice. The only warranties for HP
products and services are set forth in the express warranty statements
accompanying such products and services. Nothing herein should be construed as
constituting an additional warranty. HP shall not be liable for technical or editorial
errors or omissions contained herein.
UNIX is a registered trademark of The Open Group.
4AA2-1738ENW, August 2008