#include <qsysetids.h> int qsysetregid(gid_t rgid, gid_t egid);Service Program Name: QSYSETIDS
The qsysetregid() function is used to set the real and effective group IDs. The real and effective group IDs may be set to different values in the same call.
A thread with *ALLOBJ special authority can set the real group ID and the effective group ID to any valid value.
A thread without *ALLOBJ special authority can only set the real group ID to the saved group ID. A thread without *ALLOBJ special authority can only set the effective group ID to the saved group ID or the real group ID.
Any supplemental group IDs remain unchanged.
Job scoped locks with a lock state of *SHRRD are held on the user profiles associated with the real user ID, effective user ID, saved user ID, real group ID, effective group ID, saved group ID, and all of the supplemental groups.
This field must contain one of the following values:
This field must contain one of the following values:
If qsysetregid() is not successful, errno indicates one of the following errors.
Error condition | Additional information |
---|---|
[EAGAIN] |
User profile associated with the rgid or rgid is locked. Try again. |
[EDAMAGE] |
The user profile associated with one of the GIDs or an internal system object is damaged. |
[EINVAL] |
The value of the gid argument is not valid. Following are possible reasons:
|
[ENOTSUP] |
Operation not supported. The current effective user profile specifies OWNER(*GRPPRF), but the group profile associated with this gid is not equal to the user profile's first group and the user's first group is not in the list of supplemental groups. |
[EPERM] |
Operation not permitted. Following are possible reasons:
|
[EUNKNOWN] |
An unknown error has occurred. Check the joblog for error messages. |
Top | UNIX-Type APIs | APIs by category |