[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cannot overwrite libc-2.2.5.so



-> You're saying that I must rename/delete the old one before attempting to
-> move or copy the new one from another location?  Maybe I'm not getting
-> something but can you explain how deleting/renaming the old one first
-> makes any difference?

if you copy new vile over old, you will overwrite the contents. when
modifying code file (binary or shared library), the running binary will
probably crash - binaries are mapped to memory and changing content will
affect code of running program, and there is big probability that it will
catch SIGBUS, SIGILL or SIGSEGV. Some of OSes won't allow you to overwrite
running code, some won't even allow to remove it (the second sucks pretty
much).

When moving old file to new one, or deleting the file, the file remains
opened by binaries and the new file will get new name. no file will be
overwriten. Note that the 'file' in unix systems is the inode, not directory
entry. 

Well, you need to satudy how inodes and hard links work to understand this.
try finding a FAQ about that, i hope that will explain how does it work...
-- 
 Matus "fantomas" Uhlar, uhlar@fantomas.sk ; http://www.fantomas.sk/
 Warning: I don't wish to receive spam to this address.
 Varovanie: Nezelam si na tuto adresu dostavat akukolvek reklamnu postu.
 99 percent of lawyers give the rest a bad name. 



Reply to: