|
|
HP-UX Reference > Ssetregid(2)HP-UX 11i Version 2: December 2007 Update |
|
NAMEsetregid() — sets the real and effective group IDs DESCRIPTIONsetregid() sets the real and effective group IDs of the calling process. Only a privileged process can set the real group ID and/or the effective group ID to any valid value. A non-privileged process can set the real group ID to the saved set-group-ID from one of the exec family of functions, or the effective group ID to either the saved set-group-ID or the real group ID. Any supplementary group IDs of the calling process remain unchanged. Argument rgid is the read group ID value to be set with. If rgid is set to -1, the real group ID is not be changed. Argument egid is the effective group ID value to be set with. If egid is set to -1, the effective group ID is not changed. The real and effective group IDs can be set to different values in the same call. Security RestrictionsSome or all of the actions associated with this system call require the PRIV_CHSUBJIDENT privilege (CHSUBJIDENT). Processes owned by the superuser will have this privilege. Processes owned by other users can have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUEUpon successful completion errno is set 0. Otherwise, errno is set to indicate the type of error and neither group IDs are changed. ERRORSsetregid() fails if any of the following conditions are encountered:
|
|