logo       

bk commit into 4.0 tree (1.1485): msg#00404

db.mysql.devel

Subject: bk commit into 4.0 tree (1.1485)

Below is the list of changes that have just been committed into a local
4.0 repository of serg. When serg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
1.1485 03/04/29 00:15:18 serg@xxxxxxxxxx +7 -0
CURRENT_USER() and "access denied" error messages now report hostname exactly
as it was specified in the GRANT command (with wildcards, that is)

BitKeeper/etc/logging_ok
1.270 03/04/29 00:15:18 serg@xxxxxxxxxx +1 -0
Logging to logging@xxxxxxxxxxxxxxx accepted

sql/sql_parse.cc
1.309 03/04/29 00:15:09 serg@xxxxxxxxxx +5 -4
CURRENT_USER() and "access denied" error messages now report hostname
exactly as it was specified in the GRANT command (with wildcards, that is)

sql/sql_db.cc
1.57 03/04/29 00:15:09 serg@xxxxxxxxxx +2 -2
CURRENT_USER() and "access denied" error messages now report hostname
exactly as it was specified in the GRANT command (with wildcards, that is)

sql/sql_class.h
1.144 03/04/29 00:15:09 serg@xxxxxxxxxx +2 -3
CURRENT_USER() and "access denied" error messages now report hostname
exactly as it was specified in the GRANT command (with wildcards, that is)

sql/sql_acl.h
1.15 03/04/29 00:15:09 serg@xxxxxxxxxx +2 -1
CURRENT_USER() and "access denied" error messages now report hostname
exactly as it was specified in the GRANT command (with wildcards, that is)

sql/sql_acl.cc
1.94 03/04/29 00:15:09 serg@xxxxxxxxxx +10 -8
CURRENT_USER() and "access denied" error messages now report hostname
exactly as it was specified in the GRANT command (with wildcards, that is)

sql/item_create.cc
1.28 03/04/29 00:15:09 serg@xxxxxxxxxx +1 -1
CURRENT_USER() and "access denied" error messages now report hostname
exactly as it was specified in the GRANT command (with wildcards, that is)

# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: serg
# Host: serg.mylan
# Root: /usr/home/serg/Abk/mysql-4.0

--- 1.27/sql/item_create.cc Fri Feb 7 16:57:03 2003
+++ 1.28/sql/item_create.cc Tue Apr 29 00:15:09 2003
@@ -297,7 +297,7 @@
char buff[HOSTNAME_LENGTH+USERNAME_LENGTH+2];
uint length;

- length= (uint) (strxmov(buff, thd->priv_user, "@", thd->host_or_ip, NullS) -
+ length= (uint) (strxmov(buff, thd->priv_user, "@", thd->priv_host, NullS) -
buff);
return new Item_string(NullS, thd->memdup(buff, length), length);
}

--- 1.93/sql/sql_acl.cc Mon Apr 28 09:32:53 2003
+++ 1.94/sql/sql_acl.cc Tue Apr 29 00:15:09 2003
@@ -114,7 +114,7 @@
static bool update_user_table(THD *thd, const char *host, const char *user,
const char *new_password);
static void update_hostname(acl_host_and_ip *host, const char *hostname);
-static bool compare_hostname(const acl_host_and_ip *host, const char *hostname,
+static bool compare_hostname(const acl_host_and_ip *host,const char *hostname,
const char *ip);

/*
@@ -492,7 +492,8 @@
*/

ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
- const char *password,const char *message,char **priv_user,
+ const char *password,const char *message,
+ char **priv_user, char **priv_host,
bool old_ver, USER_RESOURCES *mqh)
{
ulong user_access=NO_ACCESS;
@@ -526,10 +527,10 @@
#ifdef HAVE_OPENSSL
Vio *vio=thd->net.vio;
/*
- In this point we know that user is allowed to connect
- from given host by given username/password pair. Now
- we check if SSL is required, if user is using SSL and
- if X509 certificate attributes are OK
+ In this point we know that user is allowed to connect
+ from given host by given username/password pair. Now
+ we check if SSL is required, if user is using SSL and
+ if X509 certificate attributes are OK
*/
switch (acl_user->ssl_type) {
case SSL_TYPE_NOT_SPECIFIED: // Impossible
@@ -577,7 +578,7 @@
X509* cert=SSL_get_peer_certificate(vio->ssl_);
DBUG_PRINT("info",("checkpoint 2"));
/* If X509 issuer is speified, we check it... */
- if (acl_user->x509_issuer)
+ if (acl_user->x509_issuer)
{
DBUG_PRINT("info",("checkpoint 3"));
char *ptr = X509_NAME_oneline(X509_get_issuer_name(cert), 0, 0);
@@ -605,7 +606,7 @@
if (strcmp(acl_user->x509_subject,ptr))
{
if (global_system_variables.log_warnings)
- sql_print_error("X509 subject mismatch: '%s' vs '%s'",
+ sql_print_error("X509 subject mismatch: '%s' vs '%s'",
acl_user->x509_subject, ptr);
user_access=NO_ACCESS;
}
@@ -622,6 +623,7 @@
*mqh=acl_user->user_resource;
if (!acl_user->user)
*priv_user=(char*) ""; // Change to anonymous user /* purecov:
inspected */
+ *priv_host=acl_user->host.hostname;
break;
}
#ifndef ALLOW_DOWNGRADE_OF_USERS

--- 1.14/sql/sql_acl.h Tue Oct 29 20:58:46 2002
+++ 1.15/sql/sql_acl.h Tue Apr 29 00:15:09 2003
@@ -87,7 +87,8 @@
ulong acl_get(const char *host, const char *ip, const char *bin_ip,
const char *user, const char *db);
ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
- const char *password,const char *scramble,char **priv_user,
+ const char *password,const char *scramble,
+ char **priv_user, char **priv_host,
bool old_ver, USER_RESOURCES *max);
bool acl_check_host(const char *host, const char *ip);
bool check_change_password(THD *thd, const char *host, const char *user);

--- 1.143/sql/sql_class.h Wed Mar 12 16:11:45 2003
+++ 1.144/sql/sql_class.h Tue Apr 29 00:15:09 2003
@@ -351,14 +351,14 @@
db - currently selected database
ip - client IP
*/
- char *host,*user,*priv_user,*db,*ip;
+ char *host,*user,*priv_user,*priv_host,*db,*ip;
/* remote (peer) port */
uint16 peer_port;
/* Points to info-string that will show in SHOW PROCESSLIST */
const char *proc_info;
/* points to host if host is available, otherwise points to ip */
const char *host_or_ip;
-
+
uint client_capabilities; /* What the client supports */
/* Determines if which non-standard SQL behaviour should be enabled */
uint sql_mode;
@@ -366,7 +366,6 @@
ulong master_access; /* Global privileges from mysql.user */
ulong db_access; /* Privileges for current db */

-
/*
open_tables - list of regular tables in use by this thread
temporary_tables - list of temp tables in use by this thread

--- 1.56/sql/sql_db.cc Wed Jan 29 18:12:48 2003
+++ 1.57/sql/sql_db.cc Tue Apr 29 00:15:09 2003
@@ -362,11 +362,11 @@
{
net_printf(&thd->net,ER_DBACCESS_DENIED_ERROR,
thd->priv_user,
- thd->host_or_ip,
+ thd->priv_host,
dbname);
mysql_log.write(thd,COM_INIT_DB,ER(ER_DBACCESS_DENIED_ERROR),
thd->priv_user,
- thd->host_or_ip,
+ thd->priv_host,
dbname);
my_free(dbname,MYF(0));
DBUG_RETURN(1);

--- 1.308/sql/sql_parse.cc Mon Apr 28 09:32:53 2003
+++ 1.309/sql/sql_parse.cc Tue Apr 29 00:15:09 2003
@@ -186,7 +186,7 @@
/*
Check if user is ok
Updates:
- thd->user, thd->master_access, thd->priv_user, thd->db, thd->db_access
+ thd->{user,master_access,priv_user,priv_host,db,db_access}
*/

static bool check_user(THD *thd,enum_server_command command, const char *user,
@@ -205,7 +205,8 @@
return 1;
}
thd->master_access=acl_getroot(thd, thd->host, thd->ip, thd->user,
- passwd, thd->scramble, &thd->priv_user,
+ passwd, thd->scramble,
+ &thd->priv_user, &thd->priv_host,
protocol_version == 9 ||
!(thd->client_capabilities &
CLIENT_LONG_PASSWORD),&ur);
@@ -2566,7 +2567,7 @@
if (!no_errors)
net_printf(&thd->net,ER_ACCESS_DENIED_ERROR,
thd->priv_user,
- thd->host_or_ip,
+ thd->priv_host,
thd->password ? ER(ER_YES) : ER(ER_NO));/* purecov: tested */
DBUG_RETURN(TRUE); /* purecov: tested */
}
@@ -2591,7 +2592,7 @@
if (!no_errors)
net_printf(&thd->net,ER_DBACCESS_DENIED_ERROR,
thd->priv_user,
- thd->host_or_ip,
+ thd->priv_host,
db ? db : thd->db ? thd->db : "unknown"); /* purecov: tested */
DBUG_RETURN(TRUE); /* purecov: tested */
}

--- 1.269/BitKeeper/etc/logging_ok Sat Apr 26 19:58:38 2003
+++ 1.270/BitKeeper/etc/logging_ok Tue Apr 29 00:15:18 2003
@@ -79,6 +79,7 @@
salle@xxxxxxxxxxxxxxxxx
sasha@xxxxxxxxxxxxxxxxxx
serg@xxxxxxxxxxxxxxxx
+serg@xxxxxxxxxx
serg@xxxxxxxxxxxxxx
serg@xxxxxxxxxxxxxxxxxx
sinisa@xxxxxxxxxxxxxxxxxxxxxxxxx

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:
http://lists.mysql.com/internals?unsub=gcdmd-internals@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise