2 * Copyright (c) 2000-2002,2016,2019,2020,2021 by Solar Designer
3 * Copyright (c) 2008,2009 by Dmitry V. Levin
19 /* Partial struct passwd just to accommodate passwdqc code's expectations */
38 } passwdqc_params_qc_t
;
43 } passwdqc_params_pam_t
;
46 passwdqc_params_qc_t qc
;
47 passwdqc_params_pam_t pam
;
50 extern const char *passwdqc_check(const passwdqc_params_qc_t
*params
,
51 const char *newpass
, const char *oldpass
, const struct passwd
*pw
);
52 extern char *passwdqc_random(const passwdqc_params_qc_t
*params
);
54 extern int passwdqc_params_parse(passwdqc_params_t
*params
,
55 char **reason
, int argc
, const char *const *argv
);
56 extern int passwdqc_params_load(passwdqc_params_t
*params
,
57 char **reason
, const char *pathname
);
58 extern void passwdqc_params_reset(passwdqc_params_t
*params
);
59 extern void passwdqc_params_free(passwdqc_params_t
*params
);
61 #define F_ENFORCE_MASK 0x00000003
62 #define F_ENFORCE_USERS 0x00000001
63 #define F_ENFORCE_ROOT 0x00000002
64 #define F_ENFORCE_EVERYONE F_ENFORCE_MASK
65 #define F_NON_UNIX 0x00000004
66 #define F_ASK_OLDAUTHTOK_MASK 0x00000030
67 #define F_ASK_OLDAUTHTOK_PRELIM 0x00000010
68 #define F_ASK_OLDAUTHTOK_UPDATE 0x00000020
69 #define F_CHECK_OLDAUTHTOK 0x00000040
70 #define F_USE_FIRST_PASS 0x00000100
71 #define F_USE_AUTHTOK 0x00000200
72 #define F_NO_AUDIT 0x00000400
74 #define PASSWDQC_VERSION "2.0.2"
76 extern void (*_passwdqc_memzero
)(void *, size_t);
82 #endif /* PASSWDQC_H__ */