403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/mysql/mysql-test/main/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/main/grant_kill.test
-- source include/not_embedded.inc

--echo #
--echo # Start of 10.5 tests
--echo #

--echo #
--echo # MDEV-21743 Split up SUPER privilege to smaller privileges 
--echo #
--disable_service_connection

--echo #
--echo # Test that KILL is not allowed without CONNECTION ADMIN or SUPER
--echo #

CREATE USER foo@localhost;
GRANT SELECT ON *.* TO foo@localhost;
CREATE USER bar@localhost;
GRANT ALL PRIVILEGES ON *.* TO bar@localhost;
REVOKE CONNECTION ADMIN, SUPER ON *.* FROM bar@localhost;
--connect (foo,localhost,foo,,)
let $id=`select connection_id()`;
--connect (bar,localhost,bar,,)
evalp SELECT user FROM information_schema.processlist WHERE id=$id;
--replace_result $id ID
--error ER_KILL_DENIED_ERROR
--eval KILL $id
--disconnect foo
--disconnect bar
--connection default
DROP USER foo@localhost;
DROP USER bar@localhost;

--echo #
--echo # Test that KILL is allowed with CONNECTION ADMIN
--echo #

CREATE USER foo@localhost;
GRANT SELECT ON *.* TO foo@localhost;
CREATE USER bar@localhost;
GRANT PROCESS, CONNECTION ADMIN ON *.* TO bar@localhost;
--connect (foo,localhost,foo,,)
let $id=`select connection_id()`;
--connect (bar,localhost,bar,,)
evalp SELECT user FROM information_schema.processlist WHERE id=$id;
--replace_result $id ID
--eval KILL $id
--connection default
let $wait_condition=
    select count(*) = 0 from information_schema.processlist
    where user = "foo";
--source include/wait_condition.inc
--disconnect foo
--disconnect bar
DROP USER foo@localhost;
DROP USER bar@localhost;

--echo #
--echo # Test that KILL is allowed with SUPER
--echo #

CREATE USER foo@localhost;
GRANT SELECT ON *.* TO foo@localhost;
CREATE USER bar@localhost;
GRANT PROCESS, SUPER ON *.* TO bar@localhost;
--connect (foo,localhost,foo,,)
let $id=`select connection_id()`;
--connect (bar,localhost,bar,,)
evalp SELECT user FROM information_schema.processlist WHERE id=$id;
--replace_result $id ID
--eval KILL $id
--connection default
let $wait_condition=
    select count(*) = 0 from information_schema.processlist
    where user = "foo";
--source include/wait_condition.inc
--disconnect foo
--disconnect bar
DROP USER foo@localhost;
DROP USER bar@localhost;

--enable_service_connection

--echo #
--echo # End of 10.5 tests
--echo #

Youez - 2016 - github.com/yon3zu
LinuXploit