Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
12fe476d
Commit
12fe476d
authored
Apr 29, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
parents
7aad1c8b
5798f886
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
19 deletions
+23
-19
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
sql/item_create.cc
sql/item_create.cc
+1
-1
sql/sql_acl.cc
sql/sql_acl.cc
+10
-8
sql/sql_acl.h
sql/sql_acl.h
+2
-1
sql/sql_class.h
sql/sql_class.h
+2
-3
sql/sql_db.cc
sql/sql_db.cc
+2
-2
sql/sql_parse.cc
sql/sql_parse.cc
+5
-4
No files found.
BitKeeper/etc/logging_ok
View file @
12fe476d
...
@@ -79,6 +79,7 @@ salle@geopard.(none)
...
@@ -79,6 +79,7 @@ salle@geopard.(none)
salle@geopard.online.bg
salle@geopard.online.bg
sasha@mysql.sashanet.com
sasha@mysql.sashanet.com
serg@build.mysql2.com
serg@build.mysql2.com
serg@serg.mylan
serg@serg.mysql.com
serg@serg.mysql.com
serg@sergbook.mysql.com
serg@sergbook.mysql.com
sinisa@rhols221.adsl.netsonic.fi
sinisa@rhols221.adsl.netsonic.fi
...
...
sql/item_create.cc
View file @
12fe476d
...
@@ -297,7 +297,7 @@ Item *create_func_current_user()
...
@@ -297,7 +297,7 @@ Item *create_func_current_user()
char
buff
[
HOSTNAME_LENGTH
+
USERNAME_LENGTH
+
2
];
char
buff
[
HOSTNAME_LENGTH
+
USERNAME_LENGTH
+
2
];
uint
length
;
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
);
buff
);
return
new
Item_string
(
NullS
,
thd
->
memdup
(
buff
,
length
),
length
);
return
new
Item_string
(
NullS
,
thd
->
memdup
(
buff
,
length
),
length
);
}
}
...
...
sql/sql_acl.cc
View file @
12fe476d
...
@@ -114,7 +114,7 @@ static ACL_USER *find_acl_user(const char *host, const char *user);
...
@@ -114,7 +114,7 @@ static ACL_USER *find_acl_user(const char *host, const char *user);
static
bool
update_user_table
(
THD
*
thd
,
const
char
*
host
,
const
char
*
user
,
static
bool
update_user_table
(
THD
*
thd
,
const
char
*
host
,
const
char
*
user
,
const
char
*
new_password
);
const
char
*
new_password
);
static
void
update_hostname
(
acl_host_and_ip
*
host
,
const
char
*
hostname
);
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
);
const
char
*
ip
);
/*
/*
...
@@ -492,7 +492,8 @@ static int acl_compare(ACL_ACCESS *a,ACL_ACCESS *b)
...
@@ -492,7 +492,8 @@ static int acl_compare(ACL_ACCESS *a,ACL_ACCESS *b)
*/
*/
ulong
acl_getroot
(
THD
*
thd
,
const
char
*
host
,
const
char
*
ip
,
const
char
*
user
,
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
)
bool
old_ver
,
USER_RESOURCES
*
mqh
)
{
{
ulong
user_access
=
NO_ACCESS
;
ulong
user_access
=
NO_ACCESS
;
...
@@ -622,6 +623,7 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
...
@@ -622,6 +623,7 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
*
mqh
=
acl_user
->
user_resource
;
*
mqh
=
acl_user
->
user_resource
;
if
(
!
acl_user
->
user
)
if
(
!
acl_user
->
user
)
*
priv_user
=
(
char
*
)
""
;
// Change to anonymous user /* purecov: inspected */
*
priv_user
=
(
char
*
)
""
;
// Change to anonymous user /* purecov: inspected */
*
priv_host
=
acl_user
->
host
.
hostname
;
break
;
break
;
}
}
#ifndef ALLOW_DOWNGRADE_OF_USERS
#ifndef ALLOW_DOWNGRADE_OF_USERS
...
...
sql/sql_acl.h
View file @
12fe476d
...
@@ -87,7 +87,8 @@ void acl_free(bool end=0);
...
@@ -87,7 +87,8 @@ void acl_free(bool end=0);
ulong
acl_get
(
const
char
*
host
,
const
char
*
ip
,
const
char
*
bin_ip
,
ulong
acl_get
(
const
char
*
host
,
const
char
*
ip
,
const
char
*
bin_ip
,
const
char
*
user
,
const
char
*
db
);
const
char
*
user
,
const
char
*
db
);
ulong
acl_getroot
(
THD
*
thd
,
const
char
*
host
,
const
char
*
ip
,
const
char
*
user
,
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
old_ver
,
USER_RESOURCES
*
max
);
bool
acl_check_host
(
const
char
*
host
,
const
char
*
ip
);
bool
acl_check_host
(
const
char
*
host
,
const
char
*
ip
);
bool
check_change_password
(
THD
*
thd
,
const
char
*
host
,
const
char
*
user
);
bool
check_change_password
(
THD
*
thd
,
const
char
*
host
,
const
char
*
user
);
...
...
sql/sql_class.h
View file @
12fe476d
...
@@ -351,7 +351,7 @@ class THD :public ilink
...
@@ -351,7 +351,7 @@ class THD :public ilink
db - currently selected database
db - currently selected database
ip - client IP
ip - client IP
*/
*/
char
*
host
,
*
user
,
*
priv_user
,
*
db
,
*
ip
;
char
*
host
,
*
user
,
*
priv_user
,
*
priv_host
,
*
db
,
*
ip
;
/* remote (peer) port */
/* remote (peer) port */
uint16
peer_port
;
uint16
peer_port
;
/* Points to info-string that will show in SHOW PROCESSLIST */
/* Points to info-string that will show in SHOW PROCESSLIST */
...
@@ -366,7 +366,6 @@ class THD :public ilink
...
@@ -366,7 +366,6 @@ class THD :public ilink
ulong
master_access
;
/* Global privileges from mysql.user */
ulong
master_access
;
/* Global privileges from mysql.user */
ulong
db_access
;
/* Privileges for current db */
ulong
db_access
;
/* Privileges for current db */
/*
/*
open_tables - list of regular tables in use by this thread
open_tables - list of regular tables in use by this thread
temporary_tables - list of temp tables in use by this thread
temporary_tables - list of temp tables in use by this thread
...
...
sql/sql_db.cc
View file @
12fe476d
...
@@ -362,11 +362,11 @@ bool mysql_change_db(THD *thd,const char *name)
...
@@ -362,11 +362,11 @@ bool mysql_change_db(THD *thd,const char *name)
{
{
net_printf
(
&
thd
->
net
,
ER_DBACCESS_DENIED_ERROR
,
net_printf
(
&
thd
->
net
,
ER_DBACCESS_DENIED_ERROR
,
thd
->
priv_user
,
thd
->
priv_user
,
thd
->
host_or_ip
,
thd
->
priv_host
,
dbname
);
dbname
);
mysql_log
.
write
(
thd
,
COM_INIT_DB
,
ER
(
ER_DBACCESS_DENIED_ERROR
),
mysql_log
.
write
(
thd
,
COM_INIT_DB
,
ER
(
ER_DBACCESS_DENIED_ERROR
),
thd
->
priv_user
,
thd
->
priv_user
,
thd
->
host_or_ip
,
thd
->
priv_host
,
dbname
);
dbname
);
my_free
(
dbname
,
MYF
(
0
));
my_free
(
dbname
,
MYF
(
0
));
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
...
...
sql/sql_parse.cc
View file @
12fe476d
...
@@ -186,7 +186,7 @@ static int get_or_create_user_conn(THD *thd, const char *user,
...
@@ -186,7 +186,7 @@ static int get_or_create_user_conn(THD *thd, const char *user,
/*
/*
Check if user is ok
Check if user is ok
Updates:
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
,
static
bool
check_user
(
THD
*
thd
,
enum_server_command
command
,
const
char
*
user
,
...
@@ -205,7 +205,8 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
...
@@ -205,7 +205,8 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
return
1
;
return
1
;
}
}
thd
->
master_access
=
acl_getroot
(
thd
,
thd
->
host
,
thd
->
ip
,
thd
->
user
,
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
||
protocol_version
==
9
||
!
(
thd
->
client_capabilities
&
!
(
thd
->
client_capabilities
&
CLIENT_LONG_PASSWORD
),
&
ur
);
CLIENT_LONG_PASSWORD
),
&
ur
);
...
@@ -2566,7 +2567,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
...
@@ -2566,7 +2567,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
if
(
!
no_errors
)
if
(
!
no_errors
)
net_printf
(
&
thd
->
net
,
ER_ACCESS_DENIED_ERROR
,
net_printf
(
&
thd
->
net
,
ER_ACCESS_DENIED_ERROR
,
thd
->
priv_user
,
thd
->
priv_user
,
thd
->
host_or_ip
,
thd
->
priv_host
,
thd
->
password
?
ER
(
ER_YES
)
:
ER
(
ER_NO
));
/* purecov: tested */
thd
->
password
?
ER
(
ER_YES
)
:
ER
(
ER_NO
));
/* purecov: tested */
DBUG_RETURN
(
TRUE
);
/* purecov: tested */
DBUG_RETURN
(
TRUE
);
/* purecov: tested */
}
}
...
@@ -2591,7 +2592,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
...
@@ -2591,7 +2592,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
if
(
!
no_errors
)
if
(
!
no_errors
)
net_printf
(
&
thd
->
net
,
ER_DBACCESS_DENIED_ERROR
,
net_printf
(
&
thd
->
net
,
ER_DBACCESS_DENIED_ERROR
,
thd
->
priv_user
,
thd
->
priv_user
,
thd
->
host_or_ip
,
thd
->
priv_host
,
db
?
db
:
thd
->
db
?
thd
->
db
:
"unknown"
);
/* purecov: tested */
db
?
db
:
thd
->
db
?
thd
->
db
:
"unknown"
);
/* purecov: tested */
DBUG_RETURN
(
TRUE
);
/* purecov: tested */
DBUG_RETURN
(
TRUE
);
/* purecov: tested */
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment