From: Jiri J. <jja...@re...> - 2013-08-21 16:21:47
|
From: Miroslav Vadkerti <mva...@re...> Tool netstat from net-tools package is in optional channel for RHEL7. We can use ss instead of it without big changes and it is from more standard iproute package. Signed-off-by: Miroslav Vadkerti <mva...@re...> --- audit-test/crypto/tests/test_ssh_sym.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audit-test/crypto/tests/test_ssh_sym.bash b/audit-test/crypto/tests/test_ssh_sym.bash index e713c98..0e89b6f 100755 --- a/audit-test/crypto/tests/test_ssh_sym.bash +++ b/audit-test/crypto/tests/test_ssh_sym.bash @@ -60,8 +60,8 @@ ssh_remove_screen $MPROFILE ssh_restart_daemon # get the pid of sshd process running on port 22 -SSHDPID=$(netstat -putna | grep ":22" | grep -m1 LISTEN | \ - sed 's/.*\(\b[0-9]\+\)\/sshd\b.*/\1/') +SSHDPID=$(ss -4 -ltnp | grep sshd | sed 's/.*sshd",\([0-9]\+\),.*/\1/') +[ -z "$SSHDPID" ] && exit_error "could not find sshd process pid" # check if SSH_USE_STRONG_RNG set in environemnt of the sshd process grep "SSH_USE_STRONG_RNG" /proc/$SSHDPID/environ -- 1.8.3.1 |