NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/48404: msgs -c "cleanup" threshold documented with wrong syntax



>Number:         48404
>Category:       bin
>Synopsis:       msgs -c "cleanup" threshold documented with wrong syntax
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 24 18:20:00 +0000 2013
>Originator:     Martin Neitzel
>Release:        NetBSD 2.0 through 6.1.2
>Organization:
        Marshlabs
>Environment:
        
        
System: NetBSD hackett.marshlabs.gaertner.de 6.1_STABLE NetBSD 6.1_STABLE 
(GENERIC) #0: Tue Oct 22 21:04:23 CEST 2013 
neitzel%hackett.marshlabs.gaertner.de@localhost:/scratch/obj/usr/src/sys/arch/amd64/compile/GENERIC
 amd64
Architecture: x86_64
Machine: amd64
>Description:
        "msgs -c" for cleaning up the msgs(1) spool accepts an optional
        further argument specifing a non-default cut-off threshold.
        An editorial change in 2003 omitted the required dash in front
        of this threshold argument.  Actual non-dashed -c thresholds
        will be silently ignored, though, resulting in the default
        (21 days) still being applied.

>How-To-Repeat:
        (1) Make sure your have some worthless test message submitted:
        If needs be, enable "mail msgs" by activating the /etc/mail/aliases
        entry and obeying the additioal notes form PR 46790.
        Submit a test msg.

        (2) Wait 4 days.   (But less then three weeks, because "msgs -c"
        will be run from the default /etc/daily)

        (3) As root, run "msgs -c 2"  (as (incorrectly) documented).
        Find your test msg still surviving in /var/msgs.
        (In fact, the code will apply the default threshold of 21 days.)

        (4) As root, run "msgs -c -2" (as implemented and previously
        documented).  ==> clean.

>Fix:
        While the "dashed" argument syntax is a bit strange, its
        implemention quite hacky, and a change of the program
        to actually implement the non-dashed syntax would be trivial,
        I recommend to stick with historical practice.

        So here's the patch for the documentation:

Index: msgs.1
===================================================================
RCS file: /cvsroot/src/usr.bin/msgs/msgs.1,v
retrieving revision 1.17
diff -u -r1.17 msgs.1
--- msgs.1      3 Sep 2004 14:24:50 -0000       1.17
+++ msgs.1      24 Nov 2013 14:20:57 -0000
@@ -43,7 +43,7 @@
 .Nm
 .Op Fl s
 .Nm
-.Op Fl c Op Ar days
+.Op Fl c Op Ar \-days
 .Sh DESCRIPTION
 .Nm
 is used to read system messages.



Home | Main Index | Thread Index | Old Index