protected boolean authenticate ( String name , char [ ] password ) throws LoginException { try { if ( ( name == null ) || ( password == null ) ) { debug ( "user or pass is null" ) ; return false ; } debug ( "PAM authentication trying (" + serviceName + ") for: " + name ) ; UnixUser authenticate = new PAM ( serviceName ) . authenticate ( name , new String ( password ) ) ; debug ( "PAM authentication succeeded for: " + name ) ; this . unixUser = authenticate ; return true ; } catch ( PAMException e ) { debug ( e . getMessage ( ) ) ; if ( isDebug ( ) ) { e . printStackTrace ( ) ; } return false ; } }
Authenticates using PAM