Visible to Intel only — GUID: GUID-516F8B03-949C-4178-ABB2-6596A778168B
Visible to Intel only — GUID: GUID-516F8B03-949C-4178-ABB2-6596A778168B
PXFSETGID
POSIX Subroutine: Sets the effective group ID of the current process. This routine is only available for Linux.
Module
USE IFPOSIX
CALL PXFSETGID (igid,ierror)
igid |
(Input) INTEGER(4). The group ID. |
ierror |
(Output) INTEGER(4). The error status. If successful, ierror is set to zero; otherwise, an error code. If the caller is the superuser, the real and saved group ID's are also set. This feature allows a program other than root to drop all of its group privileges, do some un-privileged work, and then re-engage the original effective group ID in a secure manner. |
If the user is root then special care must be taken. PXFSETGID checks the effective gid of the caller. If it is the superuser, all process-related group ID's are set to gid. After this has occurred, it is impossible for the program to regain root privileges.