diff options
Diffstat (limited to 'modules/pam_tally')
-rw-r--r-- | modules/pam_tally/Makefile.am | 2 | ||||
-rw-r--r-- | modules/pam_tally/pam_tally.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/modules/pam_tally/Makefile.am b/modules/pam_tally/Makefile.am index 4fad738f..c4c181a9 100644 --- a/modules/pam_tally/Makefile.am +++ b/modules/pam_tally/Makefile.am @@ -28,11 +28,9 @@ securelib_LTLIBRARIES = pam_tally.la sbin_PROGRAMS = pam_tally pam_tally_SOURCES = pam_tally_app.c -pam_tally_LDADD = -L$(top_builddir)/libpam -lpam if ENABLE_REGENERATE_MAN noinst_DATA = README README: pam_tally.8.xml -include $(top_srcdir)/Make.xml.rules endif - diff --git a/modules/pam_tally/pam_tally.c b/modules/pam_tally/pam_tally.c index fc818ffe..8814659a 100644 --- a/modules/pam_tally/pam_tally.c +++ b/modules/pam_tally/pam_tally.c @@ -37,14 +37,16 @@ * modules include file to define the function prototypes. */ +#ifndef MAIN #define PAM_SM_AUTH #define PAM_SM_ACCOUNT /* #define PAM_SM_SESSION */ /* #define PAM_SM_PASSWORD */ -#include <security/pam_modules.h> #include <security/pam_modutil.h> #include <security/pam_ext.h> +#endif +#include <security/pam_modules.h> #ifndef TRUE #define TRUE 1L @@ -115,6 +117,9 @@ tally_log (const pam_handle_t *pamh UNUSED, int priority UNUSED, fprintf(stderr,"\n"); va_end(args); } + +#define pam_modutil_getpwnam(pamh,user) getpwnam(user) + #endif /*---------------------------------------------------------------------*/ @@ -353,7 +358,7 @@ get_tally(pam_handle_t *pamh, tally_t *tally, uid_t uid, return PAM_AUTH_ERR; } - if ( fileinfo.st_size <= uid * sizeof(struct faillog) ) { + if ( (size_t)fileinfo.st_size <= uid * sizeof(struct faillog) ) { memset(fsp, 0, sizeof(struct faillog)); *tally=0; |