2 * These macros are partially based on Linux-PAM's <security/_pam_macros.h>,
3 * which were organized by Cristian Gafton and I believe are in the public
9 #ifndef PAM_PASSWDQC_MACROS_H__
10 #define PAM_PASSWDQC_MACROS_H__
16 pwqc_overwrite_string(char *x
)
19 memset(x
, 0, strlen(x
));
23 pwqc_drop_mem(void *x
)
32 pwqc_drop_pam_reply(struct pam_response
*reply
, int replies
)
37 for (reply_i
= 0; reply_i
< replies
; ++reply_i
) {
38 pwqc_overwrite_string(reply
[reply_i
].resp
);
39 pwqc_drop_mem(reply
[reply_i
].resp
);
45 #endif /* PAM_PASSWDQC_MACROS_H__ */