mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
unix_socket fails in some build environments when $USER variable
appears to be unset, or when it contains 'root' even though the user does not have real root permissions
This commit is contained in:
@ -3,10 +3,23 @@
|
|||||||
# get .result differences from CURRENT_USER().
|
# get .result differences from CURRENT_USER().
|
||||||
--source include/not_as_root.inc
|
--source include/not_as_root.inc
|
||||||
|
|
||||||
|
# The previous check verifies that the user does not have root permissions.
|
||||||
|
# However in some cases tests are run under a user named 'root',
|
||||||
|
# even although this user does not have real root permissions.
|
||||||
|
# This test should be skipped in this case, since it does not expect
|
||||||
|
# that there are records in mysql.user where user=<username>
|
||||||
|
if ($USER=="root") {
|
||||||
|
skip Cannot be run by user named 'root' even if it does not have all privileges;
|
||||||
|
}
|
||||||
|
|
||||||
if (!$AUTH_SOCKET_SO) {
|
if (!$AUTH_SOCKET_SO) {
|
||||||
skip No auth_socket plugin;
|
skip No auth_socket plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$USER) {
|
||||||
|
skip USER variable is undefined;
|
||||||
|
}
|
||||||
|
|
||||||
let $plugindir=`SELECT @@global.plugin_dir`;
|
let $plugindir=`SELECT @@global.plugin_dir`;
|
||||||
|
|
||||||
eval install plugin unix_socket soname '$AUTH_SOCKET_SO';
|
eval install plugin unix_socket soname '$AUTH_SOCKET_SO';
|
||||||
|
Reference in New Issue
Block a user