diff options
author | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 16:18:43 -0800 |
---|---|---|
committer | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 17:01:52 -0800 |
commit | 26ee21df2a5fe63f08cfae8c7d35c24bd3dd4f04 (patch) | |
tree | e6e25c1da5974a60660c8b2108d609fae00af126 /Linux-PAM/modules/pam_tally/pam_tally.c | |
parent | a3ee6f5fc767b1b01568bce6dd31fc9ca932a8d2 (diff) | |
parent | 9727ff2a3fa0e94a42b34a579027bacf4146d571 (diff) | |
download | pam-26ee21df2a5fe63f08cfae8c7d35c24bd3dd4f04.tar.gz pam-26ee21df2a5fe63f08cfae8c7d35c24bd3dd4f04.tar.bz2 pam-26ee21df2a5fe63f08cfae8c7d35c24bd3dd4f04.zip |
merge upstream version 0.99.10.0
Diffstat (limited to 'Linux-PAM/modules/pam_tally/pam_tally.c')
-rw-r--r-- | Linux-PAM/modules/pam_tally/pam_tally.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Linux-PAM/modules/pam_tally/pam_tally.c b/Linux-PAM/modules/pam_tally/pam_tally.c index 66fc5f35..8814659a 100644 --- a/Linux-PAM/modules/pam_tally/pam_tally.c +++ b/Linux-PAM/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 @@ -94,7 +96,7 @@ struct tally_options { #define OPT_PER_USER 010 #define OPT_NO_LOCK_TIME 020 #define OPT_NO_RESET 040 -#define OPT_AUDIT 100 +#define OPT_AUDIT 0100 /*---------------------------------------------------------------------*/ @@ -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; |