#include <qsysetid.h> int qsysetuid(uid_t uid);Service Program Name: QSYSETIDS
If the thread has *ALLOBJ special authority, qsysetuid() sets the real, effective, and saved user ID to uid.
If the thread does not have *ALLOBJ special authority, but uid is equal to the real, effective or saved user ID, qsysetuid() sets the effective user ID to uid. The real and saved user IDs remain unchanged.
Job scoped locks with a lock state of *SHRRD are held on the user profiles associated with the real user ID, effective user ID, saved user ID, real group ID, effective group ID, saved group ID, and all of the supplemental groups.
This field must contain one of the following values:
If qsysetuid() is not successful, errno indicates one of the following errors.
Error condition | Additional information |
---|---|
[EAGAIN] |
User profile associated with the uid is locked. Try again. |
[EDAMAGE] |
The user profile associated with the uid or an internal system object is damaged. |
[EINVAL] |
The value of the gid argument is not valid. Following are possible reasons:
|
[ENOTSUP] |
Operation not supported. The user profile associated with this uid specifies OWNER(*GRPPRF), but the user profile's first group is not the current effective group, nor is it in the list of supplemental groups. |
[EPERM] |
Operation not permitted. The thread does not have *ALLOBJ special authority and uid is not the same as the real, effective or saved user ID. |
[EUNKNOWN] |
An unknown error has occurred. Check the joblog for error messages. |
Top | UNIX-Type APIs | APIs by category |