From 9667513a34d86baf106db6697b757d1c7e26b8cd Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: May 24 2012 18:53:18 +0000 Subject: added test for cracklib, making install_vsftpd more verbose --- diff --git a/tests/p_cracklib/0-install_cracklib.sh b/tests/p_cracklib/0-install_cracklib.sh new file mode 100755 index 0000000..17dab20 --- /dev/null +++ b/tests/p_cracklib/0-install_cracklib.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# Author: Christoph Galuschka + +t_Log "Running $0 - installing cracklib." +t_InstallPackage cracklib diff --git a/tests/p_cracklib/cracklib_passwordtest.sh b/tests/p_cracklib/cracklib_passwordtest.sh new file mode 100755 index 0000000..fb631bf --- /dev/null +++ b/tests/p_cracklib/cracklib_passwordtest.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# Author: Christoph Galuschka + +t_Log "Running $0 - cracklib can check some passwords." +ret_val=0 + +t_Log "checking very simple password" +echo -e "test" | cracklib-check | grep -q 'too short' +t_CheckExitStatus $? + +t_Log "checking simple password" +echo -e "testing" | cracklib-check | grep -q 'dictionary' +t_CheckExitStatus $? + +t_Log "checking simplistic password" +echo -e "1234_Hgi" | cracklib-check | grep -q 'simplistic' +t_CheckExitStatus $? + +t_Log "checking complicated password" +echo -e "1536_Hargi" | cracklib-check | grep -q 'OK' +t_CheckExitStatus $? diff --git a/tests/p_vsftpd/0-install_vsftpd.sh b/tests/p_vsftpd/0-install_vsftpd.sh index 091973f..e53e192 100755 --- a/tests/p_vsftpd/0-install_vsftpd.sh +++ b/tests/p_vsftpd/0-install_vsftpd.sh @@ -1,6 +1,6 @@ #!/bin/bash # Author: Athmane Madjoudj -# vsFTPd +t_Log "Running $0 - installing vsFTPd." t_InstallPackage vsftpd t_ServiceControl vsftpd start