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
725c3df5
Commit
725c3df5
authored
Jul 04, 2018
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-15471 Isolate/sandbox PAM modules, so that they can't crash the server
tests fixed.
parent
de745ecf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
24 deletions
+29
-24
mysql-test/suite/plugins/r/pam_v1.result
mysql-test/suite/plugins/r/pam_v1.result
+25
-0
mysql-test/suite/plugins/t/pam.test
mysql-test/suite/plugins/t/pam.test
+1
-1
mysql-test/suite/plugins/t/pam_init.inc
mysql-test/suite/plugins/t/pam_init.inc
+2
-2
mysql-test/suite/plugins/t/pam_init_v1.inc
mysql-test/suite/plugins/t/pam_init_v1.inc
+0
-14
mysql-test/suite/plugins/t/pam_v1.test
mysql-test/suite/plugins/t/pam_v1.test
+1
-7
No files found.
mysql-test/suite/plugins/r/pam_v1.result
0 → 100644
View file @
725c3df5
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;
mysql-test/suite/plugins/t/pam.test
View file @
725c3df5
let
$PAM_PLUGIN_VERSION
=
$AUTH_PAM_SO
;
--
source
pam_init
.
inc
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
pam_good
.
txt
...
...
mysql-test/suite/plugins/t/pam_init.inc
View file @
725c3df5
--
source
include
/
not_embedded
.
inc
if
(
!
$
AUTH_PAM_SO
)
{
if
(
!
$
PAM_PLUGIN_VERSION
)
{
skip
No
pam
auth
plugin
;
}
eval
install
plugin
pam
soname
'$
AUTH_PAM_SO
'
;
eval
install
plugin
pam
soname
'$
PAM_PLUGIN_VERSION
'
;
create
user
test_pam
identified
via
pam
using
'mariadb_mtr'
;
create
user
pam_test
;
grant
proxy
on
pam_test
to
test_pam
;
...
...
mysql-test/suite/plugins/t/pam_init_v1.inc
deleted
100644 → 0
View file @
de745ecf
--
source
include
/
not_embedded
.
inc
if
(
!
$AUTH_PAM_V1_SO
)
{
skip
No
pam
auth
plugin
;
}
eval
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
;
let
$plugindir
=
`SELECT @@global.plugin_dir`
;
mysql-test/suite/plugins/t/pam_v1.test
View file @
725c3df5
let
$PAM_PLUGIN_VERSION
=
$AUTH_PAM_V1_SO
;
--
source
pam_init
.
inc
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
pam_good
.
txt
...
...
@@ -25,12 +25,6 @@ EOF
--
error
1
--
exec
$MYSQL_TEST
-
u
test_pam
--
plugin
-
dir
=
$plugindir
<
$MYSQLTEST_VARDIR
/
tmp
/
pam_bad
.
txt
--
echo
#
--
echo
# pam module crashes
--
echo
#
--
error
1
--
exec
$MYSQL_TEST
-
u
crash_pam_tool
--
plugin
-
dir
=
$plugindir
<
$MYSQLTEST_VARDIR
/
tmp
/
pam_good
.
txt
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
pam_good
.
txt
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
pam_bad
.
txt
drop
user
test_pam
;
...
...
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