Server IP : 104.21.38.3 / Your IP : 162.158.108.30 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/suite/sys_vars/t/ |
Upload File : |
############ mysql-test\t\sha256_password_proxy_users_log.test ################# # # #Variable Name: sha256_password # #Scope: SESSION # #Access Type: Dynamic # #Data Type: BOOLEAN # #Default Value: OFF # #Values: ON, OFF # # # # # #Creation Date: 2015-02-12 # #Author: Horst Hunger # # # #Description: Test Cases of Dynamic System Variable # # "sha256_password_proxy_users" # # to assure entries in general log. # # # ################################################################################ --echo ** Setup ** --echo # # Setup # SET @old_log_output= @@global.log_output; SET @old_general_log= @@global.general_log; SET @old_general_log_file= @@global.general_log_file; --replace_result $MYSQLTEST_VARDIR ... eval SET GLOBAL general_log_file = '$MYSQLTEST_VARDIR/log/proxy_general.log'; SET GLOBAL log_output = 'FILE,TABLE'; SET GLOBAL general_log= 'ON'; --source include/not_embedded.inc SET @default_sha256_password_proxy_users = @@global.sha256_password_proxy_users; SET @default_check_proxy_users = @@global.check_proxy_users; --echo '#----- 2.1.12.1 Test of general log entries. -------------------#' ################################### #Setting value OFF # ################################### SET Global sha256_password_proxy_users=OFF; ################################### #Setting up proxy accounts # ################################### --echo ** Creating new base user ** CREATE USER proxy_base@localhost; GRANT ALTER ON *.* TO proxy_base@localhost; --echo ** Creating new proxy user ** CREATE USER proxy_sha256@localhost IDENTIFIED WITH sha256_password; GRANT CREATE ON *.* TO proxy_sha256@localhost; GRANT PROXY ON proxy_base@localhost TO proxy_sha256@localhost; ################################### #Setting value ON # ################################### SET Global sha256_password_proxy_users=ON; --echo ** Connecting as proxy_sha256 with proxy mapping disabled (native mapping on) ** CONNECT (connd,localhost,proxy_sha256,,); SELECT CURRENT_USER(), USER(), @@session.proxy_user; SHOW GRANTS; --echo ** Connection default ** connection default; --echo ** Disconnecting connections ** DISCONNECT connd; ################################### #Setting check_proxy value ON # ################################### SET Global check_proxy_users=ON; --echo ** Connecting as proxy_sha256 with proxy mapping enabled ** CONNECT (connf,localhost,proxy_sha256,,); SELECT CURRENT_USER(), USER(), @@session.proxy_user; SHOW GRANTS; connection default; --echo ** Disconnecting connections ** DISCONNECT connf; ################################### #Analyzing general log # ################################### SET GLOBAL general_log= 'OFF'; #show general-logging to file is correct CREATE TABLE test_log (argument TEXT); --replace_result $MYSQLTEST_VARDIR ... eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/log/proxy_general.log' INTO TABLE test_log FIELDS TERMINATED BY '\n' LINES TERMINATED BY '\n'; SELECT count(argument) FROM test_log WHERE argument LIKE '%proxy_sha256@localhost on test%'; SELECT count(argument) FROM test_log WHERE argument LIKE '%proxy_sha256@localhost as proxy_base on test%'; DROP TABLE test_log; ################################### #Cleaning up # ################################### DROP USER proxy_base@localhost; DROP USER proxy_sha256@localhost; SET @@global.sha256_password_proxy_users = @default_sha256_password_proxy_users; SET @@global.check_proxy_users = @default_check_proxy_users; SET GLOBAL general_log_file= @old_general_log_file; SET GLOBAL general_log= @old_general_log; SET GLOBAL log_output= @old_log_output;