Then it parses the remaining -h commandline flag, checks that /etc/gshadow is present & can be opened under a lock, & linear-scans that file to find the entry to overwrite setting the password.
After init'ing i18n logout might fork if the debug flag is set, initializes logging & LibShadow, & repeatedly iterates over the utmp[x] file checking if they're allowed to be logged in at this time. If not it forks, sends a message to their terminal, killing their process, & syslogging.