Ignore machine-check MSRs
[freebsd-src/fkvm-freebsd.git] / contrib / pam_modules / pam_passwdqc / pam_macros.h
blobadc04bcb1f770364c83d0c613b967349fdfe717a
1 /*
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
4 * domain.
5 */
7 #if !defined(_PAM_MACROS_H) && !defined(_pam_overwrite)
8 #define _PAM_MACROS_H
10 #include <string.h>
11 #include <stdlib.h>
13 #define _pam_overwrite(x) \
14 memset((x), 0, strlen((x)))
16 #define _pam_drop_reply(/* struct pam_response * */ reply, /* int */ replies) \
17 do { \
18 int i; \
20 for (i = 0; i < (replies); i++) \
21 if ((reply)[i].resp) { \
22 _pam_overwrite((reply)[i].resp); \
23 free((reply)[i].resp); \
24 } \
25 if ((reply)) free((reply)); \
26 } while (0)
28 #endif