diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2001-01-20 22:21:22 +0000 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2001-01-20 22:21:22 +0000 |
commit | a7339317595a92cde290f04bda5106bd99f73177 (patch) | |
tree | 4a165dd887bd976933495ccb3cd8af0ed13427d2 /modules/pam_tally | |
parent | 9a3a7e36555ff577d7241240776bdbc02ab5fb43 (diff) | |
download | pam-a7339317595a92cde290f04bda5106bd99f73177.tar.gz pam-a7339317595a92cde290f04bda5106bd99f73177.tar.bz2 pam-a7339317595a92cde290f04bda5106bd99f73177.zip |
Relevant BUGIDs: 117434
Purpose of commit: bugfix
Commit summary:
---------------
Appear to have left these fixes out with last commit to resolve 117434.
Diffstat (limited to 'modules/pam_tally')
-rw-r--r-- | modules/pam_tally/pam_tally.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/pam_tally/pam_tally.c b/modules/pam_tally/pam_tally.c index 90961731..3d994458 100644 --- a/modules/pam_tally/pam_tally.c +++ b/modules/pam_tally/pam_tally.c @@ -633,6 +633,8 @@ static int getopts( int argc, char **argv ) { int main ( int argc, char **argv ) { + struct fail_s fs, *fsp = &fs; + if ( ! getopts( argc, argv+1 ) ) { printf("%s: [--file rooted-filename] [--user username] " "[--reset[=n]] [--quiet]\n", @@ -658,7 +660,7 @@ int main ( int argc, char **argv ) { exit(0); } - i=get_tally( &tally, uid, cline_filename, &TALLY ); + i=get_tally( &tally, uid, cline_filename, &TALLY, fsp ); if ( i != PAM_SUCCESS ) { if (TALLY) fclose(TALLY); fprintf(stderr,"%s: %s\n",*argv,pam_errors(i)); @@ -669,7 +671,7 @@ int main ( int argc, char **argv ) { printf("User %s\t("UID_FMT")\t%s "TALLY_FMT"\n",cline_user,uid, (cline_reset!=TALLY_HI)?"had":"has",tally); - i=set_tally( cline_reset, uid, cline_filename, &TALLY ); + i=set_tally( cline_reset, uid, cline_filename, &TALLY, fsp ); if ( i != PAM_SUCCESS ) { if (TALLY) fclose(TALLY); fprintf(stderr,"%s: %s\n",*argv,pam_errors(i)); @@ -684,7 +686,8 @@ int main ( int argc, char **argv ) { for ( ; !feof(TALLY); uid++ ) { tally_t tally; struct passwd *pw; - if ( ! fread((char *) &fsp->fs_faillog, sizeof faillog, 1, TALLY) + if ( ! fread((char *) &fsp->fs_faillog, + sizeof (struct faillog), 1, TALLY) || ! fsp->fs_faillog.fail_cnt ) { tally=fsp->fs_faillog.fail_cnt; continue; |