Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.244.788 Times

File::LckPwdF 0.01

  Date Added: May 22, 2010  |  Visits: 1.233

File::LckPwdF

Report Broken Link
Printer Friendly Version


Product Homepage
Download (103 downloads)



File::LckPwdF is a Perl module to lock and unlock the passwd and shadow files with lckpwdf and ulckpwdf. SYNOPSIS use File::LckPwdF; (lock_passwd(15)) || (die "Cant lock password file:n$! stopped"); # ... do stuff with the passwd file ... (unlock_passwd()) || (die "Cant unlock password file:n$! stopped"); This is a perl module to use lckpwdf(3) and ulckpwdf(3) to lock the /etc/passwd and (if present) /etc/shadow files. Functions exported automatically lock_passwd($timeout) $timeout works as follows: 1. The initial time is checked. 2. If $timeout is 0, it tries lckpwdf() until it succeeds, waiting a random time in between. 3. If $timeout is above 0, it tries lckpwdf() once. If that (or any following lckpwdf()) succeeds, it returns 1. It will try lckpwdf() until either it succeeds or the time is greater than the initial time plus $timeout. In the latter case, it returns 0. It waits a random time in between tries of lckpwdf(). The random timeout is controlled by $File::LckPwdF::Rand_Wait, which is exported on request. It is used via sleep int(rand($Rand_Wait) + 1); inside an until loop. This sleep is only done if $File::LckPwdF::Rand_Wait is above 0. $timeout defaults to $File::LckPwdF::Default_Timeout, which is also exported on request; the initial setting of $File::LckPwdF::Default_Timeout (the default default) is 15 seconds. The default setting for $File::LckPwdF::Rand_Wait is 10 seconds. unlock_passwd() This function uses ulckpwdf(). If lock_passwd() has previously been used to lock the passwd file, and unlock_passwd() has not been used to lock it, then it will be used to unlock the passwd file in an END: statement. (Admittedly, with many implementations of lckpwdf() this is not necessary, since when a process exits it loses the passwd file lock; it is present as a safety measure for those systems for which this is not true.) Functions exported by request lckpwdf() ulckpwdf() These are the xs-loaded versions of lckpwdf(3) and ulckpwdf(3), respectively..

Requirements: No special requirements
Platforms: Linux
Keyword: Filelckpwdf Lckpwdf Libraries Lock Passwd Passwd File Perl Perl Module Programming Time Timeout Unlock
Users rating: 0/10

License: Freeware Size: 5.12 KB
USER REVIEWS
More Reviews or Write Review


FILE::LCKPWDF RELATED
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Network & Internet  -  MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images). MN::CMS is a perl module that allows you to manage an...
16.38 KB  
Libraries  -  File::NFSLock 1.20
File::NFSLock is a Perl module to do NFS (or not) locking. SYNOPSIS use File::NFSLock qw(uncache); use Fcntl qw(LOCK_EX LOCK_NB); my $file = "somefile"; ### set up a lock - lasts until object looses scope if (my $lock = new File::NFSLock...
18.43 KB  
Libraries  -  File::PathList 0.02
File::PathList is a Perl module that can find a file within a set of paths (like @INC or Java classpaths). SYNOPSIS # Create a basic pathset my $inc = File::PathList->new( @INC ); # Again, but with more explicit params my $inc2 =...
26.62 KB  
Libraries  -  Java::JCR::Lock 0.08
Java::JCR::Lock is a Perl module that can load JCR lock extension wrappers. SYNOPSIS use Java::JCR::Lock This loads the Perl classes mapped to the Java package named javax.jcr.lock. Installation: Installation can be a bit tricky because...
48.13 KB  
Libraries  -  File::Basename 5.8.8
File::Basename is a Perl module to parse file paths into directory, filename and suffix. SYNOPSIS use File::Basename; ($name,$path,$suffix) = fileparse($fullname,@suffixlist); $name = fileparse($fullname,@suffixlist); $basename =...
12.2 MB  
Libraries  -  File::Format::RIFF 1.0.1
File::Format::RIFF is a Perl module to Resource Interchange File Format/RIFF files. SYNOPSIS use File::Format::RIFF; open( IN, file ) or die "Could not open file: $!"; my ( $riff1 ) = File::Format::RIFF->read( *IN ); close( IN );...
9.22 KB  
Libraries  -  File::Revision 0.03
File::Revision is a Perl module to return a name of non-existing backup file with a revision id. SYNOPSIS ####### # Subroutine interface # use File::Revision qw(new_revision num2revision parse_options revision2num revision_file rotate);...
89.09 KB  
Libraries  -  Tie::DB_Lock 0.07
Tie::DB_Lock Perl module can tie hashes to databases using shared and exclusive locks. SYNOPSIS use Tie::DB_Lock; use DB_File; tie(%hash, Tie::DB_Lock, $filename, rw); # Open for writing $hash{key} = value; untie %hash; tie(%hash2,...
7.17 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB