[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/setattr selinux_setattr.sh,1.2,1.3
From: Martin Ridgeway <mridge () users ! sourceforge ! net>
Date: 2005-11-08 16:49:37
Message-ID: E1EZWfG-0005Bl-TH () mail ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/ltp/ltp/testcases/kernel/security/selinux-testsuite/tests/setattr
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22391/selinux-testsuite/tests/setattr
Modified Files:
selinux_setattr.sh
Log Message:
Security test updates from Joy
Index: selinux_setattr.sh
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/security/selinux-testsuite/tests/setattr/selinux_setattr.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** selinux_setattr.sh 14 Jul 2005 18:21:36 -0000 1.2
--- selinux_setattr.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,27 ****
# Remove any leftover test file from prior failed runs.
! rm -rf $LTPTMP/test_file
# Create a test file with the test_setattr_file_t type
# for use in the tests.
! touch $LTPTMP/test_file
! chcon -t test_setattr_file_t $LTPTMP/test_file
}
--- 17,26 ----
# Remove any leftover test file from prior failed runs.
! rm -rf $SELINUXTMPDIR/test_file
# Create a test file with the test_setattr_file_t type
# for use in the tests.
! touch $SELINUXTMPDIR/test_file
! chcon -t test_setattr_file_t $SELINUXTMPDIR/test_file
}
***************
*** 33,43 ****
# Verify that test_setattr_t can set attributes on the file.
! runcon -t test_setattr_t chown root $LTPTMP/test_file 2>&1
RC=$?
if [ $RC -eq 0 ]
then
! tst_resm TPASS "Test #1: setattr passed."
else
! tst_resm TFAIL "Test #1: setattr failed."
fi
return $RC
--- 32,42 ----
# Verify that test_setattr_t can set attributes on the file.
! runcon -t test_setattr_t chown root $SELINUXTMPDIR/test_file 2>&1
RC=$?
if [ $RC -eq 0 ]
then
! echo "$TCID PASS : setattr passed."
else
! echo "$TCID FAIL : setattr failed."
fi
return $RC
***************
*** 50,60 ****
RC=0
! runcon -t test_setattr_t chmod 0755 $LTPTMP/test_file 2>&1
RC=$?
if [ $RC -eq 0 ]
then
! tst_resm TPASS "Test #2: setattr passed."
else
! tst_resm TFAIL "Test #2: setattr failed."
fi
return $RC
--- 49,59 ----
RC=0
! runcon -t test_setattr_t chmod 0755 $SELINUXTMPDIR/test_file 2>&1
RC=$?
if [ $RC -eq 0 ]
then
! echo "$TCID PASS : setattr passed."
else
! echo "$TCID FAIL : setattr failed."
fi
return $RC
***************
*** 68,79 ****
# Verify that test_nosetattr_t cannot set attributes on the file.
! runcon -t test_nosetattr_t chown nobody $LTPTMP/test_file 2>&1
RC=$?
if [ $RC -ne 0 ]
then
! tst_resm TPASS "Test #3: setattr passed."
RC=0
else
! tst_resm TFAIL "Test #3: setattr failed."
RC=1
fi
--- 67,78 ----
# Verify that test_nosetattr_t cannot set attributes on the file.
! runcon -t test_nosetattr_t chown nobody $SELINUXTMPDIR/test_file 2>&1
RC=$?
if [ $RC -ne 0 ]
then
! echo "$TCID PASS : setattr passed."
RC=0
else
! echo "$TCID FAIL : setattr failed."
RC=1
fi
***************
*** 87,98 ****
RC=0
! runcon -t test_nosetattr_t chmod 0644 $LTPTMP/test_file 2>&1
RC=$?
if [ $RC -ne 0 ]
then
! tst_resm TPASS "Test #4: setattr passed."
RC=0
else
! tst_resm TFAIL "Test #4: setattr failed."
RC=1
fi
--- 86,97 ----
RC=0
! runcon -t test_nosetattr_t chmod 0644 $SELINUXTMPDIR/test_file 2>&1
RC=$?
if [ $RC -ne 0 ]
then
! echo "$TCID PASS : setattr passed."
RC=0
else
! echo "$TCID FAIL : setattr failed."
RC=1
fi
***************
*** 103,107 ****
{
# Cleanup.
! rm -rf $LTPTMP/test_file
}
--- 102,106 ----
{
# Cleanup.
! rm -rf $SELINUXTMPDIR/test_file
}
-------------------------------------------------------
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