Table of Contents

NAME

SYNOPSIS

DESCRIPTION

The function sets the real and effective user IDs and the saved set-user-ID of the current process to the specified value. The function is permitted if the specified ID is equal to the real user ID of the process, or if the effective user ID is that of the super user. The function sets the real and effective group IDs and the saved set-group-ID of the current process to the specified value. The function is permitted if the specified ID is equal to the real group ID of the process, or if the effective user ID is that of the super user. The function sets the effective user ID (group ID) of the current process. The effective user ID may be set to the value of the real user ID or the saved set-user-ID (see and in this way, the effective user ID of a set-user-ID executable may be toggled by switching to the real user ID, then re-enabled by reverting to the set-user-ID value. Similarly, the effective group ID may be set to the value of the real group ID or the saved set-user-ID.

RETURN VALUES

Upon success, these functions return 0; otherwise -1 is returned. If the user is not the super user, or the uid specified is not the real, effective ID, or saved ID, these functions return -1.

SEE ALSO

STANDARDS

The and functions are compliant with the specification with not defined. The and functions are extensions based on the concept of and have been proposed for a future revision of the standard.


Table of Contents