Re: stat to open race condition (was Re: [Integrit-users] Re: integrit)
Brought to you by:
ecashin
From: lumpy <lu...@9m...> - 2001-02-20 22:39:27
|
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? btw, i forgot to say, this project kicks ass. rock on. On 20 Feb 2001, Ed L Cashin wrote: > lumpy <lu...@9m...> writes: > > > If instead of the double stat, you opened it and passed a > > descriptor, you would get around the race, although, you would still > > have to do another check if the file was a symlink (if you cared, > > but, thats really not so important in this particular scenario) > > Yeah, you have to do the lstat first so that you don't follow > symlinks. > > -- > --Ed Cashin integrit file verification system > ec...@co... http://integrit.sourceforge.net/ > |