Ticket #2227: perl-5.10.0-debian_fixes-1.patch

File perl-5.10.0-debian_fixes-1.patch, 5.4 KB (added by willimm, 16 years ago)

Debian's fixes for perl. Also includes the ROOT HOLE fix.

  • ext/PerlIO/via/via.xs

    Submitted by: William Immendorf (computerperson1 AT live DOT com)
    Date: 2008-10-20
    Initial Package Version: 5.10.0
    Upstream Status: Accepeted, I guess.
    Origin: Various Debian patches, and DJ's symlink securty fix.
    Description: Various perl fixes, manily from Debian. Fixes #2227.
    diff -Naur perl-5.10.0-orig/ext/PerlIO/via/via.xs perl-5.10.0/ext/PerlIO/via/via.xs
    old new  
    8989            if (!s->fh) {
    9090                GV *gv = newGVgen(HvNAME_get(s->stash));
    9191                GvIOp(gv) = newIO();
    92                 s->fh = newRV_noinc((SV *) gv);
     92                s->fh = newRV((SV *) gv);
    9393                s->io = GvIOp(gv);
    9494            }
    9595            IoIFP(s->io) = PerlIONext(f);
  • ext/POSIX/Makefile.PL

    diff -Naur perl-5.10.0-orig/ext/POSIX/Makefile.PL perl-5.10.0/ext/POSIX/Makefile.PL
    old new  
    4848      MAX_INPUT MB_LEN_MAX MSG_CTRUNC MSG_DONTROUTE MSG_EOR MSG_OOB MSG_PEEK
    4949      MSG_TRUNC MSG_WAITALL NAME_MAX NCCS NGROUPS_MAX NOFLSH OPEN_MAX OPOST
    5050      PARENB PARMRK PARODD PATH_MAX PIPE_BUF RAND_MAX R_OK SCHAR_MAX
    51       SCHAR_MIN SEEK_CUR SEEK_END SEEK_SET SHRT_MAX SHRT_MIN SIGABRT SIGALRM
     51      SCHAR_MIN SHRT_MAX SHRT_MIN SIGABRT SIGALRM
    5252      SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT
    5353      SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU
    5454      SIGUSR1 SIGUSR2 SIG_BLOCK SIG_SETMASK SIG_UNBLOCK SSIZE_MAX
    55       STDERR_FILENO STDIN_FILENO STDOUT_FILENO STREAM_MAX
    56       S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID
    57       S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR TCIFLUSH TCIOFF
     55      STDERR_FILENO STDIN_FILENO STDOUT_FILENO STREAM_MAX TCIFLUSH TCIOFF
    5856      TCIOFLUSH TCION TCOFLUSH TCOOFF TCOON TCSADRAIN TCSAFLUSH TCSANOW
    5957      TMP_MAX TOSTOP TZNAME_MAX VEOF VEOL VERASE VINTR VKILL VMIN VQUIT
    6058      VSTART VSTOP VSUSP VTIME WNOHANG WUNTRACED W_OK X_OK
  • ext/POSIX/POSIX.pm

    diff -Naur perl-5.10.0-orig/ext/POSIX/POSIX.pm perl-5.10.0/ext/POSIX/POSIX.pm
    old new  
    1313use Fcntl qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK F_SETFD
    1414             F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK O_ACCMODE O_APPEND
    1515             O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC
    16              O_WRONLY);
     16             O_WRONLY SEEK_CUR SEEK_END SEEK_SET
     17             S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID
     18             S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR);
    1719
    1820# Grandfather old foo_h form to new :foo_h form
    1921my $loaded;
  • lib/File/Path.pm

    diff -Naur perl-5.10.0-orig/lib/File/Path.pm perl-5.10.0/lib/File/Path.pm
    old new  
    350350                next ROOT_DIR;
    351351            }
    352352
    353             my $nperm = $perm & 07777 | 0600;
    354             if ($nperm != $perm and not chmod $nperm, $root) {
    355                 if ($Force_Writeable) {
     353            if ($Force_Writeable) {
     354                my $nperm = $perm & 07777 | 0600;
     355                if ($nperm != $perm and not chmod $nperm, $root) {
    356356                    _error($arg, "cannot make file writeable", $canon);
    357357                }
    358358            }
  • pp_sort.c

    diff -Naur perl-5.10.0-orig/pp_sort.c perl-5.10.0/pp_sort.c
    old new  
    15531553        max = AvFILL(av) + 1;
    15541554        if (SvMAGICAL(av)) {
    15551555            MEXTEND(SP, max);
    1556             p2 = SP;
    15571556            for (i=0; i < max; i++) {
    15581557                SV **svp = av_fetch(av, i, FALSE);
    15591558                *SP++ = (svp) ? *svp : NULL;
    15601559            }
     1560            SP--;
     1561            p1 = p2 = SP - (max-1);
    15611562        }
    15621563        else {
    15631564            if (SvREADONLY(av))
     
    17131714        SvREADONLY_off(av);
    17141715    else if (av && !sorting_av) {
    17151716        /* simulate pp_aassign of tied AV */
    1716         SV** const base = ORIGMARK+1;
     1717        SV** const base = MARK+1;
    17171718        for (i=0; i < max; i++) {
    17181719            base[i] = newSVsv(base[i]);
    17191720        }
  • t/lib/proxy_constant_subs.t

    diff -Naur perl-5.10.0-orig/t/lib/proxy_constant_subs.t perl-5.10.0/t/lib/proxy_constant_subs.t
    old new  
    77        print "1..0 # Skip -- Perl configured without B module\n";
    88        exit 0;
    99    }
    10     if ($Config::Config{'extensions'} !~ /\bPOSIX\b/) {
    11         print "1..0 # Skip -- Perl configured without POSIX\n";
     10    if ($Config::Config{'extensions'} !~ /\bFcntl\b/) {
     11        print "1..0 # Skip -- Perl configured without Fcntl\n";
    1212        exit 0;
    1313    }
    14     # errno is a real subroutine, and acts as control
     14    # S_IFMT is a real subroutine, and acts as control
    1515    # SEEK_SET is a proxy constant subroutine.
    16     @symbols = qw(errno SEEK_SET);
     16    @symbols = qw(S_IFMT SEEK_SET);
    1717}
    1818
    1919use strict;
    2020use warnings;
    2121use Test::More tests => 4 * @symbols;
    2222use B qw(svref_2object GVf_IMPORTED_CV);
    23 use POSIX @symbols;
     23use Fcntl @symbols;
    2424
    2525# GVf_IMPORTED_CV should not be set on the original, but should be set on the
    2626# imported GV.
     
    2929    my ($ps, $ms);
    3030    {
    3131        no strict 'refs';
    32         $ps = svref_2object(\*{"POSIX::$symbol"});
     32        $ps = svref_2object(\*{"Fcntl::$symbol"});
    3333        $ms = svref_2object(\*{"::$symbol"});
    3434    }
    3535    isa_ok($ps, 'B::GV');