Menu

#179 opendmarc-importstats calls opendmarc-import with no path

1.3.1
open
None
2016-08-03
2016-07-21
No

Reported via Bugzilla on the RH package by Andrew Merideth.


The script /usr/sbin/opendmarc-importstats calls opendmarc-import with no path, which fails on the EL5 platform.

Fix:

--- /usr/sbin/opendmarc-importstats.old 2016-07-21 17:56:31.000000000 +0100
+++ /usr/sbin/opendmarc-importstats 2016-07-21 17:54:15.000000000 +0100
@@ -17,7 +17,7 @@
then
mv $statsdb ${statsdb}.OLD.$$

  • if opendmarc-import < ${statsdb}.OLD.$$
  • if /usr/sbin/opendmarc-import < ${statsdb}.OLD.$$
    then
    rm ${statsdb}.OLD.$$
    else

Related

Tickets: #179

Discussion

  • Steve Jenkins

    Steve Jenkins - 2016-07-21

    I applied this patch to the EL5 version only, but used:

    --- /reports/opendmarc-importstats.old 2016-07-21 17:56:31.000000000 +0100
    +++ /reports/opendmarc-importstats 2016-07-21 17:54:15.000000000 +0100
    

    in the patch header. Builds fine, function check currently on QA here:

    https://bugzilla.redhat.com/show_bug.cgi?id=1358947

     
  • Juri Haberland

    Juri Haberland - 2016-07-22

    Isn't that the same as ticket #159?
    https://sourceforge.net/p/opendmarc/tickets/159/

     

    Last edit: Juri Haberland 2016-07-22
    • Steve Jenkins

      Steve Jenkins - 2016-07-22

      On Fri, Jul 22, 2016 at 1:31 AM, Juri Haberland pktomo@users.sf.net wrote:

      Isn't that the same as ticket #159?

      Status: open
      Target: 1.3.1
      Created: Thu Jul 21, 2016 07:54 PM UTC by Steve Jenkins
      Last Updated: Thu Jul 21, 2016 09:10 PM UTC
      Owner: Murray S. Kucherawy

      Reported via Bugzilla on the RH package by Andrew Merideth.

      Hi, Juri. Looking at both patches, I don't believe so. #159 refers to the
      location of the history file, while #179 refers to the path of the
      opendmarc-import script. Both patches affect similar sections of the
      opendmarc-importstats file, but fix different things.

      The default location for opendmarc-import is /usr/sbin, but that's not in
      the default path on EL5, so an explicit path is required. Of course, it
      won't matter once EL5 hits EOL, but I'm trying to allow it to work on all
      current distros, and until it officially hits EOL, it's still technically
      "current."

      SteveJ

       

      Related

      Tickets: #179

      • Juri Haberland

        Juri Haberland - 2016-07-22

        Yes, you are right, sorry about that. I just had a (too) short look at your patch.

        Just a little objection to your patch:
        Having a hard-coded path inside the script is IMHO a bad idea as the scripts might be installed under /usr/local/bin or elsewere. You should convert it to a template for the autoconf tools (just like in the patch for ticket #159) and replace the path with the token @sbindir@.

         
  • Steve Jenkins

    Steve Jenkins - 2016-08-03

    Now doing it like this:

    --- /reports/opendmarc-importstats.old  2016-07-21 17:56:31.000000000 +0100
    +++ /reports/opendmarc-importstats      2016-07-21 17:54:15.000000000 +0100
    @@ -17,7 +17,7 @@
     then
            mv $statsdb ${statsdb}.OLD.$$
    
    -       if opendmarc-import < ${statsdb}.OLD.$$
    +       if @sbindir@/opendmarc-import < ${statsdb}.OLD.$$
            then
                    rm ${statsdb}.OLD.$$
            else
    
     
    • Juri Haberland

      Juri Haberland - 2016-08-04

      Steve,

      almost right, but now you have to rename the file to opendmarc-importstats.in and add "reports/opendmarc-importstats" to the file configure.ac.
      Once again, have a look how I did it in the patch for ticket #159 https://sourceforge.net/p/opendmarc/tickets/159/

      (You might want to apply the patch for ticket 159 an put your change on top...)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.