~hexmode/ubuntu/lucid/php5/php5.fix-php-bug-33210

« back to all changes in this revision

Viewing changes to ext/standard/tests/file/open_basedir_chmod.php

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2009-11-30 14:13:45 UTC
  • mfrom: (0.3.4 sid)
  • Revision ID: james.westby@ubuntu.com-20091130141345-db35ow8gpyjqn8e0
Tags: 5.2.11.dfsg.1-2ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control, debian/rules: Disable a few build dependencies and
    accompanying binary packages which we do not want to support in main:
    + firebird2-dev/php5-interbase (we have a seperate php-interbase source)
    + libc-client/php5-imap (we have a seperate php-imap source)
    + libmcrypt-dev/php5-mcrypt (seperate php-mcrypt source)
    + readline support again, now that the libedit issue is fixed.
  - debian/control: Add build dependency: libdedit-dev (>= 2.9.cvs.20050518-1)
    CLI readline support.
  - debian/rules:
    + Correctly mangle PHP5_* macros for lpia
  - debian/control:
    + Rename Vcs-Browser & Vcs-Git to XS-Original-Vcs-Browser & XS-Original-Vcs-Git (LP: #323731).
  - debian/control: Move php5-suhoshin to Suggests.
  - debian/rules: Fix broken symlink for pear.
  - main/php_version.h: updated with Ubuntu version info
* debian/patches/series: Re-enable the 033-we_WANT_libtool.patch patch
* debian/patches/sybase-alias.patch: use the debian patch
* Dropped unapplied patches: fix_64bit_time.patch,
  fix-autoconf-ftbfs.patch, 027-readline_is_editline.patch,
  deprecated_freetds_check.patch, use-specific-libdb-version.patch,
  CVE-2008-5625.patch.
* SECURITY UPDATE: safe_mode bypass via tempam function
  - debian/patches/CVE-2009-3557.patch: check for safe_mode in
    ext/standard/file.c.
  - CVE-2009-3557
* SECURITY UPDATE: open_basedir restrictions bypass via posix_mkfifo
  - debian/patches/CVE-2009-3558.patch: check for open_basedir in
    ext/posix/posix.c.
  - CVE-2009-3558

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
require_once "open_basedir.inc";
3
 
test_open_basedir_before("chmod");
4
 
$directory = dirname(__FILE__);
5
 
 
6
 
var_dump(chmod("../bad", 0600));
7
 
var_dump(chmod("../bad/bad.txt", 0600));
8
 
var_dump(chmod("..", 0600));
9
 
var_dump(chmod("../", 0600));
10
 
var_dump(chmod("/", 0600));
11
 
var_dump(chmod("../bad/.", 0600));
12
 
var_dump(chmod("../bad/./bad.txt", 0600));
13
 
var_dump(chmod("./../.", 0600));
14
 
 
15
 
var_dump(chmod($directory."/test/ok/ok.txt", 0600));
16
 
var_dump(chmod("./ok.txt", 0600));
17
 
var_dump(chmod("ok.txt", 0600));
18
 
var_dump(chmod("../ok/ok.txt", 0600));
19
 
var_dump(chmod("../ok/./ok.txt", 0600));
20
 
chmod($directory."/test/ok/ok.txt", 0777);
21
 
 
22
 
test_open_basedir_after("chmod");
23
 
?>