1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-15471 Isolate/sandbox PAM modules, so that they can't crash the server

tests fixed.
This commit is contained in:
Alexey Botchkov
2018-07-04 21:52:01 +04:00
parent de745ecf29
commit 725c3df53e
5 changed files with 29 additions and 24 deletions

View File

@@ -0,0 +1,25 @@
install plugin pam soname 'auth_pam_v1.so';
create user test_pam identified via pam using 'mariadb_mtr';
create user pam_test;
grant proxy on pam_test to test_pam;
#
# athentication is successful, challenge/pin are ok
# note that current_user() differs from user()
#
Challenge input first.
Enter: not very secret challenge
Now, the magic number!
PIN: ****
select user(), current_user(), database();
user() current_user() database()
test_pam@localhost pam_test@% test
#
# athentication is unsuccessful
#
Challenge input first.
Enter: not very secret challenge
Now, the magic number!
PIN: ****
drop user test_pam;
drop user pam_test;
uninstall plugin pam;