Bug 1279936 - Redundant argument in sprintf (postfix)
Summary: Redundant argument in sprintf (postfix)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: logwatch
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Synacek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1282749 1305680 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-10 14:25 UTC by Henrique Martins
Modified: 2016-03-20 02:24 UTC (History)
18 users (show)

Fixed In Version: logwatch-7.4.1-6.20150731svn293.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-20 02:24:51 UTC


Attachments (Terms of Use)
patches logwatch script for postfix (1.03 KB, patch)
2015-12-18 15:41 UTC, Henrique Martins
no flags Details | Diff

Description Henrique Martins 2015-11-10 14:25:25 UTC
Description of problem:
After update to fc23 logwatch's postfix sections contains several lines like
  Redundant argument in sprintf at /usr/share/logwatch/scripts/services/postfix line 1382, <> line 37

Version-Release number of selected component (if applicable):
logwatch-7.4.1-5.20150731svn293.fc23.noarch
postfix-3.0.2-1.fc23.x86_64

How reproducible:
All the time in my system

Steps to Reproduce:
1. give group or other write permission to /etc/postfix/certs
2. (not sure one needs to have any files in there)
3. run logwatch on the postfix

Actual results:
Multiple warning messages like in the description

Expected results:
Not sure, probably show the warning in logwatch?

Additional info:
The offending line looks like:
  Nov  8 13:28:57 machine postfix/postfix-script[1464]: warning: group or other writable: /etc/postfix/./certs
When logwatch gets to line 1382 of the postfix log processing scripts
   push @{$lines[$cur_level]}, 
     sprintf "$fmt  %-23s $extra\n", $total, $desc, commify ($Totals{$keyname});
$extra is blank.

No time to dig further now, maybe this is enough for the script maintainer to fix it.

Comment 1 Dominik 'Rathann' Mierzejewski 2015-11-22 21:17:15 UTC
*** Bug 1282749 has been marked as a duplicate of this bug. ***

Comment 2 Doug Herr 2015-11-30 13:47:58 UTC
After upgrading F22 to F23 I also get about the same error, in my case it is 5 copies of:

 Redundant argument in sprintf at /usr/share/logwatch/scripts/services/postfix line 1382, <> line 48.

With:
postfix-3.0.3-1.fc23.x86_64
logwatch-7.4.1-5.20150731svn293.fc23.noarch

Note that I don't have the certs dir:

>ls -la /etc/postfix/certs
ls: cannot access /etc/postfix/certs: No such file or directory

Only alteration made to postfix is settings:

# rpm -V postfix
S.5....T.  c /etc/postfix/main.cf


Hope this helps.

Comment 3 Henrique Martins 2015-12-18 15:41:07 UTC
Created attachment 1107203 [details]
patches logwatch script for postfix

Attached patch fixes this for the logs on my machines. as they exist today.
May or not break other cases

Comment 4 Doug Herr 2015-12-19 17:41:39 UTC
I applied the patch yesterday and then waited for the regular logwatch run.  The patch seems to have worked.  There are no errors showing in the e-mail from the daily run of logwatch.

Comment 5 Rand Kmiec 2015-12-20 14:17:29 UTC
Thanks for the patch!  Works fine for me as well (Fedora 23):


# logwatch  --service postfix

 ################### Logwatch 7.4.1 (09/23/14) ####################
        Processing Initiated: Sun Dec 20 09:16:07 2015
        Date Range Processed: yesterday
                              ( 2015-Dec-19 )
                              Period is day.
        Detail Level of Output: 0
        Type of Output/Format: stdout / text
        Logfiles for Host: moria
 ##################################################################

 --------------------- Postfix Begin ------------------------

    9.601K  Bytes accepted                               9,831
    8.874K  Bytes delivered                              9,087
 ========   ==================================================

        3   Accepted                                   100.00%
 --------   --------------------------------------------------
        3   Total                                      100.00%
 ========   ==================================================

        4   Removed from queue                               4
        2   Delivered                                        2
        2   Bounced (local)                                  2
        1   Notifications sent                               1


 ---------------------- Postfix End -------------------------


 ###################### Logwatch End #########################

Comment 6 Harald Reindl 2015-12-27 10:33:19 UTC
at least a scratchbuild as well as a comment for https://bugzilla.redhat.com/show_bug.cgi?id=1273925 from the pakcage maintainer would be fine...

Comment 7 Henrique Martins 2015-12-27 17:37:12 UTC
Silence is golden on silent night/season, I guess.
I posted my patch to the logwatch on sourceforge, which may be RH's upstream, but there's not much traffic over there either

Comment 8 Rene Zijlstra 2015-12-30 08:17:24 UTC
I had the same issue, but your patch fixed it like a charm Henrique. Loads of grateful thanks!
Veliz 2016!

Comment 9 Henrique Martins 2016-01-06 22:17:55 UTC
Fixed upstream
  https://sourceforge.net/p/logwatch/bugs/48
should eventually make it here.

Comment 10 Harald Reindl 2016-02-09 14:49:49 UTC
it's terrible that with the defaults switching 3 months later logwatch bugs are still not fixed in Fedora and bugs like this and https://bugzilla.redhat.com/show_bug.cgi?id=1273925 leaves the bad taste the the more and more degraded usefulness is prepared to have an excuse drop it and decalre journalctl to the new log world

Comment 11 Tom Horsley 2016-03-12 16:14:38 UTC
Meanwhile, sshd introduced a new logwatch problem because it changed the format of "Disconnected from" messages. I see a patch has been sent to upstream logwatch for this problem as well. It sure would be nice to get a logwatch update.

Comment 12 Jan Synacek 2016-03-15 09:21:50 UTC
*** Bug 1305680 has been marked as a duplicate of this bug. ***

Comment 13 Fedora Update System 2016-03-15 12:00:10 UTC
logwatch-7.4.1-6.20150731svn293.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-edde0e9096

Comment 14 Fedora Update System 2016-03-16 15:23:17 UTC
logwatch-7.4.1-6.20150731svn293.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-edde0e9096

Comment 15 Henrique Martins 2016-03-17 15:35:49 UTC
Something seems funny.
Is this the rpm I'm supposed to get?
  https://kojipkgs.fedoraproject.org//packages/logwatch/7.4.1/6.20150731svn293.fc23/noarch/logwatch-7.4.1-6.20150731svn293.fc23.noarch.rpm
This rpm doesn't seem to have neither the patch for this bug nor the patch for bug 1237339.
My logwatch has all kind of unescaped left brace and redudant scanf args warnings!

Comment 16 Henrique Martins 2016-03-18 13:12:10 UTC
Not sure what happened but dnf installed 7.4.1-3.20140924svn242.fc23 not sure how or where from, as I don't have that file in my system.  A reinstall of the rpm fixed the problem and now it is working!

Comment 17 Fedora Update System 2016-03-20 02:24:41 UTC
logwatch-7.4.1-6.20150731svn293.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.