]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: none
authorTomas Mraz <tm@t8m.info>
Mon, 24 Jan 2005 14:04:17 +0000 (14:04 +0000)
committerTomas Mraz <tm@t8m.info>
Mon, 24 Jan 2005 14:04:17 +0000 (14:04 +0000)
Purpose of commit: bugfix

Commit summary:
---------------
Fix possible segfault in the last patch to pam_tally.

modules/pam_tally/pam_tally.c

index f1f13c16539e7f33ccdce21cfcb93272ad9edb2b..57fa611ab59482063f20116468fbe6bd7762e2d7 100644 (file)
@@ -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);