
Save hostname in a permanent buffer, otherwise ruserok() can trash it if it calls gethostbyname() or inet_ntoa(). Repeat by: Add entries in .rhosts and login from a machine that does not have an entry there. Notice that the error message in syslog contains the last hostname in .rhosts and not the original remote hostname.