mirror of
git://git.gnu.org.ua/pam-modules.git
synced 2025-04-28 01:19:53 +03:00
Include <common.c>
git-svn-id: file:///svnroot/pam-modules/trunk@30 56984be4-0537-0410-a56c-fcb268c96130
This commit is contained in:
parent
dbc191b52b
commit
bd863c9bbd
2 changed files with 5 additions and 74 deletions
|
@ -42,46 +42,7 @@
|
|||
#endif /* LINUX_PAM */
|
||||
#include <security/pam_modules.h>
|
||||
|
||||
#ifndef PAM_CONV_AGAIN
|
||||
# define PAM_CONV_AGAIN PAM_TRY_AGAIN
|
||||
#endif
|
||||
#ifndef PAM_AUTHTOK_RECOVER_ERR
|
||||
# define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR
|
||||
#endif
|
||||
#ifndef PAM_EXTERN
|
||||
# define PAM_EXTERN
|
||||
#endif
|
||||
|
||||
#define PAM_OVERWRITE(s) \
|
||||
do { \
|
||||
register char *p; \
|
||||
if ((p = s) != NULL) \
|
||||
while (*p) *p++ = 0; \
|
||||
} while (0)
|
||||
|
||||
#define PAM_DROP_REPLY(reply, nrepl) \
|
||||
do { \
|
||||
int i; \
|
||||
for (i=0; i<nrepl; i++) { \
|
||||
PAM_OVERWRITE(reply[i].resp); \
|
||||
free(reply[i].resp); \
|
||||
} \
|
||||
if (reply) \
|
||||
free(reply); \
|
||||
} while (0)
|
||||
|
||||
static void
|
||||
_pam_delete(char *x)
|
||||
{
|
||||
PAM_OVERWRITE(x);
|
||||
free(x);
|
||||
}
|
||||
|
||||
static void
|
||||
_cleanup_string(pam_handle_t *pamh, void *x, int error_status)
|
||||
{
|
||||
_pam_delete(x);
|
||||
}
|
||||
#include <common.c>
|
||||
|
||||
/* logging */
|
||||
static void
|
||||
|
@ -304,7 +265,7 @@ pam_sm_setcred(pam_handle_t *pamh,
|
|||
#ifdef PAM_STATIC
|
||||
|
||||
struct pam_module _pam_radius_modstruct = {
|
||||
"pam_radius", /* name of the module */
|
||||
"pam_regex", /* name of the module */
|
||||
pam_sm_authenticate,
|
||||
pam_sm_setcred,
|
||||
NULL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue