#41 rdev attribute changed

CVS version
closed-fixed
5
2005-08-08
2005-08-08
Anonymous
No

The latest patch for do_md.c (1.9) and gen_list.c (1.12)
seems to have introduced a bug that will not allow
hashes to be calculated. Looking at the changes and
adding some debugs shows the problem has to do with
the value of the old fs stat rdev (fs.st_rdev) being reset if
the file is a symbolic link. However, the new fs stat is
being reset to zero for any file, not just a symbolic link.
The compare will always fail on rdev since unless it is a
symbolic link the old fs value will never be reset to zero
where as it will always be reset to zero in the new fs.

suggest you either add the tests for the file being a
symbolic link in do_md.c function calc_md. or modify
gen_list.c to reset the fs.st_rdev to zero if the DB_RDEV
attribute is not set.

Discussion

  • Richard van den Berg

    Logged In: YES
    user_id=330646

    I'll try to have a look at this. I am using the CVS version
    on my system for months, and I have not seen this bug appear.

    Can you give a reproducable test case? And your E-mail
    address would be nice as well. ;-)

     
  • Richard van den Berg

    • assigned_to: nobody --> rvdb
     
  • Richard van den Berg

    Logged In: YES
    user_id=330646

    It seems I overlooked resetting fs.st_rdev in gen_list.c in
    2 places when fixing bug #1169697. Thanks for spotting this.

    I'd still like to see a reproducable test case for this. I
    suspect stat() on my test systems works different than on
    your system. Which OS did you experience this on?

     
  • Richard van den Berg

    • status: open --> closed
     
  • Richard van den Berg

    Logged In: YES
    user_id=330646

    This bug/patch has been fixed in CVS. Please note that anonymous
    access to CVS lags about 2 hours behind the authenticated access
    that developers use.

    If you don't know how to use CVS, you can try the daily snapshot
    which within 24 hours should include this change:
    http://aide.sourceforge.net/aide-CVS-snapshot.tar.gz

     
  • Richard van den Berg

    • status: closed --> closed-fixed
     
  • Nobody/Anonymous

    Logged In: NO

    Thanks Richard.

    New patch worked. It now produces md5 and sha hashes
    with no errors.

    My system is cygwin under windows xp pro. The rdev
    element is set in the stat command. I don't know whether it is
    a valid value but it is definately a value other than zero.

     
  • Nobody/Anonymous

    Logged In: NO

    BTW:

    I didn't have a login and I am waiting for the email confirming
    my new login details. email is brent at caldaney dot com

     
  • Richard van den Berg

    Logged In: YES
    user_id=330646

    The Solaris man page for stat(2) says:

    st_rdev
    This field should be used only by administrative
    com-
    mands. It is valid only for block special or
    character
    special files and only has meaning on the system
    where
    the file was configured.

    Another user reported that st_rdev changed between calls to
    stat() thus preventing the calculation of hashes. I decided
    to zero it right after it is retrieved, unless DB_RDEV is
    set (which is currently never in aide).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks