getluid(S) 6 January 1993 getluid(S) Name getluid - get login user ID Syntax cc . . . -lprot #include <sys/types.h> #include <sys/security.h> #include <sys/audit.h> #include <prot.h> int getluid () Description The getluid routine returns the login user ID for the process. The login user ID, or LUID, is set at login or batch start time; once set, it cannot be changed. The LUID, an accurate representation of the user who logged into the system, cannot be altered during the session. The LUID is needed because both the effective and real user IDs can be altered by use of setuid(S) or by setting the setuid bits on an execut- able file, and consequently, at times during a session, do not accurately reflect the login user. Return value Upon successful completion the LUID is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error. Diagnostics If the following condition occurs, getluid fails and errno is set to the corresponding value: [EPERM] 10 The login user ID has not yet been set for the process. See also getuid(S), setluid(S), setuid(S), stat(S) Standards conformance The getluid routine is an extension of AT&T System V provided by the Santa Cruz Operation.