#include "ask-password-api.h"
#include "cryptenroll-password.h"
#include "env-util.h"
+#include "errno-util.h"
#include "escape.h"
#include "memory-util.h"
#include "pwquality-util.h"
}
r = quality_check_password(new_password, NULL, &error);
- if (r < 0)
- return log_error_errno(r, "Failed to check password for quality: %m");
+ if (r < 0) {
+ if (ERRNO_IS_NOT_SUPPORTED(r))
+ log_warning("Password quality check is not supported, proceeding anyway.");
+ else
+ return log_error_errno(r, "Failed to check password quality: %m");
+ }
if (r == 0)
log_warning("Specified password does not pass quality checks (%s), proceeding anyway.", error);
#include "creds-util.h"
#include "dissect-image.h"
#include "env-file.h"
+#include "errno-util.h"
#include "fd-util.h"
#include "fileio.h"
#include "fs-util.h"
}
r = quality_check_password(*a, "root", &error);
- if (r < 0)
- return log_error_errno(r, "Failed to check quality of password: %m");
+ if (r < 0) {
+ if (ERRNO_IS_NOT_SUPPORTED(r))
+ log_warning("Password quality check is not supported, proceeding anyway.");
+ else
+ return log_error_errno(r, "Failed to check password quality: %m");
+ }
if (r == 0)
log_warning("Password is weak, accepting anyway: %s", error);
assert(password);
r = pwq_allocate_context(&pwq);
- if (r < 0) {
- if (ERRNO_IS_NOT_SUPPORTED(r))
- return 0;
+ if (r < 0)
return log_debug_errno(r, "Failed to allocate libpwquality context: %m");
- }
r = sym_pwquality_check(pwq, password, NULL, username, &auxerror);
if (r < 0) {