#2 Recover from update errors.

closed-fixed
unSpawn
Rkhunter (37)
5
2007-01-13
2006-10-12
No

If a 'data base' file is missing or is missing a
version line, the update fails.

In either case, a copy should be fetched from the
mirror rather than having the update abort.

Discussion

  • unSpawn
    unSpawn
    2006-10-12

    Logged In: YES
    user_id=600864

    If a 'data base' file is missing or is missing a version
    line, the update fails.

    Please add case details or attach detailed report (as in "sh
    -x rkhunter --update" 2>&1 | tee ~/report) as I can't see
    how we could have database files without version line.

     
  • unSpawn
    unSpawn
    2006-10-12

    • assigned_to: nobody --> unspawn
     
  • Logged In: YES
    user_id=735003

    Bluntly because I was trying to force an update. The hashes
    on a number of utilities were marked 'BAD' because a set of
    updates I had NOT yet installed had been updated. I tried
    killing the default hash file. No luck. I created an empty
    file with touch. No luck. I got it to work by extracting
    the version line from another file and resetting the version
    number to 0000000000. In a previous iteration I had removed
    and reinstalled rkhunter but it immediatly picked up the bad
    hash values. In other words the rkhunter report had become
    useless and I was trying to patch things up. If you still
    want more details, I'll supply them, but I don't think
    you're looking at the right problem.

     
  • John Horne
    John Horne
    2006-10-12

    Logged In: YES
    user_id=665381

    I think this could probably be easiest satisfied by a
    'forced update' option. Regardless of the state of a local
    data file, it would then be overwritten by the one from the
    mirror.

     
  • Logged In: YES
    user_id=735003

    That's another request, and has already been submitted.

    However, the error checking happens first and the process
    terminates before an option like that could be effected. It
    needs to be fixed. Instead of terminating, the update
    should be done. Therefore this request...

     
  • Logged In: YES
    user_id=735003

    These changes should fix the problem.

     
  • Logged In: YES
    user_id=735003

    Argh! typo. Tested by deleting a db file and running
    rkhunter --update. OK.

     
  • Changes to fix missind/corrupted file problem.

     
    Attachments
  • unSpawn
    unSpawn
    2006-10-25

    Logged In: YES
    user_id=600864

    > rkhunter --update. OK.
    To be clear: does this mean this issue is resolved?

     
  • Logged In: YES
    user_id=735003

    Only on one of my machines. Unless you accept the patch,
    the potential problem will continue to exist on every other
    machine that uses rkhunter. It is up to you to decide if
    you want to use the patch I provided. Until you do that,
    the issue is NOT resolved.

     
  • John Horne
    John Horne
    2007-01-13

    • status: open --> closed-fixed
     
  • John Horne
    John Horne
    2007-01-13

    Logged In: YES
    user_id=665381
    Originator: NO

    Fixed in CVS. Use of '--update' will update files if version number is invalid or non-existent, or file is missing. Will also work if 'mirrors.dat' file is missing. Returned error code is correctly set. Note, new version numbering format used in dat files. Included check that gunzip command is available (previous version didn't check this.)

    John.