|
|
MPE/iX Developer's Kit Reference Manual Volume I: HP 3000 MPE/iX Computer Systems > Chapter 4
POSIX/iX Library Function Descriptions
setuid |
|
Sets user IDs. Upon successful completion, a value of zero is returned. If unsuccessful, a value of -1 is returned and errno is set to indicate the error. If {_POSIX_SAVED_IDS} is defined: If the process has appropriate privileges, the setuid() function sets the real user ID, effective user ID, and the saved set-user-ID to uid. If the process does not have appropriate privileges, but uid is equal to the real user ID or the saved set-user-ID , the setuid() function sets the effective user ID to uid; the real user ID and saved set-user-ID remain unchanged by this functioncall. Otherwise: If the process has appropriate privileges, the setuid() function sets the real user ID and effective user ID to uid. If the process does not have appropriate privileges, but uid is equal to the real user ID, the setuid() function sets the effective user ID to uid; the real user ID remains unchanged by this function call. If the process does not have appropriate privileges, but gid is equal to the real group ID, the setgid() functionsets the effective group ID to gid; the real group ID remains unchanged by this function call. If any of the following conditions occur, the setuid() function shall return -1 and set errno to the corresponding value:
If any of the following conditions occur, the setgid() function shall return -1 and set errno to the corresponding value:
|
|