Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

PXFSETUID

POSIX Subroutine: Sets the effective user ID of the current process. This routine is only available for Linux and macOS.

Module

USE IFPOSIX

CALL PXFSETUID (iuid,ierror)

iuid

(Output) INTEGER(4). The session ID.

ierror

(Output) INTEGER(4). The user status.

If successful, ierror is set to zero; otherwise, an error code.

If the effective user ID of the caller is root, the real and saved user ID's are also set. This feature allows a program other than root to drop all of its user privileges, do some un-privileged work, and then re-engage the original effective user ID in a secure manner.

CAUTION:

If the user is root then special care must be taken. PXFSETUID checks the effective uid of the caller. If it is the superuser, all process-related user ID's are set to uid. After this has occurred, it is impossible for the program to regain root privileges.

See Also