Commit 3ef768b7 authored by evgen@moonbone.local's avatar evgen@moonbone.local

Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0

into moonbone.local:/work/tmp_merge-5.0-opt-mysql
parents c9482566 fa98891e
...@@ -31,7 +31,7 @@ noinst_HEADERS = config-win.h config-os2.h config-netware.h \ ...@@ -31,7 +31,7 @@ noinst_HEADERS = config-win.h config-os2.h config-netware.h \
my_aes.h my_tree.h hash.h thr_alarm.h \ my_aes.h my_tree.h hash.h thr_alarm.h \
thr_lock.h t_ctype.h violite.h md5.h base64.h \ thr_lock.h t_ctype.h violite.h md5.h base64.h \
mysql_version.h.in my_handler.h my_time.h decimal.h \ mysql_version.h.in my_handler.h my_time.h decimal.h \
my_user.h my_user.h my_libwrap.h
# mysql_version.h are generated # mysql_version.h are generated
CLEANFILES = mysql_version.h my_config.h readline openssl CLEANFILES = mysql_version.h my_config.h readline openssl
......
/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifdef HAVE_LIBWRAP
#include <tcpd.h>
#include <syslog.h>
#ifdef NEED_SYS_SYSLOG_H
#include <sys/syslog.h>
#endif /* NEED_SYS_SYSLOG_H */
extern void my_fromhost(struct request_info *req);
extern int my_hosts_access(struct request_info *req);
extern char *my_eval_client(struct request_info *req);
#endif /* HAVE_LIBWRAP */
...@@ -56,7 +56,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \ ...@@ -56,7 +56,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \
my_gethostbyname.c rijndael.c my_aes.c sha1.c \ my_gethostbyname.c rijndael.c my_aes.c sha1.c \
my_handler.c my_netware.c my_largepage.c \ my_handler.c my_netware.c my_largepage.c \
my_memmem.c \ my_memmem.c \
my_windac.c my_access.c base64.c my_windac.c my_access.c base64.c my_libwrap.c
EXTRA_DIST = thr_alarm.c thr_lock.c my_pthread.c my_thr_init.c \ EXTRA_DIST = thr_alarm.c thr_lock.c my_pthread.c my_thr_init.c \
thr_mutex.c thr_rwlock.c thr_mutex.c thr_rwlock.c
libmysys_a_LIBADD = @THREAD_LOBJECTS@ libmysys_a_LIBADD = @THREAD_LOBJECTS@
......
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
This is needed to be able to compile with original libwrap header
files that don't have the prototypes
*/
#include <my_global.h>
#include <my_libwrap.h>
#ifdef HAVE_LIBWRAP
void my_fromhost(struct request_info *req)
{
fromhost(req);
}
int my_hosts_access(struct request_info *req)
{
hosts_access(req);
}
char *my_eval_client(struct request_info *req)
{
eval_client(req);
}
#endif /* HAVE_LIBWRAP */
...@@ -120,16 +120,7 @@ extern "C" { // Because of SCO 3.2V4.2 ...@@ -120,16 +120,7 @@ extern "C" { // Because of SCO 3.2V4.2
#include <sys/utsname.h> #include <sys/utsname.h>
#endif /* __WIN__ */ #endif /* __WIN__ */
#ifdef HAVE_LIBWRAP #include <my_libwrap.h>
#include <tcpd.h>
#include <syslog.h>
#ifdef NEED_SYS_SYSLOG_H
#include <sys/syslog.h>
#endif /* NEED_SYS_SYSLOG_H */
int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING;
#endif /* HAVE_LIBWRAP */
#ifdef HAVE_SYS_MMAN_H #ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h> #include <sys/mman.h>
...@@ -591,6 +582,8 @@ static const char* default_dbug_option; ...@@ -591,6 +582,8 @@ static const char* default_dbug_option;
#endif #endif
#ifdef HAVE_LIBWRAP #ifdef HAVE_LIBWRAP
const char *libwrapName= NULL; const char *libwrapName= NULL;
int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING;
#endif #endif
#ifdef HAVE_QUERY_CACHE #ifdef HAVE_QUERY_CACHE
static ulong query_cache_limit= 0; static ulong query_cache_limit= 0;
...@@ -4072,8 +4065,8 @@ pthread_handler_t handle_connections_sockets(void *arg __attribute__((unused))) ...@@ -4072,8 +4065,8 @@ pthread_handler_t handle_connections_sockets(void *arg __attribute__((unused)))
struct request_info req; struct request_info req;
signal(SIGCHLD, SIG_DFL); signal(SIGCHLD, SIG_DFL);
request_init(&req, RQ_DAEMON, libwrapName, RQ_FILE, new_sock, NULL); request_init(&req, RQ_DAEMON, libwrapName, RQ_FILE, new_sock, NULL);
fromhost(&req); my_fromhost(&req);
if (!hosts_access(&req)) if (!my_hosts_access(&req))
{ {
/* /*
This may be stupid but refuse() includes an exit(0) This may be stupid but refuse() includes an exit(0)
...@@ -4081,7 +4074,7 @@ pthread_handler_t handle_connections_sockets(void *arg __attribute__((unused))) ...@@ -4081,7 +4074,7 @@ pthread_handler_t handle_connections_sockets(void *arg __attribute__((unused)))
clean_exit() - same stupid thing ... clean_exit() - same stupid thing ...
*/ */
syslog(deny_severity, "refused connect from %s", syslog(deny_severity, "refused connect from %s",
eval_client(&req)); my_eval_client(&req));
/* /*
C++ sucks (the gibberish in front just translates the supplied C++ sucks (the gibberish in front just translates the supplied
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment