[Bug 1786508] Re: Use of uninitialized value $ARGV[0] in string eq at /usr/sbin/eximstats line 563

Andreas Hasenack andreas at canonical.com
Wed Oct 10 19:44:38 UTC 2018


** Description changed:

  [Impact]
  
-  * An explanation of the effects of the bug on users and
+ The eximstats tool, when not given any command line parameters, prints out a (harmless) warning:
+ # eximstats 
+ Use of uninitialized value $ARGV[0] in string eq at /usr/sbin/eximstats line 563.
  
-  * justification for backporting the fix to the stable release.
+ Problem is that this tool is used in a cron job which, if enabled, will
+ print output to stderr and that is enough for cron to email an admin,
+ which is annoying.
  
-  * In addition, it is helpful, but not required, to include an
-    explanation of how the upload fixes this bug.
+ The fix is simple and is applied upstream:
+ -if ($ARGV[0] eq '--version') {
+ +if (@ARGV and $ARGV[0] eq '--version') {
+ 
  
  [Test Case]
+ On Bionic:
+ * Install exim4:
+ sudo apt update
+ sudo apt install exim4
  
-  * detailed instructions how to reproduce the bug
+ * Run eximstats with no arguments, which will block (it's waiting for stdin) but print the warning:
+ ubuntu at bionic-eximstats:~$ eximstats 
+ Use of uninitialized value $ARGV[0] in string eq at /usr/sbin/eximstats line 563.
  
-  * these should allow someone who is not familiar with the affected
-    package to reproduce the bug and verify that the updated package fixes
-    the problem.
+ * To observe the effect this has in the cron job, edit /etc/cron.daily/exim4-base and set E4BCD_DAILY_REPORT_TO near the top of the file to "ubuntu at localhost", like this:
+ E4BCD_DAILY_REPORT_TO="ubuntu at localhost"
+ 
+ * Then run these commands and observe that the cron script prints out the same warning, which, if ran by cron, would have been emailed to the admin:
+ $ echo hello | mail -s hello ubuntu at localhost
+ $ sudo /etc/cron.daily/exim4-base 
+ Use of uninitialized value $ARGV[0] in string eq at /usr/sbin/eximstats line 563.
+ 
+ With the updated packages, eximstats with no arguments will just block,
+ waiting for data on stdin, and not print the warning. The cron job test
+ will also be silent.
  
  [Regression Potential]
  
-  * discussion of how regressions are most likely to manifest as a result
+  * discussion of how regressions are most likely to manifest as a result
  of this change.
  
-  * It is assumed that any SRU candidate patch is well-tested before
-    upload and has a low overall risk of regression, but it's important
-    to make the effort to think about what ''could'' happen in the
-    event of a regression.
+  * It is assumed that any SRU candidate patch is well-tested before
+    upload and has a low overall risk of regression, but it's important
+    to make the effort to think about what ''could'' happen in the
+    event of a regression.
  
-  * This both shows the SRU team that the risks have been considered,
-    and provides guidance to testers in regression-testing the SRU.
+  * This both shows the SRU team that the risks have been considered,
+    and provides guidance to testers in regression-testing the SRU.
  
  [Other Info]
-  
-  * Anything else you think is useful to include
-  * Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
-  * and address these questions in advance
  
+  * Anything else you think is useful to include
+  * Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
+  * and address these questions in advance
  
  [Original description]
  
  Already fixed upstream and in Debian: https://bugs.debian.org/cgi-
  bin/bugreport.cgi?bug=894501
  
  Fix is easy:
  https://git.exim.org/exim.git/blobdiff/d51252ebebd7744dd218c4af965ca3d5424648cc..44de51a174765f7f5ecb250638cdb3fe64ec67dc:/src/src/eximstats.src
  
  Please backport to Bionic.
  
  Thanks!

** Description changed:

  [Impact]
  
  The eximstats tool, when not given any command line parameters, prints out a (harmless) warning:
- # eximstats 
+ # eximstats
  Use of uninitialized value $ARGV[0] in string eq at /usr/sbin/eximstats line 563.
  
  Problem is that this tool is used in a cron job which, if enabled, will
  print output to stderr and that is enough for cron to email an admin,
  which is annoying.
  
  The fix is simple and is applied upstream:
  -if ($ARGV[0] eq '--version') {
  +if (@ARGV and $ARGV[0] eq '--version') {
  
- 
  [Test Case]
  On Bionic:
  * Install exim4:
  sudo apt update
  sudo apt install exim4
  
  * Run eximstats with no arguments, which will block (it's waiting for stdin) but print the warning:
- ubuntu at bionic-eximstats:~$ eximstats 
+ ubuntu at bionic-eximstats:~$ eximstats
  Use of uninitialized value $ARGV[0] in string eq at /usr/sbin/eximstats line 563.
  
  * To observe the effect this has in the cron job, edit /etc/cron.daily/exim4-base and set E4BCD_DAILY_REPORT_TO near the top of the file to "ubuntu at localhost", like this:
  E4BCD_DAILY_REPORT_TO="ubuntu at localhost"
  
  * Then run these commands and observe that the cron script prints out the same warning, which, if ran by cron, would have been emailed to the admin:
  $ echo hello | mail -s hello ubuntu at localhost
- $ sudo /etc/cron.daily/exim4-base 
+ $ sudo /etc/cron.daily/exim4-base
  Use of uninitialized value $ARGV[0] in string eq at /usr/sbin/eximstats line 563.
  
  With the updated packages, eximstats with no arguments will just block,
  waiting for data on stdin, and not print the warning. The cron job test
  will also be silent.
  
  [Regression Potential]
- 
-  * discussion of how regressions are most likely to manifest as a result
- of this change.
- 
-  * It is assumed that any SRU candidate patch is well-tested before
-    upload and has a low overall risk of regression, but it's important
-    to make the effort to think about what ''could'' happen in the
-    event of a regression.
- 
-  * This both shows the SRU team that the risks have been considered,
-    and provides guidance to testers in regression-testing the SRU.
+ I can't imagine a regression with this change, other than the usual fact the the updated package is a rebuild, and it might link with different libraries since bionic was released.
  
  [Other Info]
- 
-  * Anything else you think is useful to include
-  * Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
-  * and address these questions in advance
+ Were it not for the cron job, this update would probably not be worth it.
+  
  
  [Original description]
  
  Already fixed upstream and in Debian: https://bugs.debian.org/cgi-
  bin/bugreport.cgi?bug=894501
  
  Fix is easy:
  https://git.exim.org/exim.git/blobdiff/d51252ebebd7744dd218c4af965ca3d5424648cc..44de51a174765f7f5ecb250638cdb3fe64ec67dc:/src/src/eximstats.src
  
  Please backport to Bionic.
  
  Thanks!

-- 
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to exim4 in Ubuntu.
https://bugs.launchpad.net/bugs/1786508

Title:
  Use of uninitialized value $ARGV[0] in string eq at
  /usr/sbin/eximstats line 563

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/exim4/+bug/1786508/+subscriptions



More information about the Ubuntu-server-bugs mailing list