403Webshell
Server IP : 103.119.228.120  /  Your IP : 3.15.186.78
Web Server : Apache
System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : nobody ( 99)
PHP Version : 5.6.40
Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime
MySQL : ON |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /usr/local/share/perl5/Net/DAV/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/local/share/perl5/Net/DAV/LockManager.pod
=head1 NAME

Net::DAV::LockManager - Provides support for WebDAV locking


=head1 VERSION

This document describes Net::DAV::LockManager version 1.304.


=head1 SYNOPSIS

    use Net::DAV::LockManager;

    my $mgr = Net::DAV::LockManager->new();
    if ( my $lock = $mgr->lock({ 'path' => '/foo/bar', 'owner' => 'fred' }) ) {
        # Fred has access.
        # Fred changes file.
        $mgr->unlock({
            'path' => '/foo/bar', 'owner' => 'fred', 'token' => $lock->{'token'}
        });
    }

=head1 DESCRIPTION

The C<Net::DAV::LockManager> class provides the ability to handle resource locking
in the style needed by WebDAV. It does not perform OS-level locking, but only
locking in the mind of the LockManager.

The current implementation only supports exlusive locking. However, it does
support indirect locks and expiration of locks. It also maintains the lock
tokens and manages ownership independent of OS-level ownership.

=head1 INTERFACE 

=head2 new()

Create a new C<Net::DAV::LockManager> object to manage locking.

=head2 can_modify( $hashref )

Return true if the path supplied in the hash ref can be modified by the user
specified in the hash ref. The hash ref supplies the following named parameters.

=over 4

=item path

Required parameter specifying the path as a string.

=item owner

Required parameter specifying the user that wishes to modify the resource.

=item token

Optional parameter specifying the token returned when the resource (or an
ancestor) was locked. This parameter may be either a single token as a string
or an array reference containing token strings.

=back

=head2 lock( $hash_ref )

Lock the path supplied in the hash ref based on the parameters in the hash
ref.

=over 4

=item path

Required parameter specifying the path as a string.

=item owner

Required parameter specifying the user that wishes to lock the resource.

=item timeout

Optional parameter specifying a number of seconds in the future to expire the
lock. This is considered a request and the the actual timeout may be different.

If not supplied, a default timeout of 15 minutes is used.

=item depth

Optional parameter specifying the depth the locking effect. As per the WebDAV
specification RFC 4918, two values are accepted I<0> and I<infinity>. A value
of I<0> applies only to the specified resource. The depth of I<infinity>
applies to a collection and all of its descendants.

The default value of this parameter is I<infinity>.

=item scope

Optional parameter specifying the scope of the lock. The WebDAV specification
supports two values: I<exclusive> and I<shared>. The C<LockManager> only
supports I<explusive> at this time.

The default value is I<exclusive>.

=item token

Optional parameter specifying the token returned when an ancestor of the the
specified resource was locked. This parameter may be either a single token as
a string or an array reference containing token strings.

=back

Returns a C<Net::DAV::Lock> object describing the lock on success and C<undef>
on failure.

=head2 refresh_lock( $hash_ref )

Updates the timeout value on the lock specified by the supplied hash ref. The
hash ref contains the following named parameters.

=over 4

=item path

Required parameter specifying the path as a string.

=item owner

Required parameter specifying the user that wishes to lock the resource. This
name must match the owner of the lock.

=item token

Required parameter specifying the token returned when the resource (or an
ancestor) was locked. This parameter may be either a single token as a string
or an array reference containing token strings.

=item timeout

Optional parameter specifying a number of seconds in the future to expire the
lock. This is considered a request and the the actual timeout may be different.

If not supplied, a default timeout of 15 minutes is used.

=back

Returns a C<Net::DAV::Lock> object describing the lock on success and C<undef>
on failure.

=head2 unlock( $hash_ref )

Unlock the resource specified by the hash ref. The hash ref specifies the 
resource to unlock and the credentials needed to access it. The named
parameters in the hash are

=over 4

=item path

Required parameter specifying the path as a string.

=item owner

Required parameter specifying the user that wishes to lock the resource. This
name must match the owner of the lock.

=item token

Required parameter specifying the token returned when the resource was locked.
This parameter may be either a single token as a string or an array reference
containing token strings.

=back

Returns true on success, false otherwise.

=head2 find_lock( $hash_ref )

Find the lock that pretects the resource listed in $hash_ref. Returns the
C<Net::DAV::Lock> object representing the lock, or C<undef> if none is found.

The hash reference contains the path to the resource that we want to check.

=over 4

=item path

Required parameter specifying the path as a string.

=back

=head2 list_all_locks( $hash_ref )

List all the locks that pretect the resource listed in $hash_ref. Returns an
array of C<Net::DAV::Lock> objects representing the locks.

The hash reference contains the path to the resource that we want to check.

=over 4

=item path

Required parameter specifying the path as a string.

=back

=head1 DIAGNOSTICS

Most of the methods perform parameter validation and C<die> on error. This is
based on the idea that this is a mostly internal module that should be being
called from non-user code. Therefore, it is the client code's responsibility
to get the parameters right.

=over 4

=item C<< Parameter should be a hash reference. >>

All methods of this class take a hash reference to support named and optional
parameters.

=item C<< Missing required '%s' parameter. >>

The specified parameter was required but not supplied,

=item C<< Not a clean path >>

C<LockManager> only supports absolute paths that have no C<..> or C<.> segments
and do not end in C</>.

=item C<< Not a valid owner name. >>

The specified user name does not look like a username.

=item C<< '%s' is not a supported value for scope. >>

At present, C<LockManager> only supports the I<exclusive> scope for locking.

=item C<< '%s' is not a supported value for depth. >>

According to RFC 4918, the only supported depth values are I<0> and I<infinity>.

=item C<< '%s' is not a supported value for timeout. >>

Only integer timeout values are supported.

=back


=head1 CONFIGURATION AND ENVIRONMENT

ModName requires no configuration files or environment variables.

=head1 DEPENDENCIES

None.

=head1 INCOMPATIBILITIES

None reported.

=head1 BUGS AND LIMITATIONS

No bugs have been reported.

=head1 AUTHOR

G. Wade Johnson  C<< wade@cpanel.net >>
Erin Schoenhals  C<< erin@cpanel.net >>

=head1 LICENSE AND COPYRIGHT

Copyright (c) 2010, cPanel, Inc. All rights reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See L<perlartistic>.

Youez - 2016 - github.com/yon3zu
LinuXploit