Other Alias
setloginclassLIBRARY
Lb libcSYNOPSIS
In unistd.h Ft int Fn getloginclass char *name size_t len Ft int Fn setloginclass const char *nameDESCRIPTION
The Fn getloginclass routine returns the login class name associated with the calling process, as previously set by Fn setloginclass . The caller must provide the buffer Fa name with length Fa len bytes to hold the result. The buffer should be at least MAXLOGNAME bytes in length.The Fn setloginclass system call sets the login class of the calling process to Fa name . This system call is restricted to the super-user, and is normally used only when a new session is being created on behalf of the named user (for example, at login time, or when a remote shell is invoked). Processes inherit login class from their parents.
RETURN VALUES
Rv -stdERRORS
The following errors may be returned by these calls:- Bq Er EFAULT
- The Fa name argument gave an invalid address.
- Bq Er EINVAL
- The Fa name argument pointed to a string that was too long. Login class names are limited to MAXLOGNAME (from In sys/param.h ) characters, currently 17 including null.
- Bq Er EPERM
- The caller tried to set the login class and was not the super-user.
- Bq Er ENAMETOOLONG
- The size of the buffer is smaller than the result to be returned.
HISTORY
The Fn getloginclass and Fn setloginclass system calls first appeared in Fx 9.0 .