On Tue, Nov 23, 2004 at 08:39:30PM +0200, Giorgos Keramidas wrote: > On 2004-11-23 18:19, Wiktor Niesiobedzki <bsd_at_w.evip.pl> wrote: > > w_at_portal:~$ gdb =putty putty.core [...] > > As we may see, putty defines sk_new function and function of the same name > > exists in libcrypto (in /usr/src/crypto/openssl/crypto/stack/stack.c). > > Good catch :-) > > This is a Bad Idea(TM) most of the time though. The library > implements a function that other programs or libraries may depend upon > to work in certain ways. Replacing the library function with a > hand-rolled version may or may not work -- the latter in this case :-/ But nobody wants to replace this function, look: this function is 6 libraries away from the main program, i.e.: putty is linked to libglib12 and libc, from libc we load /usr/local/lib/nss_ldap, then libldap, then libssl and finally libcrypto... Should'nt libc load nss_ldap with kind of RTLD_LOCAL, so the libc will load libldap in another symbol-space so symbol lookups will not end in main program (if it is at all possible... I'm not familiar with dynamic linking)? If not, then it is the fact, that programmer of any program should aviod duplicating function names across every library that may eventually be installed and somehow linked to this programm, what sounds rather ridiculous to me. > > > And now my question: should the putty change the function name (what > > sound wired) or there should be done some magic in libcrypto, so > > such situations would not happen (what sounds tricky)? > > PuTTY can change the name of a function internal to the application a > lot easier than a library. Changing the library affects all the > programs linked to it, which is bound to be a lot more painful than > changing putty. But it will not resolve similiar problems in future... Cheers, Wiktor NiesiobedzkiReceived on Tue Nov 23 2004 - 17:59:26 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:23 UTC