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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
82072418
Commit
82072418
authored
Mar 26, 2005
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Plain Diff
merged
parents
2dd1847b
b100adf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
sql/sql_acl.cc
sql/sql_acl.cc
+6
-2
No files found.
sql/sql_acl.cc
View file @
82072418
...
@@ -994,6 +994,9 @@ static void acl_insert_db(const char *user, const char *host, const char *db,
...
@@ -994,6 +994,9 @@ static void acl_insert_db(const char *user, const char *host, const char *db,
/*
/*
Get privilege for a host, user and db combination
Get privilege for a host, user and db combination
as db_is_pattern changes the semantics of comparison,
acl_cache is not used if db_is_pattern is set.
*/
*/
ulong
acl_get
(
const
char
*
host
,
const
char
*
ip
,
ulong
acl_get
(
const
char
*
host
,
const
char
*
ip
,
...
@@ -1013,7 +1016,7 @@ ulong acl_get(const char *host, const char *ip,
...
@@ -1013,7 +1016,7 @@ ulong acl_get(const char *host, const char *ip,
db
=
tmp_db
;
db
=
tmp_db
;
}
}
key_length
=
(
uint
)
(
end
-
key
);
key_length
=
(
uint
)
(
end
-
key
);
if
((
entry
=
(
acl_entry
*
)
acl_cache
->
search
(
key
,
key_length
)))
if
(
!
db_is_pattern
&&
(
entry
=
(
acl_entry
*
)
acl_cache
->
search
(
key
,
key_length
)))
{
{
db_access
=
entry
->
access
;
db_access
=
entry
->
access
;
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
...
@@ -1062,7 +1065,8 @@ ulong acl_get(const char *host, const char *ip,
...
@@ -1062,7 +1065,8 @@ ulong acl_get(const char *host, const char *ip,
}
}
exit:
exit:
/* Save entry in cache for quick retrieval */
/* Save entry in cache for quick retrieval */
if
((
entry
=
(
acl_entry
*
)
malloc
(
sizeof
(
acl_entry
)
+
key_length
)))
if
(
!
db_is_pattern
&&
(
entry
=
(
acl_entry
*
)
malloc
(
sizeof
(
acl_entry
)
+
key_length
)))
{
{
entry
->
access
=
(
db_access
&
host_access
);
entry
->
access
=
(
db_access
&
host_access
);
entry
->
length
=
key_length
;
entry
->
length
=
key_length
;
...
...
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