Mail Archives: djgpp-workers/2001/09/26/02:24:37
Hello.
Eli Zaretskii wrote:
> Are we sure that chdir is the only function that needs to be fixed to
> prevent disasters in the observed cases? For example, is it certain
> that "rm -rf" would bail out if chdir is fixed like you suggest?
The Fileutils 4.0 sources always check the return value of chdir. In
application code (src/*.c) it bails out, if there's an error. The library
code (lib/*.c) usually returns an error and in other cases behaves
differently, if chdir fails. In no cases is the return code ignored.
> What about a simple call to `remove' when the argument exceeds these
> limits?
Stating the obvious: If remove can't handle paths that chdir fails on,
then rm will still be broken.
Bye, Rich =]
--
Richard Dawe
http://www.phekda.freeserve.co.uk/richdawe/
- Raw text -