This file is indexed.

/usr/lib/x86_64-linux-gnu/perl5/5.24/File/FcntlLock/Errors.pm is in libfile-fcntllock-perl 0.22-3+b2.

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
# -*- cperl -*-
#
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
# Copyright (C) 2002-2014 Jens Thoms Toerring <jt@toerring.de>


# Helper package for File::FcntLock::Core for handling error messages

package File::FcntlLock::Errors;


use 5.006;
use strict;
use warnings;
use Errno;


my %fcntl_error_texts;


BEGIN {
    # Set up a hash with the error messages, but only for errno's that Errno
    # knows about. The texts represent what is written in SUSv3 and in the
    # man pages for Linux, TRUE64, OpenBSD3 and Solaris8.

    my $err;

    if ( $err = eval { &Errno::EACCES } ) {
        $fcntl_error_texts{ $err } = "File or segment already locked " .
                                     "by other process(es) or file is " .
                                     "mmap()ed to virtual memory";
    }

    if ( $err = eval { &Errno::EAGAIN } ) {
        $fcntl_error_texts{ $err } = "File or segment already locked " .
                                     "by other process(es)";
    }

    if ( $err = eval { &Errno::EBADF } ) {
        $fcntl_error_texts{ $err } = "Not an open file or not opened for " .
                                     "writing (with F_WRLCK) or reading " .
                                     "(with F_RDLCK)";
    }

    if ( $err = eval { &Errno::EDEADLK } ) {
        $fcntl_error_texts{ $err } = "Operation would cause a deadlock";
    }

    if ( $err = eval { &Errno::EFAULT } ) {
        $fcntl_error_texts{ $err } = "Lock outside accessible address space " .
                                     "or to many locked regions";
    }

    if ( $err = eval { &Errno::EINTR } ) {
        $fcntl_error_texts{ $err } = "Operation interrupted by a signal";
    }

    if ( $err = eval { &Errno::ENOLCK } ) {
        $fcntl_error_texts{ $err } = "Too many segment locks open, lock " .
                                     "table full or remote locking protocol " .
                                     "failure (e.g. NFS)";
    }

    if ( $err = eval { &Errno::EINVAL } ) {
        $fcntl_error_texts{ $err } = "Illegal parameter or file does not " .
                                     "support locking";
    }

    if ( $err = eval { &Errno::EOVERFLOW } ) {
        $fcntl_error_texts{ $err } = "One of the parameters to be returned " .
                                     "can not be represented correctly";
    }

    if ( $err = eval { &Errno::ENETUNREACH } ) {
        $fcntl_error_texts{ $err } = "File is on remote machine that can " .
                                     "not be reached anymore";
    }

    if ( $err = eval { &Errno::ENOLINK } ) {
        $fcntl_error_texts{ $err } = "File is on remote machine that can " .
                                     "not be reached anymore";
    }
}


###########################################################
# Function for converting an errno to a useful, human readable
# message.

sub get_error {
    my ( $self, $err ) = @_;
    return $self->{ error } =
             defined $fcntl_error_texts{ $err } ? $fcntl_error_texts{ $err }
                                                : "Unexpected error: $!";
}


###########################################################
# Method returns the error number from the latest call of the
# derived classes lock() function. If the last call did not
# result in an error the method returns undef.

sub lock_errno {
    return shift->{ errno };
}


###########################################################
# Method returns a short description of the error that happenend
# on the latest call of derived classes lock() method with the
# object. If there was no error the method returns undef.

sub error {
    return shift->{ error };
}


###########################################################
# Method returns the "normal" system error message associated
# with errno. The method returns undef if there was no error.

sub system_error {
    local $!;
    my $self = shift;
    return $self->{ errno } ? $! = $self->{ errno } : undef;
}


1;


# Local variables:
# tab-width: 4
# indent-tabs-mode: nil
# End: