|
|
HP-UX Reference > Ggetauduser(3)HP-UX 11i Version 2: December 2007 Update |
|
NAMEgetauduser — retrieve the accountable user for the current process DESCRIPTIONgetauduser() retrieves the accountable user for the current process and saves the information into the buffer pointed to by user. It also retrieves the time of authentication and saves it into the buffer pointed to by stime, if the information is available. Caller must set usize and tsize to the size of the user and the stime buffers. Note that the two buffers are always null terminated, even if it results in loss of some data. Programs using this routine must be compiled with -lsec. Security RestrictionsThis call requires the user be superuser or possess SELFAUDIT privilege. See privileges(5) for details. RETURN VALUEgetauduser() returns the following values:
ERRORSIf getauduser fails, errno is set to one of the following values:
EXAMPLESchar user[256], time[MAX_TIME_LEN+1]; int n; if ((n=getauduser(user, time, sizeof(user), sizeof(time))) == -1) { non_overflow_errors(); } else if (n >= sizeof(user)) { overflow_error(); } |
|