The examined environment variables are:
TTY/Telnet/SSH Logins:
LOGNAME - The login name of the user logging in. This is verified with security checks.
PPP/PPPoE Logins:
PPPD_PID - The PID of the PPPD process.
IFNAME - The pppX interface name.
Using a modern PPPD will automatically set the PPPD_PID and IFNAME environment variables.
Using bash as the shell will set the LOGNAME environment variable.
Security Information:
When PPP and PPPoE logins are done, the environment variables PPPD_PID and IFNAME are taken on face value and are not checked. However, what is checked is that the user who ran acua_login was the root user. So, to do a PPP or PPPoE login, acua_login needs to be run as root, and pppd will do this out of the box.
When Local/Telnet/SSH logins are done, the login name in the LOGNAME environment variable is checked by making sure that the /dev file for the terminal the user is using is owned by the user in LOGNAME. The tty the user is using is determined by the result of the ttyname() function. Another check that is done is that the UID of the person running acua_login matches the UID value of the LOGNAME environment variable. In the case that the LOGNAME environment variable does not exist or contains invalid data, the login will be rejected.
All environment variables that acua_login reads are also checked for conditions such as someone attempting to exploit buffer overflows within acua_login.