Package: mgetty-fax Version: 1.1.33-1 Severity: normal Tags: patch
The acct.log file only contains the mail address to which notification will be sent. Since any user can specify another user as the mail address, this does not lend itself well to accounting purposes. Attached is a patch that makes faxrunq also log the original submitter. -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (100, 'testing') Architecture: i386 (i686) Kernel: Linux 2.4.27 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages mgetty-fax depends on: ii cron 3.0pl1-86 management of regular background p ii debconf 1.4.30.13 Debian configuration management sy ii libc6 2.3.2.ds1-21 GNU C Library: Shared libraries an ii mgetty 1.1.33-1 Smart Modem getty replacement -- debconf information: * mgetty-fax/new_security_scheme: * mgetty-fax/start_faxrunqd: false
--- ./fax/faxrunq 2005-05-06 16:03:57.000000000 -0600 +++ /usr/bin/faxrunq 2005-05-06 15:58:48.000000000 -0600 @@ -178,6 +178,7 @@ $1=="acct_handle" { ah=substr($0,13) } END { if ( mail != "" ) printf "MAIL_TO=\"%s\";", mail else printf "MAIL_TO=\"%s\";", user + printf "USER=\"%s\";", user printf "TIME=\"%s\";", time printf "VERBOSE_TO=\"%s\";", verbto printf "RE=\"%s\"; AH=\"%s\"", re, ah }' - ` @@ -240,7 +241,7 @@ $echo "Status "`date`" successfully sent" >>JOB # update accounting log - $echo "$MAIL_TO "`dirname $job`" |$PHONE |$AH|"`date`"| success" >>$FAX_ACCT + $echo "$MAIL_TO ($USER) "`dirname $job`" |$PHONE |$AH|"`date`"| success" >>$FAX_ACCT # send mail, if requested if [ -n "$do_mail_s" ] ; then @@ -297,7 +298,7 @@ $echo "Status "`date`" $comment, exit($status): $why" >>JOB # update accounting log - $echo "$MAIL_TO "`dirname $job`" |$PHONE |$AH|"`date`"| fail $status: $why" >>$FAX_ACCT + $echo "$MAIL_TO ($USER) "`dirname $job`" |$PHONE |$AH|"`date`"| fail $status: $why" >>$FAX_ACCT # if failed <max_fail_costly> or <max_fail_total> times, suspend job suspend="";