system/4943: bug in cksum `-c' switch

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

system/4943: bug in cksum `-c' switch

J.C. Roberts-2
>Number:         4943
>Category:       system
>Synopsis:       ckssum -c fails with correctly formated input
>Confidential:   yes
>Severity:       non-critical
>Priority:       medium
>Responsible:    bugs
>State:          open
>Quarter:        
>Keywords:      
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 17 20:20:01 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     JCR
>Release:        CURRENT
>Organization:
net
>Environment:
       
        System      : OpenBSD 3.8
        Architecture: OpenBSD.i386
        Machine     : i386
>Description:
If you run cksum with the `-c' switch along with the `CKSUM' files
in the distribution you get the following error:

        cksum: CKSUM: no properly formatted lines found

According to the cksum(1) manpage and the CKSUM files that come with the
distributions, the files are formatted correctly. My (wild) guess is
that the cksum is somehow expecting the format used with MD5?

This was also broken in 3.6-STABLE but it seems like no one noticed.
The error message in 3.6 is slightly different than it is in -CURRENT.
Yes, I still have one last 3.6 box in need of upgrading ;-)

>How-To-Repeat:
If you download any arch distribution from FTP, run the following:

        # cksum -c CKSUM

>Fix:
The thought of just removing sum, cksum and sysvsum crosses my mind...


>Release-Note:
>Audit-Trail:
>Unformatted:

Reply | Threaded
Open this post in threaded view
|

Re: system/4943: bug in cksum `-c' switch

Todd C. Miller
The following reply was made to PR system/4943; it has been noted by GNATS.

From: "Todd C. Miller" <[hidden email]>
To: "J.C. Roberts" <[hidden email]>
Cc: [hidden email]
Subject: Re: system/4943: bug in cksum `-c' switch
Date: Sun, 18 Dec 2005 12:43:56 -0500

 The -c flag was never intended to be used with output from the sum,
 cksum or sysvsum algorithms since they don't list the algorithm
 used in the file itself.  Now that we support GNU-style checklist
 files this would be possible (with some changes).
 
  - todd

Reply | Threaded
Open this post in threaded view
|

Re: system/4943: bug in cksum `-c' switch

J.C. Roberts-2
In reply to this post by J.C. Roberts-2
The following reply was made to PR system/4943; it has been noted by GNATS.

From: "J.C. Roberts" <[hidden email]>
To: "Todd C. Miller" <[hidden email]>
Cc: [hidden email]
Subject: Re: system/4943: bug in cksum `-c' switch
Date: Sun, 18 Dec 2005 09:57:47 -0800

 On Sun, 18 Dec 2005 12:43:56 -0500, "Todd C. Miller"
 <[hidden email]> wrote:
 
 >The -c flag was never intended to be used with output from the sum,
 >cksum or sysvsum algorithms since they don't list the algorithm
 >used in the file itself.  
 
 Maybe I'm reading things wrong but the manpage states/implies the
 algorithm for each of the three (sum, cksum, sysvsum)?
 
 >Now that we support GNU-style checklist
 >files this would be possible (with some changes).
 >
 To prevent breaking existing systems that use the current style, would
 it be best to implement support for the GNU-style checklist style as an
 additional switch?
 
 I know you guys are not here to babysit less talented C/unix coders but
 from what I can tell, this bug might be simple enough for me to tackle.
 If you point me in the right direction, I'll give it a try.
 
 jcr