Annotation of embedaddon/php/tests/security/open_basedir_chdir.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test open_basedir configuration
        !             3: --INI--
        !             4: open_basedir=.
        !             5: --FILE--
        !             6: <?php
        !             7: require_once "open_basedir.inc";
        !             8: test_open_basedir_before("chdir");
        !             9: 
        !            10: var_dump(chdir("../bad"));
        !            11: var_dump(chdir(".."));
        !            12: var_dump(chdir("../"));
        !            13: var_dump(chdir("/"));
        !            14: var_dump(chdir("../bad/."));
        !            15: var_dump(chdir("./../."));
        !            16: 
        !            17: test_open_basedir_after("chdir");
        !            18: ?>
        !            19: --CLEAN--
        !            20: <?php
        !            21: require_once "open_basedir.inc";
        !            22: delete_directories();
        !            23: ?>
        !            24: --EXPECTF--
        !            25: *** Testing open_basedir configuration [chdir] ***
        !            26: bool(true)
        !            27: bool(true)
        !            28: bool(true)
        !            29: bool(true)
        !            30: bool(true)
        !            31: 
        !            32: Warning: chdir(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
        !            33: bool(false)
        !            34: 
        !            35: Warning: chdir(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
        !            36: bool(false)
        !            37: 
        !            38: Warning: chdir(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
        !            39: bool(false)
        !            40: 
        !            41: Warning: chdir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
        !            42: bool(false)
        !            43: 
        !            44: Warning: chdir(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
        !            45: bool(false)
        !            46: 
        !            47: Warning: chdir(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
        !            48: bool(false)
        !            49: *** Finished testing open_basedir configuration [chdir] ***
        !            50: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>