- /* Check the password against CDB, CrackLib, and SQLite if configured. */
- code = strength_check_cracklib(ctx, data, password);
- if (code != 0)
+ if (data->cracklib_maxlen == 0 ||
+ ((long) strlen(password) <= data->cracklib_maxlen)) {
+
+ /* Check the password against CDB, CrackLib, and SQLite if configured. */
+ code = strength_check_cracklib(ctx, data, password);
+ if (code != 0)