diff options
author | Tatiana A. Nurnberg <azundris@mysql.com> | 2009-03-25 17:10:27 +0100 |
---|---|---|
committer | Tatiana A. Nurnberg <azundris@mysql.com> | 2009-03-25 17:10:27 +0100 |
commit | de8042d0070f96c016b992df10a55298fed327e2 (patch) | |
tree | 614992e6f19dd83bdb1c245ecf6daf014bb2463d /sql/sql_class.cc | |
parent | 08626e800ef30a9246e8fb6fb4280b1f7ccbfb65 (diff) | |
download | mariadb-git-de8042d0070f96c016b992df10a55298fed327e2.tar.gz |
Bug#43748: crash when non-super user tries to kill the replication threads
Fine-tuning. Broke out comparison into method by
suggestion of Davi. Clarified comments. Reverting
test-case which I find too brittle; proper test
case in 5.1+.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 74bc669a049..aa796d6acbd 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -2144,6 +2144,13 @@ void Security_context::skip_grants() } +bool Security_context::user_matches(Security_context *them) +{ + return ((user != NULL) && (them->user != NULL) && + !strcmp(user, them->user)); +} + + /**************************************************************************** Handling of open and locked tables states. |