Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
83de75d6
Commit
83de75d6
authored
Feb 19, 2019
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try harder to link unix_socket plugin statically
fix unix_socket tests to work if unix_socket is a built-in
parent
38bf9319
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
14 additions
and
50 deletions
+14
-50
cmake/build_configurations/mysql_release.cmake
cmake/build_configurations/mysql_release.cmake
+3
-3
debian/mariadb-server-10.4.install
debian/mariadb-server-10.4.install
+0
-1
mysql-test/include/have_unix_socket.inc
mysql-test/include/have_unix_socket.inc
+3
-2
mysql-test/include/have_unix_socket.opt
mysql-test/include/have_unix_socket.opt
+1
-0
mysql-test/main/failed_auth_unixsocket.result
mysql-test/main/failed_auth_unixsocket.result
+0
-6
mysql-test/main/failed_auth_unixsocket.test
mysql-test/main/failed_auth_unixsocket.test
+1
-17
mysql-test/suite/plugins/r/multiauth.result
mysql-test/suite/plugins/r/multiauth.result
+0
-2
mysql-test/suite/plugins/r/unix_socket.result
mysql-test/suite/plugins/r/unix_socket.result
+0
-2
mysql-test/suite/plugins/t/multiauth.test
mysql-test/suite/plugins/t/multiauth.test
+0
-2
mysql-test/suite/plugins/t/unix_socket.test
mysql-test/suite/plugins/t/unix_socket.test
+4
-13
plugin/auth_socket/CMakeLists.txt
plugin/auth_socket/CMakeLists.txt
+1
-1
scripts/mysql_install_db.sh
scripts/mysql_install_db.sh
+1
-1
No files found.
cmake/build_configurations/mysql_release.cmake
View file @
83de75d6
...
...
@@ -97,20 +97,20 @@ ELSEIF(RPM)
SET
(
CHECKMODULE /usr/bin/checkmodule CACHE STRING
""
)
SET
(
SEMODULE_PACKAGE /usr/bin/semodule_package CACHE STRING
""
)
SET
(
WITH_LIBARCHIVE ON CACHE STRING
""
)
SET
(
PLUGIN_AUTH_SOCKET YES
)
SET
(
PLUGIN_AUTH_SOCKET YES
CACHE STRING
""
)
ELSEIF
(
DEB
)
SET
(
WITH_SSL system CACHE STRING
""
)
SET
(
WITH_ZLIB system CACHE STRING
""
)
SET
(
WITH_LIBWRAP ON
)
SET
(
HAVE_EMBEDDED_PRIVILEGE_CONTROL ON
)
SET
(
WITH_LIBARCHIVE ON CACHE STRING
""
)
SET
(
PLUGIN_AUTH_SOCKET YES
)
SET
(
PLUGIN_AUTH_SOCKET YES
CACHE STRING
""
)
ELSE
()
SET
(
WITH_SSL bundled CACHE STRING
""
)
SET
(
WITH_ZLIB bundled CACHE STRING
""
)
SET
(
WITH_JEMALLOC static CACHE STRING
""
)
SET
(
WITH_LIBARCHIVE STATIC CACHE STRING
""
)
SET
(
PLUGIN_AUTH_SOCKET STATIC
)
SET
(
PLUGIN_AUTH_SOCKET STATIC
CACHE STRING
""
)
ENDIF
()
IF
(
NOT COMPILATION_COMMENT
)
...
...
debian/mariadb-server-10.4.install
View file @
83de75d6
...
...
@@ -40,7 +40,6 @@ usr/lib/mysql/plugin/auth_ed25519.so
usr
/
lib
/
mysql
/
plugin
/
auth_pam
.
so
usr
/
lib
/
mysql
/
plugin
/
auth_pam_tool_dir
/
auth_pam_tool
usr
/
lib
/
mysql
/
plugin
/
auth_pam_v1
.
so
usr
/
lib
/
mysql
/
plugin
/
auth_socket
.
so
usr
/
lib
/
mysql
/
plugin
/
disks
.
so
usr
/
lib
/
mysql
/
plugin
/
file_key_management
.
so
usr
/
lib
/
mysql
/
plugin
/
ha_archive
.
so
...
...
mysql-test/include/have_unix_socket.inc
View file @
83de75d6
--
source
include
/
not_embedded
.
inc
if
(
!
$AUTH_SOCKET_SO
)
{
skip
No
unix_socket
plugin
;
if
(
`select count(*) = 0 from information_schema.plugins where plugin_name = 'unix_socket' and plugin_status='active'`
)
{
--
skip
Needs
unix_socket
plugin
}
if
(
!
$USER
)
{
...
...
mysql-test/include/have_unix_socket.opt
0 → 100644
View file @
83de75d6
--plugin-load-add=$AUTH_SOCKET_SO --loose-enable-unix-socket
mysql-test/main/failed_auth_unixsocket.result
View file @
83de75d6
update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket');
flush privileges;
connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
ERROR HY000: Plugin 'unix_socket' is not loaded
ERROR HY000: Plugin 'unix_socket' is not loaded
install plugin unix_socket soname 'auth_socket.so';
flush privileges;
connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
ERROR 28000: Access denied for user 'USER'@'localhost'
ERROR 28000: Access denied for user 'USER'@'localhost'
update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin'));
flush privileges;
uninstall plugin unix_socket;
mysql-test/main/failed_auth_unixsocket.test
View file @
83de75d6
...
...
@@ -11,20 +11,6 @@ flush privileges;
# that matches other parts of the error message.
let
$replace
=
Access
denied
for
user
'$USER'
;
--
echo
connect
(
localhost
,
USER
,,
test
,
MASTER_PORT
,
MASTER_SOCKET
);
--
replace_result
$replace
"Access denied for user 'USER'"
--
disable_query_log
--
error
ER_PLUGIN_IS_NOT_LOADED
connect
(
fail
,
localhost
,
$USER
);
--
enable_query_log
--
replace_result
$replace
"Access denied for user 'USER'"
--
error
ER_PLUGIN_IS_NOT_LOADED
change_user
$USER
;
eval
install
plugin
unix_socket
soname
'$AUTH_SOCKET_SO'
;
flush
privileges
;
--
echo
connect
(
localhost
,
USER
,,
test
,
MASTER_PORT
,
MASTER_SOCKET
);
--
replace_result
$replace
"Access denied for user 'USER'"
--
disable_query_log
...
...
@@ -38,5 +24,3 @@ change_user $USER;
update
mysql
.
global_priv
set
priv
=
json_compact
(
json_remove
(
priv
,
'$.plugin'
));
flush
privileges
;
uninstall
plugin
unix_socket
;
mysql-test/suite/plugins/r/multiauth.result
View file @
83de75d6
install soname 'auth_socket';
install soname 'auth_ed25519';
create user USER identified via unix_socket OR mysql_native_password as password("GOOD");
create user mysqltest1 identified via unix_socket OR mysql_native_password as password("good");
...
...
@@ -190,5 +189,4 @@ select user(), current_user(), database();
user() current_user() database()
mysqltest1@localhost mysqltest1@% test
drop user mysqltest1;
uninstall soname 'auth_socket';
uninstall soname 'auth_ed25519';
mysql-test/suite/plugins/r/unix_socket.result
View file @
83de75d6
install plugin unix_socket soname 'auth_socket.so';
#
# with named user
#
...
...
@@ -28,4 +27,3 @@ USER@localhost @% test
#
delete from mysql.user where user='';
FLUSH PRIVILEGES;
uninstall plugin unix_socket;
mysql-test/suite/plugins/t/multiauth.test
View file @
83de75d6
...
...
@@ -10,7 +10,6 @@ if (!$AUTH_ED25519_SO) {
}
--
let
$plugindir
=
`SELECT @@global.plugin_dir`
install
soname
'auth_socket'
;
install
soname
'auth_ed25519'
;
--
let
$try_auth
=
$MYSQL_TEST
<
$MYSQLTEST_VARDIR
/
tmp
/
peercred_test
.
txt
2
>&
1
...
...
@@ -192,6 +191,5 @@ show create user mysqltest1;
--
exec
$try_auth
-
u
mysqltest1
-
pworks
--
plugin
-
dir
=
$plugindir
/
no
drop
user
mysqltest1
;
uninstall
soname
'auth_socket'
;
uninstall
soname
'auth_ed25519'
;
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
peercred_test
.
txt
mysql-test/suite/plugins/t/unix_socket.test
View file @
83de75d6
--
source
include
/
have_unix_socket
.
inc
if
(
!
$USER
)
{
skip
USER
variable
is
undefined
;
}
let
$plugindir
=
`SELECT @@global.plugin_dir`
;
eval
install
plugin
unix_socket
soname
'$AUTH_SOCKET_SO'
;
--
echo
#
--
echo
# with named user
--
echo
#
...
...
@@ -26,13 +18,13 @@ EOF
--
echo
#
--
echo
# name match = ok
--
echo
#
--
exec
$MYSQL_TEST
-
u
$USER
--
plugin
-
dir
=
$plugindir
<
$MYSQLTEST_VARDIR
/
tmp
/
peercred_test
.
txt
--
exec
$MYSQL_TEST
-
u
$USER
<
$MYSQLTEST_VARDIR
/
tmp
/
peercred_test
.
txt
--
echo
#
--
echo
# name does not match = failure
--
echo
#
--
error
1
--
exec
$MYSQL_TEST
-
u
foobar
--
plugin
-
dir
=
$plugindir
<
$MYSQLTEST_VARDIR
/
tmp
/
peercred_test
.
txt
--
exec
$MYSQL_TEST
-
u
foobar
<
$MYSQLTEST_VARDIR
/
tmp
/
peercred_test
.
txt
--
let
$replace
=
drop
user
$USER
--
replace_result
$replace
"drop user USER"
...
...
@@ -45,16 +37,15 @@ grant SELECT ON test.* TO '' identified via unix_socket;
--
echo
#
--
echo
# name match = ok
--
echo
#
--
exec
$MYSQL_TEST
-
u
$USER
--
plugin
-
dir
=
$plugindir
<
$MYSQLTEST_VARDIR
/
tmp
/
peercred_test
.
txt
--
exec
$MYSQL_TEST
-
u
$USER
<
$MYSQLTEST_VARDIR
/
tmp
/
peercred_test
.
txt
--
echo
#
--
echo
# name does not match = failure
--
echo
#
--
error
1
--
exec
$MYSQL_TEST
-
u
foobar
--
plugin
-
dir
=
$plugindir
<
$MYSQLTEST_VARDIR
/
tmp
/
peercred_test
.
txt
--
exec
$MYSQL_TEST
-
u
foobar
<
$MYSQLTEST_VARDIR
/
tmp
/
peercred_test
.
txt
# restoring mysql.user to the original state.
delete
from
mysql
.
user
where
user
=
''
;
FLUSH
PRIVILEGES
;
uninstall
plugin
unix_socket
;
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
peercred_test
.
txt
plugin/auth_socket/CMakeLists.txt
View file @
83de75d6
...
...
@@ -65,5 +65,5 @@ ENDIF()
ENDIF
()
IF
(
ok
)
MYSQL_ADD_PLUGIN
(
auth_socket auth_socket.c
)
MYSQL_ADD_PLUGIN
(
auth_socket auth_socket.c
DEFAULT
)
ENDIF
()
scripts/mysql_install_db.sh
View file @
83de75d6
...
...
@@ -345,7 +345,7 @@ then
cannot_find_file fill_help_tables.sql @pkgdata_locations@
exit
1
fi
plugindir
=
`
find_in_dirs
--dir
auth_
socket
.so
$basedir
/lib
*
/plugin
$basedir
/lib
*
/mysql/plugin
`
plugindir
=
`
find_in_dirs
--dir
auth_
pam
.so
$basedir
/lib
*
/plugin
$basedir
/lib
*
/mysql/plugin
`
pamtooldir
=
$plugindir
# relative from where the script was run for a relocatable install
elif
test
-n
"
$dirname0
"
-a
-x
"
$rel_mysqld
"
-a
!
"
$rel_mysqld
"
-ef
"@sbindir@/mysqld"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment