tag 613199 patch thanks On Sun, Feb 13, 2011 at 01:42:24PM +0000, Dominic Hargreaves wrote: > Package: libsgml-parser-opensp-perl > Version: 0.994-1 > Severity: important > User: debian-p...@lists.debian.org > Usertags: perl-5.12-transition > > This package fails to build with Perl 5.12.3: > > # Failed test 'allow to read sample dir in restricted mode' > # at t/13restricted.t line 63. > # got: '0' > # expected: anything else > > # Failed test 'allow to read sample dir in restricted mode' > # at t/13restricted.t line 64. > # got: '1' > # expected: '0' > # Looks like you failed 2 tests of 12. > t/13restricted.t .... > Dubious, test returned 2 (wstat 512, 0x200)
This happens when there are "unsafe" characters like '+' in the build directory name. BinNMU rebuilds cause such a situtation. The safety check is in the opensp library. Workaround patch attached. -- Niko Tyni nt...@debian.org
>From 081a0062757db6862e529d6b4b2e48145ec42647 Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> Date: Fri, 6 May 2011 18:03:59 +0300 Subject: [PATCH] Don't pass the full path of the file to parse() in restricted mode If the build directory name contains characters like '+', tests 11 and 12 of t/13restricted.t fail because the opensp library considers the directory unsafe and skips it. (see PosixStorageManager::isSafe() in lib/PosixStorage.cxx of opensp-1.5.2) --- t/13restricted.t | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/t/13restricted.t b/t/13restricted.t index ea91f25..2bb095d 100755 --- a/t/13restricted.t +++ b/t/13restricted.t @@ -53,7 +53,7 @@ isnt($h8->{ok2}, 0, 'must not read paths with ./'); $h8->{ok1} = 0; $h8->{ok2} = 0; -my $sd = File::Spec->catfile(File::Spec->rel2abs('.'), 'samples'); +my $sd = 'samples'; $p->search_dirs($sd); -- 1.7.4.4