"- using realpath('..') to give user pathes in filesystem (in errors)

- using 'only_if_exists' for 'is_world_writable'=>false check, to cope with doc symlinks under Debian, which are not included in open_basedir (gave file does not exists error and stoped check)"
This commit is contained in:
Ralf Becker 2009-10-01 09:51:28 +00:00
parent 978a1d9642
commit db3b46293b

View File

@ -190,12 +190,13 @@ $checks = array(
'func' => 'pear_check',
'from' => 'WebDAV',
),
'.' => array(
realpath('..') => array(
'func' => 'permission_check',
'is_world_writable' => False,
'only_if_exists' => true, // quitens "file does not exist" for doc symlinks in Debian to files outside open_basedir
'recursiv' => True
),
'header.inc.php' => array(
realpath('../header.inc.php') => array(
'func' => 'permission_check',
'is_world_readable' => False,
'only_if_exists' => @$GLOBALS['egw_info']['setup']['stage']['header'] != 10
@ -211,7 +212,7 @@ $checks = array(
);
if (extension_loaded('session') && ini_get('session.save_handler') == 'files' && ($session_path = session_save_path()))
{
$checks[$session_path] = array(
$checks[realpath($session_path)] = array(
'func' => 'permission_check',
'is_writable' => true,
'msg' => lang("Checking if php.ini setting session.save_path='%1' is writable by the webserver",session_save_path()),
@ -526,6 +527,7 @@ function permission_check($name,$args,$verbose=True)
{
$name = '../'.$name;
}
if (!file_exists($name) && isset($args['only_if_exists']) && $args['only_if_exists'])
{
return True;