77#include "log.h"
88#include "macro.h"
99#include "memory-util.h"
10- #include "pwquality -util.h"
10+ #include "password-quality -util.h"
1111#include "strv.h"
1212
1313#if HAVE_PWQUALITY
@@ -36,7 +36,7 @@ int dlopen_pwquality(void) {
3636 DLSYM_ARG (pwquality_strerror ));
3737}
3838
39- void pwq_maybe_disable_dictionary (pwquality_settings_t * pwq ) {
39+ static void pwq_maybe_disable_dictionary (pwquality_settings_t * pwq ) {
4040 char buf [PWQ_MAX_ERROR_MESSAGE_LEN ];
4141 const char * path ;
4242 int r ;
@@ -69,7 +69,7 @@ void pwq_maybe_disable_dictionary(pwquality_settings_t *pwq) {
6969 sym_pwquality_strerror (buf , sizeof (buf ), r , NULL ));
7070}
7171
72- int pwq_allocate_context (pwquality_settings_t * * ret ) {
72+ static int pwq_allocate_context (pwquality_settings_t * * ret ) {
7373 _cleanup_ (sym_pwquality_free_settingsp ) pwquality_settings_t * pwq = NULL ;
7474 char buf [PWQ_MAX_ERROR_MESSAGE_LEN ];
7575 void * auxerror ;
@@ -96,8 +96,6 @@ int pwq_allocate_context(pwquality_settings_t **ret) {
9696 return 0 ;
9797}
9898
99- #define N_SUGGESTIONS 6
100-
10199int suggest_passwords (void ) {
102100 _cleanup_ (sym_pwquality_free_settingsp ) pwquality_settings_t * pwq = NULL ;
103101 _cleanup_strv_free_erase_ char * * suggestions = NULL ;
@@ -132,7 +130,7 @@ int suggest_passwords(void) {
132130 return 1 ;
133131}
134132
135- int quality_check_password (const char * password , const char * old , const char * username , char * * ret_error ) {
133+ int check_password_quality (const char * password , const char * old , const char * username , char * * ret_error ) {
136134 _cleanup_ (sym_pwquality_free_settingsp ) pwquality_settings_t * pwq = NULL ;
137135 char buf [PWQ_MAX_ERROR_MESSAGE_LEN ];
138136 void * auxerror ;
@@ -146,7 +144,6 @@ int quality_check_password(const char *password, const char *old, const char *us
146144
147145 r = sym_pwquality_check (pwq , password , old , username , & auxerror );
148146 if (r < 0 ) {
149-
150147 if (ret_error ) {
151148 _cleanup_free_ char * e = NULL ;
152149
0 commit comments