Skip site navigation (1) Skip section navigation (2)

symbol name clash with md5_hash

From: Martin M√ľnstermann <mmuenstermann(at)betrusted(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: symbol name clash with md5_hash
Date: 2005-06-29 09:41:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

after linking my database client application with a crypto library (as 
shared library), I noticed that I couldn't connect to postgresql any 
longer. Error message was "Password authentication failed".

After some time I found out that the issue was caused by both the crypto 
library and defining the symbol md5_hash.
After renaming the function name (thanks to open source!), the error 
went away.

Wouldn't it be a good idea to have all exported symbols in 
carry a postgres related prefix like 'PQ', 'pq', or 'pg_' (most of them 
already do)? This way symbol name clashes would become less probable.

Symbols in question (postgresql 80 on solaris) include (nm | 
fgrep ' T '):
EncryptMD5, SockAddr_cidr_mask, check_sigpipe_handler, freeaddrinfo_all, 
getaddrinfo_all, getnameinfo_all, md5_hash, promote_v4_to_v6_addr, 
promote_v4_to_v6_mask, rangeSockAddr, set_noblock.

AFAICS these functions are used by the server and maybe not all of these 
functions need to be exported to the shared client libpq anyway?


pgsql-hackers by date

Next:From: Hannu KrosingDate: 2005-06-29 10:06:48
Subject: Re: Implementing SQL/PSM for PG 8.2 - debugger
Previous:From: Mark Cave-AylandDate: 2005-06-29 09:33:28
Subject: Re: Implementing SQL/PSM for PG 8.2 - debugger

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group