[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltp-cvs
Subject:    [Ltp-cvs] ltp/testcases/kernel/security/selinux-testsuite/tests/readlink selinux_readlink.sh,1.2,1.3
From:       Martin Ridgeway <mridge () users ! sourceforge ! net>
Date:       2005-11-08 16:49:37
Message-ID: E1EZWfl-0005Kv-9j () mail ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/ltp/ltp/testcases/kernel/security/selinux-testsuite/tests/readlink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22391/selinux-testsuite/tests/readlink


Modified Files:
	selinux_readlink.sh 
Log Message:
Security test updates from Joy

Index: selinux_readlink.sh
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/security/selinux-testsuite/tests/readlink/selinux_readlink.sh,v
 retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** selinux_readlink.sh	14 Jul 2005 18:21:36 -0000	1.2
--- selinux_readlink.sh	8 Nov 2005 16:49:35 -0000	1.3
***************
*** 12,16 ****
  setup()
  {
-         LTPTMP="/tmp/selinux"
          export TCID="setup"
          export TST_COUNT=0
--- 12,15 ----
***************
*** 18,30 ****
  
  	# Remove any leftover test files from prior failed runs.
! 	rm -rf $LTPTMP/test_file $LTPTMP/test_symlink
  
  	# Create a test file.  
! 	touch $LTPTMP/test_file 2>&1
! 	chcon -t test_readlink_file_t $LTPTMP/test_file 2>&1
  
  	# Create a test symbolic link to the test file.
! 	ln -sf test_file $LTPTMP/test_symlink 2>&1
! 	chcon -h -t test_readlink_link_t $LTPTMP/test_symlink 2>&1
  }
  
--- 17,29 ----
  
  	# Remove any leftover test files from prior failed runs.
! 	rm -rf $SELINUXTMPDIR/test_file $SELINUXTMPDIR/test_symlink
  
  	# Create a test file.  
! 	touch $SELINUXTMPDIR/test_file 2>&1
! 	chcon -t test_readlink_file_t $SELINUXTMPDIR/test_file 2>&1
  
  	# Create a test symbolic link to the test file.
! 	ln -sf test_file $SELINUXTMPDIR/test_symlink 2>&1
! 	chcon -h -t test_readlink_link_t $SELINUXTMPDIR/test_symlink 2>&1
  }
  
***************
*** 36,46 ****
  
  	# Verify that test_readlink_t can read and follow this link.
! 	runcon -t test_readlink_t -- ls -Ll $LTPTMP/test_symlink
  	RC=$?
          if [ $RC -eq 0 ]
          then
!                 tst_resm TPASS "Test #1: readlink passed."
          else
!                 tst_resm TFAIL "Test #1: readlink failed."
          fi
          return $RC
--- 35,45 ----
  
  	# Verify that test_readlink_t can read and follow this link.
! 	runcon -t test_readlink_t -- ls -Ll $SELINUXTMPDIR/test_symlink
  	RC=$?
          if [ $RC -eq 0 ]
          then
!                 echo "$TCID   PASS : readlink passed."
          else
!                 echo "$TCID   FAIL : readlink failed."
          fi
          return $RC
***************
*** 54,65 ****
  
  	# Verify that test_noreadlink_t cannot read or follow this link.
! 	runcon -t test_noreadlink_t -- ls -l $LTPTMP/test_symlink 2>&1
  	RC=$?
          if [ $RC -ne 0 ]
          then
!                 tst_resm TPASS "Test #2: readlink passed."
  		RC=0
          else
!                 tst_resm TFAIL "Test #2: readlink failed."
  		RC=1
          fi
--- 53,64 ----
  
  	# Verify that test_noreadlink_t cannot read or follow this link.
! 	runcon -t test_noreadlink_t -- ls -l $SELINUXTMPDIR/test_symlink 2>&1
  	RC=$?
          if [ $RC -ne 0 ]
          then
!                 echo "$TCID   PASS : readlink passed."
  		RC=0
          else
!                 echo "$TCID   FAIL : readlink failed."
  		RC=1
          fi
***************
*** 73,84 ****
  	RC=0
  
! 	runcon -t test_noreadlink_t -- ls -Ll $LTPTMP/test_symlink 2>&1
  	RC=$?
          if [ $RC -ne 0 ]
          then
!                 tst_resm TPASS "Test #3: readlink passed."
  		RC=0
          else
!                 tst_resm TFAIL "Test #3: readlink failed."
  		RC=1
          fi
--- 72,83 ----
  	RC=0
  
! 	runcon -t test_noreadlink_t -- ls -Ll $SELINUXTMPDIR/test_symlink 2>&1
  	RC=$?
          if [ $RC -ne 0 ]
          then
!                 echo "$TCID   PASS : readlink passed."
  		RC=0
          else
!                 echo "$TCID   FAIL : readlink failed."
  		RC=1
          fi
***************
*** 89,93 ****
  {
  	# Cleanup.
! 	rm -rf $LTPTMP/test_file $LTPTMP/test_symlink
  }
  
--- 88,92 ----
  {
  	# Cleanup.
! 	rm -rf $SELINUXTMPDIR/test_file $SELINUXTMPDIR/test_symlink
  }
  



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Ltp-cvs mailing list
Ltp-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic