Diff for /embedaddon/php/tests/security/open_basedir_readlink.phpt between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 23:48:06 version 1.1.1.2, 2012/05/29 12:34:34
Line 6  if (substr(PHP_OS, 0, 3) == 'WIN') { Line 6  if (substr(PHP_OS, 0, 3) == 'WIN') {
     die('skip no symlinks on Windows');      die('skip no symlinks on Windows');
 }  }
 ?>  ?>
 --INI--  
 open_basedir=.  
 --FILE--  --FILE--
 <?php  <?php
   chdir(__DIR__);
   ini_set("open_basedir", ".");
 require_once "open_basedir.inc";  require_once "open_basedir.inc";
 $initdir = getcwd();  $initdir = getcwd();
 test_open_basedir_before("readlink", FALSE);  test_open_basedir_before("readlink", FALSE);
Line 32  $target = ($initdir."/test/ok/ok.txt"); Line 32  $target = ($initdir."/test/ok/ok.txt");
 $symlink = ($initdir."/test/ok/symlink.txt");  $symlink = ($initdir."/test/ok/symlink.txt");
 var_dump(symlink($target, $symlink));  var_dump(symlink($target, $symlink));
 var_dump(readlink($symlink));  var_dump(readlink($symlink));
 var_dump(unlink($symlink));  
   
 test_open_basedir_after("readlink");  test_open_basedir_after("readlink");
 ?>  ?>
Line 68  Warning: symlink(): open_basedir restriction in effect Line 67  Warning: symlink(): open_basedir restriction in effect
 bool(false)  bool(false)
   
 Warning: readlink(): open_basedir restriction in effect. File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on line %d  Warning: readlink(): open_basedir restriction in effect. File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
 bool(false)  
   
 Warning: unlink(): open_basedir restriction in effect. File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on line %d  
 bool(false)  bool(false)
 *** Finished testing open_basedir configuration [readlink] ***  *** Finished testing open_basedir configuration [readlink] ***
   

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


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