From 8533e9b7645c0908da2755d00f31de1aaa833b27 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Mon, 24 Jan 2005 14:04:17 +0000 Subject: Relevant BUGIDs: none Purpose of commit: bugfix Commit summary: --------------- Fix possible segfault in the last patch to pam_tally. --- modules/pam_tally/pam_tally.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules/pam_tally') diff --git a/modules/pam_tally/pam_tally.c b/modules/pam_tally/pam_tally.c index f1f13c16..57fa611a 100644 --- a/modules/pam_tally/pam_tally.c +++ b/modules/pam_tally/pam_tally.c @@ -770,7 +770,12 @@ int main ( int argc, char **argv ) { uid_t uid; tally_t tally=cline_reset; FILE *TALLY=0; - int i=pam_get_uid( NULL, &uid, NULL, NULL); + struct tally_options opts; + int i; + + memset(&opts, 0, sizeof(opts)); + opts.ctrl = OPT_AUDIT; + i=pam_get_uid( NULL, &uid, NULL, &opts); if ( i != PAM_SUCCESS ) { fprintf(stderr,"%s: %s\n",*argv,pam_errors(i)); exit(0); -- cgit v1.2.3