}
private static void processPasswordChange( ChangePasswordContext changepwContext ) throws KerberosException
{
PrincipalStore store = changepwContext.getStore();
Authenticator authenticator = changepwContext.getAuthenticator();
String newPassword = changepwContext.getPassword();
KerberosPrincipal clientPrincipal = authenticator.getClientPrincipal();
// usec and seq-number must be present per MS but aren't in legacy kpasswd
// seq-number must have same value as authenticator
// ignore r-address
try
{
String principalName = store.changePassword( clientPrincipal, newPassword );
LOG.debug( "Successfully modified principal {}.", principalName );
}
catch ( NamingException ne )
{
throw new ChangePasswordException( ErrorType.KRB5_KPASSWD_SOFTERROR, ne.getExplanation().getBytes(), ne );