Bug 76076 - Evil interaction between RH7.3 libwrap and MySQL tarball as downloaded from mysql.com
Summary: Evil interaction between RH7.3 libwrap and MySQL tarball as downloaded from m...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mysql
Version: 7.3
Hardware: i686
OS: Linux
medium
low
Target Milestone: ---
Assignee: Patrick Macdonald
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-16 16:32 UTC by David Tonhofer
Modified: 2007-04-18 16:47 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-03-27 14:52:12 UTC
Embargoed:


Attachments (Terms of Use)

Description David Tonhofer 2002-10-16 16:32:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

Description of problem:

This is an error that 'falls between the cracks' i.e. it's not a
real MySQL bug, not a real RedHat bug, not a real libwrap bug. Just wanted to 
share it though. So:

When compiling a mysql-3.23.52 tarball as downloaded from the mysql.com site 
directly (i.e. NOT the RPM but the tar.gz) with the configure option "--with-
libwrap" an error occurs:

mysqld.cc:2444: at this point in file
/usr/include/tcpd.h:69: too many arguments to function `int hosts_access ()'
mysqld.cc:2445: at this point in file
/usr/include/tcpd.h:124: too many arguments to function `char *eval_client ()'
mysqld.cc:2453: at this point in file

A quick look-see tells us:

1) We are using tcp_wrappers-7.6-19 on RH 7.3
2) The header files for tcp_wrappers on RH7.3 are not the ones that
   MySQL expects. Here is what is on our machine. The calls
   exported are PARAMETERLESS:

   extern char *eval_user();               /* client user */
   extern char *eval_hostname();           /* printable hostname */
   extern char *eval_hostaddr();           /* printable host address */
   extern char *eval_hostinfo();           /* host name or address */
   extern char *eval_client();             /* whatever is available */
   extern char *eval_server();             /* whatever is available */

3) This does NOT match the stuff from OpenBSD for example
   http://openbsd.secsup.org/src/lib/libwrap/tcpd.h

   extern char *eval_user(struct request_info *);
   extern char *eval_hostname(struct host_info *);
   extern char *eval_hostaddr(struct host_info *);
   extern char *eval_hostinfo(struct host_info *);
   extern char *eval_client(struct request_info *);
   extern char *eval_server(struct request_info *);

4) This error is known. Many people have run up against this, just
   google around a bit.

5) Conclusion: Extremely strange. Do NOT use --with-libwrap if the
   above occurs. Where do these .h files come from?

How reproducible:
Always

Steps to Reproduce:
1. configure --with-libwrap (and others)
2. make
3. f00!
	
Actual Results:
Unexpected

Expected Results:
make should work

Comment 1 Miloslav Trmac 2002-10-17 11:24:15 UTC
They are not parameterless in C (just a K&R function declaration),
but they are in C++. The headers in RH package are not C++ compatible.
Current rawhide is the same.

Comment 2 Patrick Macdonald 2003-03-27 14:52:12 UTC
The header file in question comes from the tcp_wrappers package.  This evil
interaction has been corrected in tcp_wrappers-7.6-34.i386.rpm (current
version).

The prototypes in question are now defined as:
extern char *eval_user __P((struct request_info *));  
extern char *eval_hostname __P((struct host_info *));
extern char *eval_hostaddr __P((struct host_info *));
extern char *eval_hostinfo __P((struct host_info *)); 
extern char *eval_client __P((struct request_info *));
extern char *eval_server __P((struct request_info *));

Verifed using --with-libwrap on configure of MySQL 3.23.56.

Thanks for pointing this out.

Comment 3 Guðmundur D. H. 2003-07-03 17:36:12 UTC
Just for the cross-reference, this has been reported here too:
http://bugs.mysql.com/bug.php?id=599&thanks=3

Comment 4 David Tonhofer 2003-07-03 22:22:57 UTC
Hehehe...And it still exists in RH8.0 too. Shouldn't it be reopened?

Comment 5 David Tonhofer 2003-07-03 23:07:03 UTC
Oops, sorry. I have been working too late again: Do not reopen as it has 
apparently been fixed in RH9.0 (did not verify personally though ;-)


Note You need to log in before you can comment on or make changes to this bug.