Re: stat to open race condition (was Re: [Integrit-users] Re: integrit)
Brought to you by:
ecashin
From: Ed L C. <ec...@co...> - 2001-02-20 23:02:44
|
lumpy <lu...@9m...> writes: > Probably, the only reason i said its not SO important is that if the > file that its link to changes, itll still report an error. at most > youre wasting the time to read the file to make the checksum. Other > than that, your program will basically work the same, because if > youre statting the destination of the link, youll know if hte link > has changed. make sense? I don't want to ever follow symlinks. If a sysadmin says, "don't check /proc" or "don't check /mnt/remote_hosts", then integrit shouldn't go there, even via a symlink. integrit treats symlinks in /home/foo as symlinks in /home/foo, not as files in some random place. It's the natural thing to do. In order to avoid following symlinks, lstat is necessary. > btw, i forgot to say, this project kicks ass. rock on. Thanks! I agree. :) And I was already going to say that I forgot to thank you for pointing out an interesting and real race condition that could hang integrit. -- --Ed Cashin integrit file verification system ec...@co... http://integrit.sourceforge.net/ |