int loginsuccess (User, Host, Tty, Msg)
char * User;
char * Host;
char * Tty;
char ** Msg;
Note: This subroutine is not thread-safe.
The loginsuccess
subroutine performs the processing necessary when a user successfully logs
into the system. This subroutine updates the following attributes in
the /etc/security/lastlog file for the specified user:
Additionally, a login success audit record is cut to indicate in the audit trail that this user has successfully logged in.
A message is returned in the Msg parameter that indicates the time, host, and port of the last successful and unsuccessful login. The number of unsuccessful login attempts since the last successful login is also provided to the user.
Access Control: The calling process must have access to the account information in the user database.
Mode | File |
---|---|
rw | /etc/security/lastlog |
Event | Information |
---|---|
USER_Login | username |
Upon successful completion, the loginsuccess subroutine returns a value of 0. Otherwise, a value of -1 is returned and the errno global value is set to indicate the error.
The loginsuccess
subroutine fails if one or more of the following values is true:
ENOENT | The specified user does not exist. |
EACCES | The current process does not have write access to the user database. |
EPERM | The current process does not have permission to write an audit record. |
This subroutine is part of Base Operating System (BOS) Runtime.
The authenticate (authenticate Subroutine) subroutine, getpcred (getpcred Subroutine) subroutine, getpenv (getpenv Subroutine) subroutine, loginfailed (loginfailed Subroutine) subroutine, loginrestrictions (loginrestrictions Subroutine) subroutine, setpcred subroutine, setpenv subroutine.
List of Security and Auditing Services in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.
Subroutines Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.