Content-type: text/html
getluid, setluid - Get or set the login UID (Enhanced Security)
Security Library - libsecurity.a and libsecurity.so
#include <prot.h> uid_t getluid(); #include <prot.h> int setluid(uid);
The function gets the system's the login UID associated with the process. If it has not been set yet, return an error.
The function sets the system's login UID for this process and all its descendants. Once set, it cannot be reset.
The function returns the actual UID on success and a -1 for failure. The function returns 0 for success and -1 for failure.
Security
delim off