From: Linda K. <lin...@hp...> - 2011-03-11 23:58:17
|
>From 0cc2e02b1db632fcb9a8bb716bfb7e68c7a55257 Mon Sep 17 00:00:00 2001 From: Linda Knippers <lin...@hp...> Date: Fri, 11 Mar 2011 18:53:13 -0500 Subject: [PATCH] Fixed another distro check and added a comment about the fd 63 hack Signed-off-by: Linda Knippers <lin...@hp...> --- audit/libpam/tests/test_vsftpd.bash | 3 +++ audit/utils/functions.bash | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/audit/libpam/tests/test_vsftpd.bash b/audit/libpam/tests/test_vsftpd.bash index f5facd8..412c25c 100755 --- a/audit/libpam/tests/test_vsftpd.bash +++ b/audit/libpam/tests/test_vsftpd.bash @@ -22,12 +22,15 @@ source pam_functions.bash || exit 2 # setup setsebool -P ftp_home_dir=1 +# XXX: fd 63 is left open by something, causing the tests to hang prepend_cleanup "initcall $vsftpd_init restart 63>/dev/null" prepend_cleanup "setsebool -P ftp_home_dir=0" backup "$vsftpd_conf" write_config \ "$vsftpd_conf" \ local_enable=YES + +# XXX: fd 63 is left open by something, causing the tests to hang initcall $vsftpd_init restart 63>/dev/null echo Made it this far diff --git a/audit/utils/functions.bash b/audit/utils/functions.bash index 172d5a9..7dcb0aa 100644 --- a/audit/utils/functions.bash +++ b/audit/utils/functions.bash @@ -160,10 +160,11 @@ fi function start_auditd { declare i if ! pidof auditd &>/dev/null; then - if [ $DISTRO -eq "SUSE" ]; then + if [ $DISTRO = "SUSE" ]; then rcauditd start || return 2 auditctl -e 1 || return 2 else + # XXX: fd 63 is left open by something, causing the tests to hang service auditd start 63>/dev/null || return 2 fi fi @@ -191,7 +192,7 @@ function stop_auditd { declare i auditctl -D &>/dev/null - if [ $DISTRO -eq "SUSE" ]; then + if [ $DISTRO = "SUSE" ]; then rcauditd stop || killall auditd else service auditd stop || killall auditd -- 1.7.4 |