Re: Security question: "Text file busy" overwriting executables but not shared libraries?

Jamie Lokier
2001-10-13T19:07:47Z

Pablo Alcaraz wrote:
> Whatever will be the chosen solution, it would have to allow to
> overwrite all the executables and libraries files (if we have enough
> permissions).

Pablo, there's no need for this. Upgrades to libraries are done by
removing the old file's name from its parent directory and placing the
new file at that name, perhaps using an atomic rename. The old _file_
continues to exist even though its name has been deleted, until the last
program using the library finishes using it, even though the old file
does not have a name any more.

New programs that open the library will find the new file. Both files
exist until the old file finally disappears. At no point is any file's
contents overwritten.

This is why you can upgrade a running linux system including critical
system libraries, and nothing crashes. Usually ;-)

-- Jamie