The method_passwdrestrictions Interface

int method_passwdrestrictions (void *handlep, char *user, char *newpassword, char *oldpassword, char **message);

The handlep parameter is a handle to the load module opened with the method_open interface. The user parameter points to the requested user. The newpassword parameter points to the user's new password. The oldpassword parameter points to the user's current password. The message parameter points to a character pointer. It will be set to a message which is output to the user.

method_passwdrestrictions determines if new password meets the system requirements. This method distinguishes between conditions which allow the user to change their password by selecting a different password and those which prevent the user from changing their password at the present time. A message is returned which provides more information to the user.

method_passwdrestrictions is called as a result of calling the security library subroutine passwdrestrictions.

method_passwdrestrictions returns a value of 0 when newpassword meets all of the requirements, 1 when the password does not meet one or more requirements and 2 when the password may not be changed. A value of -1 is returned when an error has occurred, such as the user does not exist.