Lock out authentication if the account has been locked by pw(8).
In account management, verify whether the account has been locked
with `pw lock', so that it's impossible to log into a locked account
using an alternative authentication mechanism, such as an ssh key.
This change affects only accounts locked with pw(8), i.e., having a
`*LOCKED*' prefix in their password hash field, so people still can
use a different pattern to disable password authentication only.
Also, clean out some (void) casts and use libypclnt.
Obtained-from: FreeBSD