• Georgi Kodinov's avatar
    Bug#43748: crash when non-super user tries to kill the replication threads · 9536bd65
    Georgi Kodinov authored
    (Pushing for Azundris)
          
    We allow security-contexts with NULL users (for
    system-threads and for unauthenticated users).
    If a non-SUPER-user tried to KILL such a thread,
    we tried to compare the user-fields to see whether
    they owned that thread. Comparing against NULL was
    not a good idea.
          
    If KILLer does not have SUPER-privilege, we
    specifically check whether both KILLer and KILLee
    have a non-NULL user before testing for string-
    equality. If either is NULL, we reject the KILL.
    
    mysql-test/r/rpl_temporary.result:
      Try to have a non-SUPER user KILL a system thread.
    mysql-test/t/rpl_temporary.test:
      Try to have a non-SUPER user KILL a system thread.
    sql/sql_parse.cc:
      Make sure security contexts of both KILLer *and*
              KILLee are non-NULL before testing for string-equality!
    9536bd65
rpl_temporary.result 4.99 KB