Commit 50bd606d authored by unknown's avatar unknown
Browse files

A fix (bug #5652: [patch] tcpwrapper support is broken on systems using an unmodified tcpwrapper).



sql/mysqld.cc:
  A fix (bug #5652: [patch] tcpwrapper support is broken on systems using an unmodified tcpwrapper).
  Wrapper for fromhost, hosts_access, eval_client has been removed.
parent 8feedada
Loading
Loading
Loading
Loading
+3 −12
Original line number Diff line number Diff line
@@ -107,15 +107,6 @@ extern "C" { // Because of SCO 3.2V4.2
int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING;

#ifdef __STDC__
#define my_fromhost(A)	   fromhost(A)
#define my_hosts_access(A) hosts_access(A)
#define my_eval_client(A)  eval_client(A)
#else
#define my_fromhost(A)	   fromhost()
#define my_hosts_access(A) hosts_access()
#define my_eval_client(A)  eval_client()
#endif
#endif /* HAVE_LIBWRAP */

#ifdef HAVE_SYS_MMAN_H
@@ -3240,8 +3231,8 @@ extern "C" pthread_handler_decl(handle_connections_sockets,
	struct request_info req;
	signal(SIGCHLD, SIG_DFL);
	request_init(&req, RQ_DAEMON, libwrapName, RQ_FILE, new_sock, NULL);
	my_fromhost(&req);
	if (!my_hosts_access(&req))
	fromhost(&req);
	if (!hosts_access(&req))
	{
	  /*
	    This may be stupid but refuse() includes an exit(0)
@@ -3249,7 +3240,7 @@ extern "C" pthread_handler_decl(handle_connections_sockets,
	    clean_exit() - same stupid thing ...
	  */
	  syslog(deny_severity, "refused connect from %s",
		 my_eval_client(&req));
		 eval_client(&req));

	  /*
	    C++ sucks (the gibberish in front just translates the supplied