The setregid callable service sets the real or effective GIDs for the calling process to the values that are specified by the input real and effective GID values. If a specified value is equal to -1, the corresponding real or effective GID of the calling process is left unchanged.
Operation | Environment |
---|---|
Authorization: | Supervisor or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1SRG): | 31-bit |
AMODE (BPX4SRG): | 64-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4SRG with the same parameters.
The name of a fullword that contains the real GID to be set for the calling process. If RGID is -1, the real GID for the calling process is left unchanged.
The name of a fullword that contains the effective GID to be set for the calling process. If EGID is -1, the effective GID for the calling process is left unchanged.
The name of a fullword in which the setregid service returns -1 if it is not successful. If it is successful, the setregid service returns 0.
Return_code | Explanation |
---|---|
EINVAL | The value of RGID or EGID is not valid. |
EPERM | The process does not have appropriate privileges to set the real GID or the effective GID. Refer to Authorization for information on appropriate privileges. |
EMVSSAF2ERR | The SAF call IRRSSG00 incurred an error. |
RACF return code | RACF reason code | Explanation |
---|---|---|
8 | 12 | Internal error during RACF processing |
8 | 16 | Unable to establish recovery |
RACF return code | RACF reason code | Explanation |
---|---|---|
8 | 12 | Internal error during RACF processing |
For an example using this callable service, see BPX1SRG (setregid) example.