Detecting taint mode

Daniel Barlow dan at telent.net
Tue Feb 27 15:32:51 GMT 2007


David Cantrell wrote:
> Conveniently, I don't particularly want to run that stuff if you started
> as root and then dropped privs, which is the only other case I can think
> of where chdir(getcwd()) would fail.

Someone else may delete the current directory between the return of
getcwd and the call to chdir

For that matter, someone may delete the current directory before you
call getcwd, in which case chdir(undef) may have side-effects you
weren't expecting.


-dan




More information about the london.pm mailing list