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 | e46c139dd81081aceb27902ee4b632904cae292b (patch) | |
tree | 614992e6f19dd83bdb1c245ecf6daf014bb2463d /sql/sql_class.cc | |
parent | 9536bd657b2c6d3228009189c7c17a028342b8f5 (diff) | |
download | mariadb-git-e46c139dd81081aceb27902ee4b632904cae292b.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. |