From: Elena Gryaznova Date: Wed, 8 Dec 2010 20:32:43 +0000 (+0300) Subject: b=22376 sanity test for non-root exec-only file execution X-Git-Tag: 1.8.5.51~17 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=6650d4d5ff6f4f9dbc728be1c846543d4c7dca73;p=fs%2Flustre-release.git b=22376 sanity test for non-root exec-only file execution o=Andreas.Dilger i=grev --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index f70f88f..027f266 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -1306,12 +1306,30 @@ test_29() { } run_test 29 "IT_GETATTR regression ============================" -test_30() { +test_30a() { # was test_30 cp `which ls` $DIR - $DIR/ls / + $DIR/ls / || error rm $DIR/ls } -run_test 30 "run binary from Lustre (execve) ===================" +run_test 30a "execute binary from Lustre (execve) ==============" + +test_30b() { + cp `which ls` $DIR + chmod go+rx $DIR/ls + $RUNAS $DIR/ls / || error + rm $DIR/ls +} +run_test 30b "execute binary from Lustre as non-root ===========" + +test_30c() { # b=22376 + cp `which ls` $DIR + chmod a-rw $DIR/ls + cancel_lru_locks mdc + cancel_lru_locks osc + $RUNAS $DIR/ls / || error + rm -f $DIR/ls +} +run_test 30c "execute binary from Lustre without read perms ====" test_31a() { $OPENUNLINK $DIR/f31 $DIR/f31 || error