Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 7458 - whichdb.py patched incorrectly in python-1.5.2-8
Summary: whichdb.py patched incorrectly in python-1.5.2-8
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: python
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-11-30 23:33 UTC by jtb
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-12-02 22:15:51 UTC


Attachments (Terms of Use)

Description jtb 1999-11-30 23:33:30 UTC
The last 16 lines of /usr/lib/python1.5/whichdb.py are currently (note that
lines 5-7 should be between lines 13 and 15):

    # Check for BSD hash
    if magic in (0x00061561, 0x61150600):
        return "dbhash"

    # Check for BSD hash
    if magic in (0x00061561, 0x61150600):
        return "dbhash"

    # BSD hash v2 has a 12-byte NULL pad in front of the file type
    try:
        (magic,) = struct.unpack("=l", s16[-4:])
    except struct.error:
        return ""

    # Unknown
    return ""


This should read:

    # Check for BSD hash
    if magic in (0x00061561, 0x61150600):
        return "dbhash"

    # BSD hash v2 has a 12-byte NULL pad in front of the file type
    try:
        (magic,) = struct.unpack("=l", s16[-4:])
    except struct.error:
        return ""

    # Check for BSD hash
    if magic in (0x00061561, 0x61150600):
        return "dbhash"

    # Unknown
    return ""

otherwise, grabbing the magic number the second time has no effect and
yeilds an unknown db every time.

Comment 1 Michael K. Johnson 1999-12-02 22:15:59 UTC
<sigh>, thought I took that straight from Guido's note on the python
bug tracking system.

Fixing now, thanks for the note, will be in python-1.5.2-9 in the
next rawhide.


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