GETLUID(S) UNIX System V GETLUID(S)
Name
getluid - get login user ID
Syntax
#include <sys/types.h>
#include <sys/security.h>
#include <sys/audit.h>
#include <prot.h>
int getluid ()
Description
Getluid returns the login UID for the process.
The login UID, or LUID, is set at login or batch start time
and once set cannot change. The LUID is an accurate
representation of the user who logged into the system and
cannot be altered during the session. The LUID is needed
because both the effective and real UIDs can be altered by
use of setuid(S) and the setuid bits on an executable file,
and at times during a session, will not accurately reflect
the login user.
Getluid will fail if the following is true:
[EPERM] The login UID has not yet been set for the
process.
RETURN VALUE
Upon successful completion the LUID is returned. Otherwise,
a value of -1 is returned and errno is set to indicate the
error.
See Also
setluid(S), getuid(S), setuid(S), stat(S)
Value Added
getluid is an extension of AT&T System V provided by the
Santa Cruz Operation.
(printed 6/20/89)