用于EagleEye3.0 规则集漏报和误报测试的示例项目,项目收集于github和gitee
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
1.2 KiB

--echo #
--echo # Bug#12688860 : SECURITY RECOMMENDATION: PASSWORDS ON CLI
--echo #
CREATE DATABASE b12688860_db;
CREATE TABLE b12688860_db.b12688860_tab (c1 INT);
--echo # Creating a temp sql file to be loaded.
--write_file $MYSQLTEST_VARDIR/tmp/b12688860_tab.sql
1
2
3
EOF
--exec $MYSQL_IMPORT -uroot --password="" b12688860_db $MYSQLTEST_VARDIR/tmp/b12688860_tab.sql 2>&1
SELECT * FROM b12688860_db.b12688860_tab;
DROP TABLE b12688860_db.b12688860_tab;
DROP DATABASE b12688860_db;
--echo # Dropping the temp file
--remove_file $MYSQLTEST_VARDIR/tmp/b12688860_tab.sql
--echo #
--echo # WL#2284: Increase the length of a user name
--echo #
CREATE USER 'user_with_length_32_abcdefghijkl'@'localhost';
GRANT ALL ON *.* TO 'user_with_length_32_abcdefghijkl'@'localhost';
--exec $MYSQL --host=127.0.0.1 -P $MASTER_MYPORT --user=user_with_length_32_abcdefghijkl --protocol=TCP -e "create table mysql.test(a int)"
--exec echo "" > $MYSQL_TMP_DIR/test.txt
--exec $MYSQL_IMPORT --host=127.0.0.1 -P $MASTER_MYPORT --user=user_with_length_32_abcdefghijkl --protocol=TCP --local mysql $MYSQL_TMP_DIR/test.txt
--echo # cleanup
DROP TABLE mysql.test;
DROP USER 'user_with_length_32_abcdefghijkl'@'localhost';
--remove_file $MYSQL_TMP_DIR/test.txt
--echo
--echo End of tests