#
# Copyright (c) Members of the EGEE Collaboration. 2009-2010.
# See http://www.eu-egee.org/partners/ for details on the copyright
# holders.
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Authors:
# 2009-
#      Oscar Koeroo <okoeroo@nikhef.nl>
#      Mischa Sall\'e <msalle@nikhef.nl>
#      NIKHEF Amsterdam, the Netherlands
#

gLExec compound test script:

Description:
The gLExec compound test script tries to cover all known deployment scenarios for glexec, combined with LCAS, LCMAPS and SCAS. GLExec is a versatile piece of software using flexible frameworks. Therefore we consider all working setups for gLExec valid to support and try to the best of our abilities to support them all.

This test script is focused to test all boundry conditions of gLExec. This is done by executing a series of tests. Each test will be executed in all of the programmed deployment scenarios (currently 12, more to come). gLExec must return with the expected result otherwise a bug or failure condition is triggered to halt the script.


The deployment scenarios cover a matrix of possibilities. To express them, the glexec.conf file is rewritten durring each deployment scenario switch.

The deployment scenarios:
#1.  setuid     / SCAS     / file logging / linger
#2.  setuid     / SCAS     / syslog       / linger
#3.  non-setuid / SCAS     / syslog       / linger
#4.  setuid     / non-SCAS / file logging / linger
#5.  setuid     / non-SCAS / syslog       / linger
#6.  non-setuid / non-SCAS / syslog       / linger
#7.  setuid     / SCAS     / file logging / don't linger
#8.  setuid     / SCAS     / syslog       / don't linger
#9.  non-setuid / SCAS     / syslog       / don't linger
#10. setuid     / non-SCAS / file logging / don't linger
#11. setuid     / non-SCAS / syslog       / don't linger
#12. non-setuid / non-SCAS / syslog       / don't linger

Note: The modes non-setuid and logging to file do not exist. To use that mode would require the logfile to be world-writeable and that is not safe and not supported.


The gLExec tests:
"Test 1: Basic functional gLExec test (all must be working)"
"Test 2: gLExec executing a non-existing executable"
"Test 3: gLExec try to execute a symlinked binary (success)"
"Test 4: gLExec tries to execute a symlinked binary (prohibited/protected)"
"Test 5: gLExec tries to execute a file that isn't executable"
"Test 6: gLExec tries to execute a file that isn't executable, but now the pedantic checks are enabled, changing the return value"
"Test 7: gLExec tries to execute a file that is executable, but now unreachable by ownership and file permissions."
"Test 8: gLExec tries to execute a file that is executable, but now unreachable by ownership and file permissions, with pedenatic file checks on"
"Test 9: gLExec testing lock mechansims: input locking: $1 for target locking: $2"
    test_9 disabled disabled
    test_9 flock    disabled
    test_9 disabled flock
    test_9 flock    flock
    test_9 fcntl    disabled
    test_9 disabled fcntl
    test_9 fcntl    flock
    test_9 flock    fcntl
    test_9 fcntl    fcntl
"Test 10: gLExec tries to execute a setuid-enabled executable"
"Test 11: gLExec tries to execute a setgid-enabled executable."
"Test 12: gLExec tries to execute a setuid-setgid-enabled executable."
"Test 13: gLExec tries to execute a world-writeable executable."
"Test 14: gLExec tries to execute a world-writeable executable, with pedantic checks are now enabled."


