From: Martin R. <mr...@us...> - 2005-09-22 21:11:37
|
Update of /cvsroot/ltp/ltp/testcases/network/tcp_cmds/ftp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1153 Modified Files: ftp02_s1 ftp03 ftp04 ftp05 Log Message: Updates to check for connection failure vs unauthorized access fail Index: ftp02_s1 =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/network/tcp_cmds/ftp/ftp02_s1,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ftp02_s1 22 Mar 2004 16:48:47 -0000 1.1 --- ftp02_s1 22 Sep 2005 21:11:25 -0000 1.2 *************** *** 1,5 **** #! /usr/bin/expect -f #********************************************************************* ! # Copyright (c) International Business Machines Corp., 2000 # # This program is free software; you can redistribute it and/or modify --- 1,5 ---- #! /usr/bin/expect -f #********************************************************************* ! # Copyright (c) International Business Machines Corp., 2003, 2005 # # This program is free software; you can redistribute it and/or modify *************** *** 27,31 **** # HISTORY: # 03/04/03 Jerone Young (je...@us...) ! # set RHOST $env(RHOST) --- 27,32 ---- # HISTORY: # 03/04/03 Jerone Young (je...@us...) ! # 09/21/05 Kris Wilson (kr...@us...) Check for connection failure. ! # (If WS system, no vsftpd; connection will fail.) set RHOST $env(RHOST) *************** *** 45,49 **** spawn ftp $RHOST sleep 1 ! expect -re "Name" send "$RUSER\r" sleep 1 --- 46,55 ---- spawn ftp $RHOST sleep 1 ! # Check if connection succeeded. ! expect { ! "Name" {} ! timeout {send_user "\nConnection failed\n Test FAILED \n";exit 1} ! } ! send "$RUSER\r" sleep 1 Index: ftp05 =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/network/tcp_cmds/ftp/ftp05,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ftp05 28 Jul 2004 19:00:16 -0000 1.2 --- ftp05 22 Sep 2005 21:11:25 -0000 1.3 *************** *** 1,5 **** #!/bin/sh # ! # Copyright (c) International Business Machines Corp., 2003 # # This program is free software; you can redistribute it and/or modify --- 1,5 ---- #!/bin/sh # ! # Copyright (c) International Business Machines Corp., 2003, 2005 # # This program is free software; you can redistribute it and/or modify *************** *** 26,29 **** --- 26,30 ---- # 03/03 Jerone Young (je...@us...) # 04/03 Dustin Kirkland (k1r...@us...) + # 09/05 Kris Wilson (kr...@us...) Check if vsftpd is on system. # # NOTE: *************** *** 40,43 **** --- 41,56 ---- if [ $tvar == "redhat" -o $tvar == "redhat-linux" ] then + + # Check if vsftpd is on system. + which vsftpd + if [ $? != 0 ] + then { + echo "vsftpd not found. Possible cause: does not exist on WS." + echo "Test ftp05 FAIL." + EXIT_CODE=1 + exit 1 + } + fi + ANONYMOUS_ENABLE=`cat /etc/vsftpd/vsftpd.conf | grep "^anonymous_enable=" | awk -F= '{print $2}'` else Index: ftp04 =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/network/tcp_cmds/ftp/ftp04,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ftp04 11 Aug 2004 16:13:52 -0000 1.4 --- ftp04 22 Sep 2005 21:11:25 -0000 1.5 *************** *** 1,5 **** #!/bin/sh # ! # Copyright (c) International Business Machines Corp., 2003 # # This program is free software; you can redistribute it and/or modify --- 1,5 ---- #!/bin/sh # ! # Copyright (c) International Business Machines Corp., 2003, 2005 # # This program is free software; you can redistribute it and/or modify *************** *** 27,31 **** # HISTORY: # 03/04/03 Jerone Young (je...@us...) ! # --- 27,31 ---- # HISTORY: # 03/04/03 Jerone Young (je...@us...) ! # 09/21/05 Kris Wilson (kr...@us...) Check if vsftpd is on system. *************** *** 55,58 **** --- 55,68 ---- if [ $tvar == "redhat" -o $tvar == "redhat-linux" ] then + # Check if vsftpd is on system. + which vsftpd + if [ $? != 0 ] + then { + echo "vsftpd not found. Possible cause: does not exist on WS." + echo "Test ftp04 FAIL." + EXIT_CODE=1 + exit 1 + } + fi echo "Verifying test user $TEST_USER is in /etc/vsftpd.ftpusers database..." FTPUSERS=`grep $TEST_USER /etc/vsftpd.ftpusers` Index: ftp03 =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/network/tcp_cmds/ftp/ftp03,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ftp03 28 Jul 2004 19:00:16 -0000 1.2 --- ftp03 22 Sep 2005 21:11:25 -0000 1.3 *************** *** 1,5 **** #!/bin/sh # ! # Copyright (c) International Business Machines Corp., 2003 # # This program is free software; you can redistribute it and/or modify --- 1,5 ---- #!/bin/sh # ! # Copyright (c) International Business Machines Corp., 2003, 2005 # # This program is free software; you can redistribute it and/or modify *************** *** 26,29 **** --- 26,30 ---- # 03/03 Jerone Young (je...@us...) # 04/03 Dustin Kirkland (k1r...@us...) + # 09/05 Kris Wilson (kr...@us...) Check if vsftpd.conf was found. # # NOTE: *************** *** 41,44 **** --- 42,54 ---- if [ $tvar == "redhat" -o $tvar == "redhat-linux" ] then + ls /etc/vsftpd/vsftpd.conf + if [ $? != 0 ] + then { + echo "vsftpd.conf not found. Possible cause: does not exist on WS." + echo "Test ftp03 FAIL." + EXIT_CODE=1 + exit 1 + } + fi LOCAL_ENABLE=`cat /etc/vsftpd/vsftpd.conf | grep "^local_enable=" | awk -F= '{print $2}'` else |