Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.20
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
perl5 /
Mail /
Box /
Locker /
[ HOME SHELL ]
Name
Size
Permission
Action
DotLock.pm
2.81
KB
-rw-r--r--
DotLock.pod
5.07
KB
-rw-r--r--
FcntlLock.pm
2.59
KB
-rw-r--r--
FcntlLock.pod
5.46
KB
-rw-r--r--
Flock.pm
2.38
KB
-rw-r--r--
Flock.pod
5.63
KB
-rw-r--r--
Multi.pm
2.43
KB
-rw-r--r--
Multi.pod
5.58
KB
-rw-r--r--
Mutt.pm
2.39
KB
-rw-r--r--
Mutt.pod
5.02
KB
-rw-r--r--
NFS.pm
3.29
KB
-rw-r--r--
NFS.pod
5.51
KB
-rw-r--r--
POSIX.pm
2.71
KB
-rw-r--r--
POSIX.pod
5.82
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : FcntlLock.pm
# Copyrights 2001-2020 by [Mark Overmeer]. # For other contributors see ChangeLog. # See the manual pages for details on the licensing terms. # Pod stripped from pm file by OODoc 2.02. # This code is part of distribution Mail-Box. Meta-POD processed with # OODoc into POD and HTML manual-pages. See README.md # Copyright Mark Overmeer. Licensed under the same terms as Perl itself. package Mail::Box::Locker::FcntlLock; use vars '$VERSION'; $VERSION = '3.009'; use base 'Mail::Box::Locker'; use strict; use warnings; use Fcntl; use IO::File; use Errno qw/EAGAIN/; use File::FcntlLock; sub init($) { my ($self, $args) = @_; $args->{file} = $args->{posix_file} if $args->{posix_file}; $self->SUPER::init($args); } sub name() {'FcntlLock'} sub _try_lock($) { my ($self, $file) = @_; my $fl = File::FcntlLock->new; $fl->l_type(F_WRLCK); $? = $fl->lock($file, F_SETLK); $?==0; } sub _unlock($) { my ($self, $file) = @_; my $fl = File::FcntlLock->new; $fl->l_type(F_UNLCK); $fl->lock($file, F_SETLK); $self; } sub lock() { my $self = shift; if($self->hasLock) { my $folder = $self->folder; $self->log(WARNING => "Folder $folder already lockf'd"); return 1; } my $filename = $self->filename; my $file = IO::File->new($filename, 'r+'); unless(defined $file) { my $folder = $self->folder; $self->log(ERROR => "Unable to open FcntlLock lock file $filename for $folder: $!"); return 0; } my $timeout = $self->timeout; my $end = $timeout eq 'NOTIMEOUT' ? -1 : $timeout; while(1) { if($self->_try_lock($file)) { $self->SUPER::lock; $self->{MBLF_filehandle} = $file; return 1; } unless($!==EAGAIN) { my $folder = $self->folder; $self->log(ERROR => "Will never get a FcntlLock lock on $filename for $folder: $!"); last; } last unless --$end; sleep 1; } return 0; } sub isLocked() { my $self = shift; my $filename = $self->filename; my $file = IO::File->new($filename, "r"); unless($file) { my $folder = $self->folder; $self->log(ERROR => "Unable to check lock file $filename for $folder: $!"); return 0; } $self->_try_lock($file)==0 or return 0; $self->_unlock($file); $file->close; $self->SUPER::unlock; 1; } sub unlock() { my $self = shift; $self->_unlock(delete $self->{MBLF_filehandle}) if $self->hasLock; $self->SUPER::unlock; $self; } 1;
Close