mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
pwquality: drop 'sym_' prefix from cleanup function
This also drops unnecessary symbols in header.
This commit is contained in:
@@ -25,6 +25,8 @@ DLSYM_PROTOTYPE(pwquality_read_config) = NULL;
|
||||
DLSYM_PROTOTYPE(pwquality_set_int_value) = NULL;
|
||||
DLSYM_PROTOTYPE(pwquality_strerror) = NULL;
|
||||
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(pwquality_settings_t*, sym_pwquality_free_settings, pwquality_free_settingsp, NULL);
|
||||
|
||||
static void pwq_maybe_disable_dictionary(pwquality_settings_t *pwq) {
|
||||
char buf[PWQ_MAX_ERROR_MESSAGE_LEN];
|
||||
const char *path;
|
||||
@@ -59,7 +61,7 @@ static void pwq_maybe_disable_dictionary(pwquality_settings_t *pwq) {
|
||||
}
|
||||
|
||||
static int pwq_allocate_context(pwquality_settings_t **ret) {
|
||||
_cleanup_(sym_pwquality_free_settingsp) pwquality_settings_t *pwq = NULL;
|
||||
_cleanup_(pwquality_free_settingsp) pwquality_settings_t *pwq = NULL;
|
||||
char buf[PWQ_MAX_ERROR_MESSAGE_LEN];
|
||||
void *auxerror;
|
||||
int r;
|
||||
@@ -86,7 +88,7 @@ static int pwq_allocate_context(pwquality_settings_t **ret) {
|
||||
}
|
||||
|
||||
int suggest_passwords(void) {
|
||||
_cleanup_(sym_pwquality_free_settingsp) pwquality_settings_t *pwq = NULL;
|
||||
_cleanup_(pwquality_free_settingsp) pwquality_settings_t *pwq = NULL;
|
||||
_cleanup_strv_free_erase_ char **suggestions = NULL;
|
||||
_cleanup_(erase_and_freep) char *joined = NULL;
|
||||
char buf[PWQ_MAX_ERROR_MESSAGE_LEN];
|
||||
@@ -119,7 +121,7 @@ int suggest_passwords(void) {
|
||||
}
|
||||
|
||||
int check_password_quality(const char *password, const char *old, const char *username, char **ret_error) {
|
||||
_cleanup_(sym_pwquality_free_settingsp) pwquality_settings_t *pwq = NULL;
|
||||
_cleanup_(pwquality_free_settingsp) pwquality_settings_t *pwq = NULL;
|
||||
char buf[PWQ_MAX_ERROR_MESSAGE_LEN];
|
||||
void *auxerror;
|
||||
int r;
|
||||
|
||||
@@ -6,22 +6,8 @@
|
||||
#if HAVE_PWQUALITY
|
||||
#include <pwquality.h>
|
||||
|
||||
#include "dlfcn-util.h"
|
||||
|
||||
extern DLSYM_PROTOTYPE(pwquality_check);
|
||||
extern DLSYM_PROTOTYPE(pwquality_default_settings);
|
||||
extern DLSYM_PROTOTYPE(pwquality_free_settings);
|
||||
extern DLSYM_PROTOTYPE(pwquality_generate);
|
||||
extern DLSYM_PROTOTYPE(pwquality_get_str_value);
|
||||
extern DLSYM_PROTOTYPE(pwquality_read_config);
|
||||
extern DLSYM_PROTOTYPE(pwquality_set_int_value);
|
||||
extern DLSYM_PROTOTYPE(pwquality_strerror);
|
||||
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(pwquality_settings_t*, sym_pwquality_free_settings, NULL);
|
||||
|
||||
int suggest_passwords(void);
|
||||
int check_password_quality(const char *password, const char *old, const char *username, char **ret_error);
|
||||
|
||||
#endif
|
||||
|
||||
int dlopen_pwquality(void);
|
||||
|
||||
Reference in New Issue
Block a user