This file is indexed.

/usr/share/perl5/Cvs/Command/Diff.pm is in libcvs-perl 0.07-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
package Cvs::Command::Diff;

use strict;
use Cvs::Result::DiffList;
use Cvs::Result::DiffItem;
use base qw(Cvs::Command::Base);

sub init
{
    my($self, @file_list) = @_;
    $self->SUPER::init(@_) or return;

    $self->default_params
      (
       multiple => 0,
       recursive => 1,
       from_date => undef,
       to_date => undef,
       from_revision => undef,
       to_revision => undef,
      );
    my $param = pop @file_list
      if ref $file_list[-1] eq 'HASH';
    $param = $self->param($param||{});

    return
      $self->error('can\'t have more than one source type')
        if((defined $self->param->{from_date}
            and defined $self->param->{from_revision}));
    return
      $self->error('can\'t have more than one destination type')
        if((defined $self->param->{to_date}
            and defined $self->param->{to_revision}));

    return
      $self->error('can\'t have a destination without a source')
        if((defined $self->param->{to_revision}
            or defined $self->param->{to_date})
           and
           (not defined $self->param->{from_revision}
            and not defined $self->param->{from_revision}));

    $self->command('diff');
    $self->push_arg('-u2', '-N');
    $self->push_arg('-r', $self->param->{from_revision})
      if defined $self->param->{from_revision};
    $self->push_arg('-D', $self->param->{from_date})
      if defined $self->param->{from_date};
    $self->push_arg('-r', $self->param->{to_revision})
      if defined $self->param->{to_revision};
    $self->push_arg('-D', $self->param->{to_date})
      if defined $self->param->{to_date};
    $self->push_arg(@file_list);

    my $main = $self->new_context();
    $self->initial_context($main);

    my $resultlist;
    my $result = $self->err_result('No file in response');
    $self->result($result);

    $main->push_handler
    (
     qr/^Index: (.*)\n$/, sub
     {
         my($match) = @_;
         if($self->param->{multiple})
         {
             unless(defined $resultlist)
             {
                 $resultlist = new Cvs::Result::DiffList;
                 $self->result($resultlist);
             }
             $result = new Cvs::Result::DiffItem;
             $resultlist->push($result);
         }
         else
         {
             if($result->isa('Cvs::Result::DiffItem'))
             {
                 # first item is complete, don't continue
                 return $main->finish()
             }
             else
             {
                 $result = new Cvs::Result::DiffItem;
                 $self->result($result);
             }
         }
         $result->success(1);
         $result->filename($match->[1]);
         $result->push_diff($match->[0]);
     }
    );
    $main->push_handler
    (
     qr/^=+$/, sub
     {
         $result->push_diff(shift->[0]);
     }
    );
    $main->push_handler
    (
     qr/^RCS file: (.*)\n$/, sub
     {
         my($match) = @_;
         $result->rcs_file($match->[1]);
         $result->push_diff($match->[0]);
     }
    );
    $main->push_handler
    (
     qr/^retrieving revision .*$/, sub
     {
         $result->push_diff(shift->[0]);
     }
    );
    $main->push_handler
    (
     qr/^diff .*(?:-r([.\d]+)).*(?: -r([.\d]+))?.*$/, sub
     {
         my($match) = @_;
         $result->from_revision($match->[1]);
         $result->to_revision($match->[2]);
         $result->push_diff($match->[0]);
     }
    );
    $main->push_handler
    (
     qr/^cvs server: .*$/, sub
     {
         # do nothing
     }
    );
    $main->push_handler
    (
     qr/^\? /, sub
     {
         # do nothing
     }
    );
    $main->push_handler
    (
     qr/^[\-\+@ ]/, sub
     {
         my $line = shift->[0];
         if(index($line, '--- /dev/null') == 0)
         {
             warn "new";
             $result->is_added(1);
         }
         elsif(index($line, '+++ /dev/null') == 0)
         {
             $result->is_removed(1);
         }
         $result->push_diff($line);
     }
    );

    return $self;
}

1;
=pod

=head1 LICENCE

This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA

=head1 COPYRIGHT

Copyright (C) 2003 - Olivier Poitrey